Steven Schäfer
6af616d3c3
FIR: make declarations marked with 'override' implicitly open
...
#KT-52236 Fixed
2022-12-14 21:46:41 +00:00
Sergej Jaskiewicz
9c6f92d697
[test] Add a test for KT-55318
2022-12-13 17:01:00 +00:00
Evgeniy.Zhelenskiy
f09fb5ed09
[IR] Enable tests for inline classes secondary constructors with body for not JVM
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-55333
2022-12-11 22:06:47 +01:00
Vyacheslav Gerasimov
ba81bd052f
Build: Include missing tests in jsTest, jsIrTest, jsFirTest tasks
...
Some tests were included only in common :js:js.tests:test task and
missing in specialized test tasks (jsTest, jsIrTest, jsFirTest)
2022-12-09 20:42:08 +01:00
Vyacheslav Gerasimov
7d0935a8c5
Build: Refactor :js:js.tests:runMocha task
...
Introduce separate mochaTest task without dependency on test task
2022-12-09 20:42:07 +01:00
Dmitriy Novozhilov
3cffb33ab7
[FE] Drop ApproximateIntegerLiteralTypesInReceiverPosition language feature
...
This feature is not needed because it is unconditionally disabled for K1
(because of not fully correct implementation) and unconditionally enabled
in K2 (K2 does not support old behavior)
^KT-38895
2022-12-09 15:10:02 +00:00
Dmitriy Novozhilov
5d6cb2b691
[Test] Use IrPluginContext for searching declarations for DUMP_EXTERNAL_CLASS check
2022-12-09 12:02:07 +00:00
Zalim Bashorov
49c3ba33f1
[Wasm] Add a basic end-to-end sourcemap generation in wasm backend
...
More constructions/instructions will be supported separately.
2022-12-08 12:44:26 +00:00
pyos
0d46dfc1ba
FIR: fix substitution of type arguments in SAM type aliases
...
^KT-54730 Fixed
2022-12-07 22:09:20 +00:00
Alexander Korepanov
9edaebf235
[JS IR] Enable DTS generation in IC
...
^KT-54398 Fixed
2022-12-07 18:05:53 +00:00
Alexander Korepanov
d21cbfe02e
[JS IR] Take into account the declaration annotations in IC hash
...
So the annotation modifications invalidate the caller.
2022-12-07 18:05:53 +00:00
Alexander Korepanov
0a35d84193
[JS IR] DTS generation refactoring
...
Keep a DTS fragment in JsIrProgramFragment
for each file and build the module DTS from them.
2022-12-07 18:05:52 +00:00
Zalim Bashorov
54c00cc588
[Sourcemap] Add an ability to provide outputColumn to SourceMap3Builder#addMapping instead of using getCurrentOutputColumn
...
The ability will be used later by wasm backend while generating sourcemap.
2022-12-07 12:03:54 +00:00
Zalim Bashorov
fb4dcc6a6a
[Sourcemap] Introduce getCurrentColumn and stop using TextOutput directly
...
The general goal is remove dependency on TextOutput and
make it simpler to use for wasm backend.
2022-12-07 12:03:54 +00:00
Zalim Bashorov
e34d3d09bc
[Sourcemap] Extract addLink from SourceMap3Builder as a addSourceMappingURL
...
The general goal is remove dependency on TextOutput and
make it simpler to use for wasm backend.
2022-12-07 12:03:54 +00:00
Alexander Korepanov
d8ab9498ab
[JS IR] Fix inline functions call graph in IC
...
Add a dependency for inline function references,
because in some cases the references may be inlined.
^KT-55144 Fixed
2022-12-02 13:50:37 +00:00
Alexander Korepanov
c31705240a
[JS IR] Support a module friendship in IC infrastructure
...
^KT-55097 Fixed
2022-12-02 13:50:36 +00:00
Sergej Jaskiewicz
1539d7ef1a
[klib] Bring package names in sync with the directory layout
...
Basically, some package names were Native-specific, whilst the packages
themselves were not Native-specific at all. This was already reflected
in the directory layout, but not in the package names.
This is fixed here.
NFC, just an automatic rename of packages with fixes of imports.
2022-12-01 21:46:43 +00:00
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
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
Sergej Jaskiewicz
aa1b18b0c8
[IR] Prevent infinite recursion when rendering bound symbol references
...
Refactor the renderer, make BoundSymbolReferenceRenderer a static class
to prevent calling RenderIrElementVisitor's methods from it to avoid
infinite recursion in the future.
^KT-52677 Fixed
2022-11-28 16:43:53 +00:00
Alexander Korepanov
9fcd185141
[JS IR] Set kotlin.js.test.root.out.dir for IC tests
...
Property kotlin.js.test.root.out.dir is required for
JS IR IC tests, otherwise they can't be run from IDEA.
2022-11-28 16:13:10 +00:00
Vladislav Grechko
cd6e865fb3
Improve support of 'lateinit' modifier
...
- Allow 'lateinit' for inline classes which underlying type
is suitable for 'lateinit'
- K2: report all problems related to 'lateinit' modifier
^KT-55052: Fixed
2022-11-24 19:47:21 +00:00
vladislav.grechko
e0c13e5276
Fix addAll & putAll invocations on inline mutable collections
...
^KT-54950: Fixed
2022-11-24 19:27:42 +00:00
Artem Kobzar
ad78f27cce
[K/JS] Fix problem with dynamic return type inside coroutine
2022-11-23 21:33:56 +00:00
Anton Bannykh
e42385dfb0
JS tests: split fir, ir, and legacy tests
...
Also split write FIR output to separate folders
2022-11-23 11:01:13 +00:00
Anton Bannykh
f99d480bf8
JS: move DCE test output to build/ dir
2022-11-23 11:01:13 +00:00
Anton Bannykh
56765461a0
WASM: move output to build/ dir
2022-11-23 11:01:12 +00:00
Ilya Kirillov
28ff475dd6
Fix binary compatibility with android plugin for org.jetbrains.kotlin.platform.js.isJs
2022-11-22 21:04:09 +00:00
Artem Kobzar
725a224f74
[K/JS] Make available transitive reexport for ES modules
2022-11-18 16:54:10 +00:00
Sergej Jaskiewicz
becbc06663
[JS] Re-enable some stepping tests
2022-11-18 10:37:58 +00:00
Sergej Jaskiewicz
932e1a3c1d
[JS] Re-run stepping tests if they fail because of a Node crash
...
KT-54283
2022-11-18 10:37:58 +00:00
Anton Bannykh
e6801abce8
JS IR: move IC tests output to build/ dir
2022-11-17 09:24:54 +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
Alexander Korepanov
f7063555ca
[JS IR] Fix the instability of LoweredDeclarationSignature
...
A suspend stub for the abstract function
may be created in the context of the child function.
If on an incremental rebuild the stub is created from
the parent context (e.g. a file with the child is not modified),
the resulting LoweredDeclarationSignature will be different.
It will lead to a broken cross-module reference and broken JS code.
Therefore it is required to wrap the creation routine
into StageController::restrictTo() explicitly.
^KT-54934 Fixed
2022-11-16 12:24:48 +00:00
Jaebaek Seo
1a5a6474d6
Support TargetPlatform.isJs() for FIR
2022-11-15 16:50:17 +01:00
Svyatoslav Kuzmich
78bd6dbdcd
[Wasm] Allow implementing function interfaces
2022-11-14 11:23:18 +01:00
Ilya Chernikov
b28dd95621
FIR JS: rename test classes for uniformity
2022-11-12 16:28:25 +01:00
Ilya Chernikov
c3197491a0
FIR JS: temporarily mute failing box tests
2022-11-12 16:28:25 +01:00
Ilya Chernikov
78ca733c38
FIR JS: add K2 variants of all other JS tests
...
except tests that are not possible to add without some modifications in
the test infra. See todos on the commented-out test declarations
2022-11-12 16:28:24 +01:00
Ilya Chernikov
5baf4a55c1
FIR JS: fix nodejs box tests infrastructure
2022-11-12 16:28:24 +01:00
Ilya Chernikov
4e4511bba2
FIR2IR: convert enums with non-primary default ctor correctly
...
see added test for example
2022-11-12 16:28:24 +01:00
Ilya Chernikov
44cce3ad52
FIR JS: mute remaining tests for now
2022-11-12 16:28:23 +01:00
Ilya Chernikov
5b3816cce5
Test infra: refactor IGNORE_BACKEND directive
...
treat it as a general one, introduce *_K1 and *_K2 variants for
more specific ignoring
2022-11-12 16:28:23 +01:00
Ilya Chernikov
e1d19516e8
[minor] fix import statement position in testdata
...
the import statement is (should be) ignored before FILE directive
2022-11-12 14:34:07 +01:00