Artem Kobzar
3f4a937ad6
[K/JS] Don't generate TypeScript definitions from ExportModel if the -Xgenerate-dts flag was not provided ^Fixed KT-53940
2022-12-01 15:47:08 +00:00
Artem Kobzar
0f0421ea3d
[K/JS] Generating TypeScript definitions for exceptions and rest of the types ^Fixed KT-53940
2022-12-01 15:01:24 +00:00
Evgeniy.Zhelenskiy
9f01ccc304
[IR] Support user-defined equals for MFVC
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:36 +00:00
Artem Kobzar
67048151fb
[K/JS] Change js-call inlining strategy and + ability to referencethis safely from the js call ^Fixed KT-54134
2022-11-30 11:43:22 +00:00
Alexander Korepanov
693258ae91
[JS IR] Invalidate all klib dependencies after removing it
...
Without the invalidation, broken JS code
(with broken cross-module references) may appear.
^KT-54911 Fixed
2022-11-28 20:46:40 +00:00
Alexander Korepanov
ca19d71a00
[JS IR] Commit cache header after lowering
...
Commiting cache header before lowering may
break caches in case of lowering errors.
^KT-54912 Fixed
2022-11-28 20:46:40 +00:00
Alexander Korepanov
8cde0a81bc
[JS IR] Use topological order for loading klibs in JS IR IC
...
Generally, the library order doesn't matter.
However, after lowering we need to post process
lowered klibs in topological order:
- commit incremental cache artifacts,
- produce JS AST.
The patch uses an ability of the Kotlin library resolver to load klibs
in topological order and drops its reimplementation from IC infrastructure.
There is one side effect:
klibs which are not reachable from the main module, will produce their JS.
This should be more correct than just ignoring them.
2022-11-28 20:46:39 +00:00
Alexander Korepanov
ec6a7094e6
[JS IR] Manage cache root dir from IC cache updater
...
- pass cache root directory instead of dir list
- manage klib cache dirs from cache updater
2022-11-28 20:46:39 +00:00
Alexander Korepanov
c7589245c4
[JS IR] Minor IC refactoring
...
Move metadata classes from cache updater to separate file.
2022-11-28 20:46:38 +00:00
Ilya Chernikov
4af32b8d36
K2 Scripting, IR: non-class based scripts support in IR
2022-11-26 18:01:49 +00:00
Artem Kobzar
ad78f27cce
[K/JS] Fix problem with dynamic return type inside coroutine
2022-11-23 21:33:56 +00:00
Artem Kobzar
725a224f74
[K/JS] Make available transitive reexport for ES modules
2022-11-18 16:54:10 +00:00
Alexander Korepanov
f4b5f5ff5d
[JS IR] Take default params into account for calculating an IC hash
...
^KT-54895 Fixed
2022-11-16 12:25: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
Alexander Korepanov
d5a73a5df1
[JS IR] Return JsIrProgramFragment generators instead of ready objects
...
It allows to free IrFile objects on flight
right after the JsIrProgramFragment producing.
2022-11-08 15:18:45 +00:00
Alexander Korepanov
4aaae5347a
[JS IR] Allow IC metadata to be freed before the lowering
2022-11-08 15:18:45 +00:00
Alexander Korepanov
5b70d39bd0
[JS IR] Move id signature functions into a separate file
2022-11-08 15:18:44 +00:00
Alexander Korepanov
c0a1fa6f98
[JS IR] Move the JS AST serialization right before the IC data committing
...
It allows not to keep the binary representation in memory
2022-11-08 15:18:44 +00:00
Alexander Korepanov
eb781168b8
[JS IR] Move an IC IR loading process into a separate function
2022-11-08 15:18:44 +00:00
Alexander Korepanov
95e305be3a
[JS IR] Simple memory optimizations
...
- Use hash maps and hash sets instead of linked implementations
- Use weak hash maps for caches with IR elements as keys
- Intern JS function signatures
2022-11-08 15:18:43 +00:00
Alexander Korepanov
731dd9c3e8
[JS IR] More detailed time measurement for the IC infrastructure
2022-11-08 15:18:43 +00:00
Alexander Korepanov
cb7df4d428
[JS IR] IrModuleToJsTransformerTmp.kt -> IrModuleToJsTransformer.kt
2022-11-07 17:57:41 +00:00
Alexander Korepanov
041e755c70
[JS IR] Cleanup BackendContext flags
2022-11-07 17:57:41 +00:00
Alexander Korepanov
4d37c1d49c
[JS IR] Drop generateScriptModule flag from Merger class
2022-11-07 17:57:41 +00:00
Alexander Korepanov
f1bce9fad4
[JS IR] Drop StableNamesCollector.kt
2022-11-07 17:57:40 +00:00
Alexander Korepanov
99e93258cd
[JS IR] Drop NameTables class
2022-11-07 17:57:40 +00:00
Alexander Korepanov
43fbb0ba3e
[JS IR] Drop IrNamerImpl.kt
2022-11-07 17:57:39 +00:00
Alexander Korepanov
7b8bd47b1a
[JS IR] Drop MultiModuleSupport.kt
2022-11-07 17:57:39 +00:00
Alexander Korepanov
05395f716c
[JS IR] Drop old IrModuleToJsTransformer
2022-11-07 17:57:39 +00:00
Alexander Korepanov
d17794481d
[JS IR] Replace IrModuleToJsTransformer with IrModuleToJsTransformerTmp
2022-11-07 17:57:38 +00:00
Sergej Jaskiewicz
ba7f5afebe
[JS IR] Generate debug info for catch parameters
...
We will need it to generate original names for catch parameters in
sourcemaps.
Also, don't generate redundant debug info for compiler-generated
exception handling control flow operators.
See the doc comment to the MultipleCatchesLowering class
#KT-46276
2022-11-02 13:14:01 +00:00
Sergej Jaskiewicz
871d445b4e
[JS IR] Generate debug info for global property initializers
2022-11-02 13:14:01 +00:00
Sergej Jaskiewicz
4ae03ea74a
[JS IR] Improve debug info for if and when statements
...
#KT-46276
2022-11-02 13:14:01 +00:00
Sergej Jaskiewicz
ccbb2a08a0
[JS IR] Improve debug info for functions with default parameters
...
Don't generate unnecessary mappings so that the user doesn't need to
step in many times to get where they want
#KT-46276
2022-11-02 13:14:00 +00:00
Sergej Jaskiewicz
43c5c8b44f
[JS IR] Fix debug info for Char, Long, and unsigned integer literals
...
Map class constructor calls to the literals they were generated
from.
#KT-46276
2022-11-02 13:13:59 +00:00
Sergej Jaskiewicz
512a2bfd7a
[JS IR] Improve debug info for callable references and lambdas
...
#KT-46276
2022-11-02 13:13:59 +00:00
Sergej Jaskiewicz
fe0e9db3aa
[JS IR] Generate debug info for JS switch statements
...
#KT-46276
2022-11-02 13:13:59 +00:00
Sergej Jaskiewicz
b2b7958b62
[JS IR] Generate debug info for secondary constructors
...
#KT-46276
2022-11-02 13:13:58 +00:00
Sergej Jaskiewicz
ec18dce7cb
[JS IR] Improve debug info for suspend functions
...
- Map generated explicit Unit returns to the closing brace of
the original body
- Name the continuation parameter as `$completion` to match the JVM BE,
and generate debug info for it (so that it appears in the 'names'
array in sourcemaps)
- Don't generate debug info for coroutine instantiation ceremony
(so that the user doesn't need to step in many times to get where they
want)
#KT-46276
2022-11-02 13:13:58 +00:00
Igor Yakovlev
97123e9959
[WASM] Emit when expression in more canonical way (subject first for equals expression)
2022-11-01 13:15:12 +00:00
Igor Yakovlev
346b2f162c
[WASM] Optimize varargs without spreads
2022-11-01 13:15:11 +00:00
Igor Yakovlev
8d8430cde7
[WASM] Remove unnecessary boxing/unboxing
2022-11-01 13:15:10 +00:00
Ilya Goncharov
36935702b9
[JS IR] Make cast in bridge nullable in case of default parameter method
2022-10-31 16:08:25 +00:00
Sergej Jaskiewicz
6a40a7e471
[JS IR] Don't forget to enable lazy property initialization
2022-10-27 11:27:59 +00:00
Ilya Goncharov
fd5fba6f09
[JS IR] Fix case with bridge with nested classes
...
^KT-54686 fixed
2022-10-26 12:56:03 +00:00
Alexander Korepanov
2e48557a0d
[JS IR] Update hashing in IC infrastructure
...
The patch should reduce possible collisions
2022-10-26 10:54:37 +00:00
Artem Kobzar
ea6b784e41
[K/JS] Exclude Enum.entries property from export to JS
2022-10-21 10:31:06 +00:00
Dmitriy Dolovov
460e21c7bc
[IR][JS] Partial linkage: Enable PL for IR IC compiler
2022-10-19 13:46:22 +00:00
Dmitriy Dolovov
15635482aa
[IR] Partial linkage: Enable it by just passing a boolean flag to IR linker constructor
2022-10-19 13:46:22 +00:00
Artem Kobzar
7b9aed25da
[K/JS] Add the ability to turn off polyfills generating
2022-10-19 12:52:23 +00:00