Sergej Jaskiewicz
1d0025c3cf
[JS] Support the 'names' field in sourcemaps
2022-10-14 10:09:39 +00:00
Sergej Jaskiewicz
227864c6ec
[JS IR] Add a compiler option for generating name entries in sourcemaps
2022-10-14 10:09:39 +00:00
Sergey Bogolepov
6a4722188f
Extract SameTypeNamedCompilerPhase from NamedCompilerPhase
...
Currently, compiler pipelines are heavily couples with
NamedCompilerPhase. Unfortunately, NamedCompilerPhase uses the same
type for Input and Output, thus it is not applicable to phases that
try to transform some data purely.
Thus, we separate this class into two, allowing to have a new
inheritor of NamedCompilerPhase with different Input and Output types.
2022-10-13 08:25:26 +00:00
Sergey Bogolepov
e1f2b89875
Untie Symbols class from CommonBackendContext
...
`Symbols.context` property is actually unused. Let's drop
it as it makes harder to create an instance of this class.
2022-10-13 08:24:11 +00:00
Artem Kobzar
de880ce9aa
[K/JS] Move ES modules logic to a new transformer with IC
2022-10-13 07:32:44 +00:00
Sergey Bogolepov
54deba63a1
Use PhaseConfigurationService in CompilerPhase instead of PhaseConfig
2022-10-13 06:39:39 +00:00
Alexander Korepanov
7b2c125754
[JS IR] Update IC depends graph after intrinsics loading
...
- Remove unused params from compilerWithIC wrapper.
- Move JsIrBackendContext creation logic into separate function
- Introduce and use compiler interface for IC infrastructure
On dirty rebuild we may reload IR from stdlib,
such reloading may affect files with intrinsics and builtins.
As soon as we load only exported symbols, we must track dependencies
for files with intrinsics or builtins as for others.
This patch implements the logic which updates dependencies for
the stdlib files after loading of intrinsics and builtins.
^KT-54323 Fixed
2022-10-12 22:14:15 +00:00
Anton Bannykh
9342356c38
JS IR: fix type checks for suspend function descendants (^KT-54382 fixed)
...
Consider `class A : suspend () -> Unit {}`. Type checks such as `is A`
are now performed via a regular `instanceof` check instead of the special
checks for suspend lambdas.
2022-10-12 17:38:23 +00:00
Alexander Korepanov
89d3060e00
[JS IR] Drop unused JsRecordExtractedLocalClasses logic
2022-10-06 11:56:06 +00:00
Alexander Korepanov
86c72a5b9e
[JS IR] Drop unused all export collecting logic
2022-10-06 11:56:06 +00:00
Artem Kobzar
574d774277
[K/JS] Remove illegal chars from the new js-minimal-stdlib path
2022-10-03 15:59:07 +00:00
Leonid Startsev
ccdb6fc599
Fix .equals for instantiated annotations with unsigned array types.
...
#KT-53876 Fixed
2022-10-03 13:54:06 +00:00
Artem Kobzar
eb2326eabb
[K/JS] Add ability to exclude declarations from export by a new annotation @JsExport.Ignore.
2022-10-03 11:07:25 +00:00
Pavel Kunyavskiy
8886e1b8b4
Move Js suspend functions lowerings to common code
2022-09-30 08:48:57 +00:00
Ilya Goncharov
7d8636aac4
[JS] Keep interfaces
...
^KT-54173 fixed
2022-09-29 16:12:19 +00:00
Alexander Korepanov
252dc01dd5
[JS IR] IC: Propagate dependencies from nested declaration to parent
...
JsIrLinker can't load nested declarations,
therefore it is required to load their parent.
This patch adds a dependency in the incremental cache graph
between nested declaration user and nested declaration parent.
^KT-53931 Fixed
^KT-54120 Fixed
2022-09-27 15:27:20 +00:00
Ilya Goncharov
eed994f1fe
[Gradle, JS] Correct require relative path
2022-09-21 10:58:20 +00:00
Ilya Goncharov
d203dc35bf
[JS IR] Add to IR keep possibility similar to legacy-dce one
...
It helps to:
- keep declarations even if they are not reachable and not exported
- not minify names of not exported declarations
Compiler argument: -Xir-keep=A,B
Can be used for top-level declarations or for member
^KT-54118 fixed
2022-09-20 16:06:17 +00:00
Artem Kobzar
73e7053c35
[K/JS] Use only single variant of default arguments function wrapper for exported and not-exported functions
2022-09-19 17:49:04 +00:00
Artem Kobzar
a368fc37c7
[K/JS] Make interface subtyping faster and lighter.
2022-09-19 10:26:11 +00:00
Alexander Korepanov
639af77b91
[JS IR] Invalidate IC cache after modifying language settings
...
^KT-54010 Fixed
2022-09-16 07:19:20 +00:00
Alexander Korepanov
dd7d669464
[JS IR] Use jsOutputName for module naming when IC is enabled
...
^KT-53986 Fixed
2022-09-16 07:19:20 +00:00
Alexander Korepanov
1003e4f1e1
[JS IR] Remove unused function
2022-09-16 07:19:19 +00:00
Dmitriy Dolovov
e4556ecc0d
[IR] User-friendly message about unexpected unlinked symbols
...
^KT-53649
2022-09-13 17:12:13 +00:00
Artem Kobzar
da367a467d
[K/JS] chore: stop unnecessary defineProperties generating.
2022-09-09 11:14:26 +00:00
Sergej Jaskiewicz
9176ba5b2d
[JS IR] Don't set fileIdentity when embedding sources into sourcemaps
...
(see the comment)
2022-09-09 11:02:26 +00:00
Sergej Jaskiewicz
7874b1fcad
[JS] Rename JsLocation.identityObject to fileIdentity
2022-09-09 11:02:25 +00:00
Sergej Jaskiewicz
b9cac8a4ca
[JS IR] Support the sourceMapEmbedSources setting (partially)
...
This doesn't work with external libraries yet (including stdlib).
2022-09-09 11:02:25 +00:00
Alexander Korepanov
453faeaa45
[JS IR] Memory consumption optimization
...
- Remove IR after JS AST generation
- Remove JS AST after/during JS code generation
2022-09-05 11:15:55 +00:00
Alexander Korepanov
c747d0e742
[JS IR] Optimize JS AST blocks memory consumption
2022-09-05 11:15:54 +00:00
Alexander Korepanov
ea34e10b67
[JS IR] Optimize JS AST scopes memory consumption
2022-09-05 11:15:54 +00:00
Alexander Korepanov
bf53273b84
[JS IR] Cache JsLocation objects and js function signatures
...
Memory consumption optimization
2022-09-05 11:15:53 +00:00
Alexander Korepanov
ff2f16190d
[JS IR] Minor: eliminate unused vals
2022-09-05 11:15:53 +00:00
Artem Kobzar
0bb0be8703
feat(KT-48814): represent all of the external declarations nullable properties as an optional fields inside d.ts.
2022-09-02 10:50:20 +00:00
Nikolay Krasko
cfc013137e
Fix compile error
...
Introduced in 43ce805499
2022-08-29 21:58:57 +02:00
Artem Kobzar
8b826a865b
[K/JS, K/WASM] feat(Enum.entries): add support of new enum static field for JS and WASM.
2022-08-29 16:04:12 +00:00
Artem Kobzar
dbda8dcad1
[K/JS] test: add @file:JsExport tests for each @JsExport test + auto-generate TypeScript export tests.
2022-08-26 09:51:59 +00:00
Sergej Jaskiewicz
5f913b5595
[JS IR] Remove unused CALLABLE_CLOSURE_DECLARATION declaration origin
2022-08-22 23:15:52 +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
a152bc2313
[JS IR] Don't parse/print JS code in js() call twice
...
#KT-51327 Fixed
2022-08-22 23:15:52 +00:00
Alexander Korepanov
28c83e43ad
[JS IR] Performance fixes for the IC infrastructure
2022-08-19 09:38:09 +00:00
Ilya Gorbunov
98ebad2d75
Implement JS-IR intrinsic for rangeUntil builtin member operator #KT-52933
2022-08-18 19:15:27 +00:00
Artem Kobzar
8e17c39cc9
[K/JS] fix(KT-53569): skip double traversing for nested annotation classes.
2022-08-18 16:39:48 +00:00
Pavel Kunyavskiy
5034581788
[K/N] Fix references for inline function
...
Corresponding lowering creating wrappers from JS Backend was used.
Also, the lowering was changed to create local function, instead of
normal one in outer scope, as a lot of logic from local declarations
lowering should be duplicated otherwise for correct type parameters
handling.
^KT-38535
2022-08-18 13:23:10 +00:00
Vsevolod Tolstopyatov
93f17a2b86
[FIR] Support static getters along with fake Enum.entries declaration in FIR
...
#KT-48872
2022-08-12 09:35:18 +00:00
Artem Kobzar
87038e7d8a
[K/JS] feat: add logic under the flag for strict implicit export generating inside d.ts files.
2022-08-09 16:48:59 +00:00
Artem Kobzar
b9a80284c8
[K/JS] fix(TS): save type hierarchy for exported classes.
2022-08-03 14:16:30 +00:00
Artem Kobzar
fb32af1c02
[K/JS] feat: eliminate usage of kotlin.reflection if there is just raw js class usage.
2022-07-29 14:22:19 +00:00
Artem Kobzar
b9189be728
[K/JS] fix(KT-46643): prevent removal of setter for overridden external field.
2022-07-29 12:41:17 +00:00
Alexander Korepanov
caa1570e25
[JS IR] Fix clashes between bridge and delegated function call
...
The patch fixes the js function signature rules to avoid clashes
between bridge and delegated call. Use overridden symbols dfs of
JsName annotation in order to get the correct bridge name.
^KT-52968 Fixed
2022-07-28 14:41:47 +00:00