Commit Graph

117 Commits

Author SHA1 Message Date
Artem Kobzar 2530cba82a [K/JS] Compile Kotlin coroutines as JS generator ^KT-63038 Fixed 2023-12-18 17:13:07 +00:00
Artem Kobzar 05ed134fbb [K/Wasm] Introduce stepping tests for Wasm 2023-08-15 17:03:11 +00:00
Sergej Jaskiewicz 7b7c517dbb [JS IR] Emit original names for local vars to sourcemaps
#KT-35655 Fixed
2022-11-09 12:35:44 +00:00
Sergej Jaskiewicz 8efa72ca36 [JS] Make sourcemaps more precise wrt JS syntax
- Generate mappings for function parameters
- Don't generate debug info for dots in qualified references
- A location of a JsNameRef is considered the start of the rightmost
  name
2022-11-09 12:35:44 +00:00
Sergej Jaskiewicz d9681caf0c [JS IR] Generate 'names' entries for functions in sourcemaps 2022-10-14 10:09:40 +00:00
Sergej Jaskiewicz 1d0025c3cf [JS] Support the 'names' field in sourcemaps 2022-10-14 10:09:39 +00:00
Sergej Jaskiewicz d57ddc5f83 [JS IR] Generate debug info for JS injections
Also, fix the JS parser to collect the "correct" debug info
(see the note in `translateJsCodeIntoStatementList`)

#KT-53361 Fixed
2022-08-22 23:15:52 +00:00
Sergej Jaskiewicz ea556ce428 [JS IR] Implement stepping tests for Kotlin/JS
We already have stepping tests for Kotlin/JVM.
They are helpful for testing the correctness of the generated
debugging information.

They are better than line number tests in that they allow to test the
_behavior_, not the generated data. The structure of the data may change
even if the behavior stays the same. For that reason, stepping tests
are more stable.
2022-07-19 16:06:23 +00:00
Sergej Jaskiewicz 53233c487e [JS] Factor out source map path rewriting 2022-06-16 10:02:05 +00:00
Artem Kobzar e790607af5 feat(KT-51123): save comments from js-function call inside arguments list. 2022-06-13 12:58:18 +00:00
Sergej Jaskiewicz 375c13cd7e [JS] Add a doc comment for SourceMapLocationRemapper 2022-05-26 16:32:06 +00:00
Artem Kobzar 8bc5508f5c fix(KT-52339): add newlines to SourceMap to calculate multiline comments in a right way. 2022-05-20 13:35:54 +00:00
Artem Kobzar 86df391cab fix: function body comments. 2022-04-11 14:25:47 +00:00
Artem Kobzar 672561b847 chore: remove unused import. 2022-04-11 14:25:47 +00:00
Artem Kobzar 45e3c94a8b feat: add limited support of comments inside js call. 2022-04-11 14:25:46 +00:00
Ilya Goncharov 611e70c254 rra/ilgonmic/js-fun-import
[JS IR] Test import.meta syntax

[JS IR] Add possibility to use import.meta

[JS IR] Check if import function-like returns Promise

[JS IR] Add test with import function syntax

[JS IR] Allow import function-like in js function

Merge-request: KT-MR-5948
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51125 fixed
2022-04-04 16:26:54 +00:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Dmitriy Novozhilov 3f5e6a79c7 Replace all throw error(...) with just error(...)
`throw` is not needed in this case, because `error(...)` already
  raises exception (so `throw` is unreachable). Also after previous
  commit compiler reports `UNREACHABLE_CODE` warning on such `throw`
2021-07-02 17:55:21 +03:00
Ilya Gorbunov e450a6494a Migrate deprecations in core, compiler, idea, tests
Replacing deprecated Char.toInt() with Char.code and
Number.toChar() with Number.toInt().toChar(), where Number is not Int.

KT-23451
2021-04-07 18:30:20 +03:00
Alexander Udalov 844b0078ba Minor, remove unneeded dependency of 'js.parser' on 'util' 2020-03-28 21:30:06 +01:00
Roman Artemev 46b98a1e98 [JS BE] Make sourceMap generation more precise
- Don't produce mapping for closing bracket in case of expressionBody
 - Map Kt*Function declaration into corresponding js fun declaration
 - Update test data & add new test
2019-07-24 18:56:40 +03:00
Anton Bannykh a3aca662c1 JS: improve json parsestring 2019-05-28 23:33:17 +03:00
Anton Bannykh 56915d1c07 JS: optimize JSON parser 2019-05-28 23:33:17 +03:00
Sergey Rostov 0f2fb4ff82 Build: remove intellijCore/annotations.jar usages 2019-01-28 13:43:08 +03:00
Sergey Rostov 883970fadb Add explicit dependencies to nullable annotations 2018-12-26 09:07:06 +03:00
Marcin Moskala 686cfa6fd2 Fix common misspellings 2018-12-21 16:13:42 +03:00
Alexander Udalov f868964e25 Fix most unchecked/deprecation javac warnings in compiler modules 2018-10-17 18:39:49 +02:00
Alexey Tsvetkov b0e8c85e88 Compare JS source maps in readable way in IC tests 2018-04-19 05:18:54 +03:00
Alexey Tsvetkov 8a82c1618c Use Plugins DSL in Kotlin Gradle scripts
When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).
2018-03-26 16:09:29 +03:00
Yan Zhulanow 34d1611ed4 Add Pill support to compiler and IDE modules 2018-03-02 03:15:17 +03:00
Ilya Chernikov 7e21573cf4 Convert the rest of the project to intellij repo prepared in buildSrc 2018-01-30 17:06:13 +03:00
Ilya Chernikov a4f28cd94f Make all dependencies to idea sdk intransitive 2018-01-30 17:06:11 +03:00
Ilya Chernikov 8266777bd5 Convert js modules to intellij plugin 2018-01-30 17:06:07 +03:00
Alexey Andreev 8514a7706f Remove json.org library, use own JSON parser to parse source maps 2017-11-29 20:08:29 +03:00
Alexey Andreev 729715ec62 Add simple JSON parser 2017-11-29 19:43:28 +03:00
Alexey Andreev a6e98c30d7 JS: fix crash when js function contains assignment with bad LHS
Fix KT-20905
2017-10-30 13:08:35 +03:00
Alexey Andreev cb0482f53e JS: fix crash when js function contains for statement w/o initializer
Fix KT-20898
2017-10-23 17:19:49 +03:00
Alexey Andreev 8cdef4139e Fix JS DCE removing reachable functions 2017-10-10 18:59:18 +03:00
Alexey Andreev 9008791a54 JS: generate paths in source maps relative to .map file location
See KT-19818
2017-10-06 15:24:25 +03:00
Alexey Andreev 27e319a279 JS: fix parsing of object literals in js() function.
Also, fix generation of source maps of content of js() function.

See KT-19794
2017-10-04 12:01:51 +03:00
Alexey Andreev 0269c3309a JS: fix parsing of wrong delete operation in js function.
See KT-15294
2017-09-29 14:32:49 +03:00
Alexander Podkhalyuzin 3f8170d369 Clean idea files generated on the gradle import, add them to .gitignore 2017-09-19 23:58:27 +02:00
Ilya Chernikov deda50dbbb Continue switching projects to improved dsl: sourceSets and test running 2017-09-19 21:37:26 +02:00
Ilya Chernikov 61dfb75e0e Implement Gradle Kotlin DSL build 2017-09-19 21:37:06 +02:00
Alexey Andreev c66bc0b0e9 Remap source maps in JS DCE. Improve JS DCE error logging
See KT-19821
2017-09-08 18:27:41 +03:00
Alexey Andreev 8c256b24dc Avoid duplication of imports introduced during JS inlining 2017-09-04 15:33:10 +03:00
Alexey Andreev 445a80c755 Support new JS inline function format in multi-module projects 2017-09-04 15:33:03 +03:00
Alexey Andreev 5a9adcca2d Improve performance of JS tests
* Do not read protos for descriptors of stdlib and kotlin-tests
  repeatedly
* Parse libraries lazily in inline, so that when no inline function
  exist in a test, we won't parse huge kotlin.js file
* Speed-up source map parser
2017-07-11 11:06:52 +03:00
Alexey Andreev 1e74325c52 Generated source map for JS function's closing curly bracket 2017-07-06 10:20:44 +03:00