Andrey Uskov
2adc851f1b
Don't use global state for keeping incremental compilation state
...
Previously IC state was stored in System properties. As result parallel
compilation might cause incorrect state of IC, what led to corruption
of kotlin_module files. Now IC state is stored via CompilerArguments
and CompilerConfiguration
#KT-46038 Fixed
2022-01-12 13:37:46 +03:00
Igor Yakovlev
82455c849d
[WASM] Lazy properties initialization
2022-01-05 13:12:32 +01:00
Dmitry Petrov
4ad6cfcf53
JVM_IR fix cast to not-null type
...
We can't rely on argument type nullability here, because it still can
hold an uninitialized value on JVM.
KT-50577 KT-35272 KT-27427
2021-12-30 13:41:17 +03:00
Alexander Korepanov
4a29a8a7af
[JS IR] Update an error on cross-module symbol redeclaration
...
The temporary solution for KT-50546.
The complete solution requires the understanding,
whether a cross-module symbol redeclaration is a valid case or not.
If the case is valid, the linker symbol table logic must be reworked.
2021-12-30 08:44:11 +00:00
Alexander Udalov
d5372521f1
Add tests for obsolete issues
...
#KT-12126
#KT-12189
#KT-23628
#KT-24209
#KT-34338
#KT-47279
#KT-48498
2021-12-29 17:07:03 +00:00
Dmitry Petrov
5946242d75
JVM_IR fix special bridges in mixed Java/Kotlin hierarchies
...
KT-50257 KT-50476
2021-12-29 13:29:19 +00:00
Anton Bannykh
1b631da3a0
[JS IC] fix cross-module nested class references and interface inheritance
...
^ KT-50528 fixed
2021-12-29 16:04:06 +03:00
Ivan Kylchik
6fc56477bf
Drop all tests that disable features for language version less than 3
2021-12-28 20:08:56 +03:00
Ilmir Usmanov
549ea1a3b9
If fun interface methods are already mangled, do not mangle them twice
...
There are two possible scenarios, when fun interface method with inline
class parameter can be compiled.
First is when we compile fun interface itself before SAM adapter. In
that case, fun interface is lowered before we lower SAM adapter. Thus,
its method is mangled and mangling in the second time is an error.
Second is when we compile SAM adapter before the fun interface. In that
case, fun interface is not lowered, and we have to mangle the method.
The only way to distinguish there two cases I can think of is to check
whether the overridden method is already mangled, in other words, check,
whether the overridden method's suffix is doubled.
#KT-48499: Fixed
2021-12-28 17:35:12 +01:00
Sergej Jaskiewicz
71732afae0
[JS IR] Copy JS artifacts to the build directory if the compiler crashes
...
Previously in 3fb1096c18 we've implemented
dumping the IR after each phase when running JS IR box tests.
However, because those dumps are saved to a temporary directory,
they can be lost in case we never make it to
`jsArtifactsHandlersStep` where files from that temporary
directory were copied to the `build/out` directory.
This could happen if, for example, the compiler crashed.
In that case, having IR dumps is even more useful, as they can help
investigate the crash.
Here we make `JsArtifactsDumpHandler` an `AfterAnalysisChecker` so that
it runs no matter what.
2021-12-28 14:42:04 +00:00
Roman Artemev
723ef8f1fb
[KLIB] Deserialize backing field initializers of const in IB-only mode
...
Missing const initializer leads to crash in property accessors inline
lowering during IC recompilation on JS.
- fix #KT-50512
- add test for JS IR IC
2021-12-27 23:43:43 +03:00
Ilya Kirillov
49e9c47071
Move DynamicTypeDeserializer.id from IR module to common module
...
So, it can be used from cls-psi-stub-builder module
2021-12-27 16:23:06 +03:00
Roman Artemev
4babc30624
[IR] Remove Persistent IR
2021-12-24 16:50:42 +03:00
Roman Artemev
353bfe9018
[JS IR] Cleanup pir IC code
2021-12-24 16:50:40 +03:00
Evgeniy.Zhelenskiy
610429a278
[Tests] Move non-value class test to the corresponding folder
2021-12-24 00:26:18 +00:00
Ilya Goncharov
52ccf3d6ec
[JS IR] Not export fun with stable name and default argument
...
if it is not exported, but just with stable name
^KT-50464 fixed
Merge-request: KT-MR-5324
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com >
2021-12-23 15:21:00 +00:00
Sergej Jaskiewicz
3fb1096c18
[JS IR] Support IR dump in JS tests
2021-12-22 17:55:33 +00:00
Anton Bannykh
4c33cb8016
[JS IR] IC: support per-module in K2JsIrCompiler
2021-12-22 10:14:33 +03:00
Anton Bannykh
ca60caa7e9
[JS IR] IC: pass through the main args
2021-12-22 10:14:32 +03:00
Anton Bannykh
aa628ae7b3
[JS IR] tests both per-module and regular mode
2021-12-22 10:14:08 +03:00
Anton Bannykh
95b5c44fba
[JS IR] IC: emit source maps
2021-12-22 10:13:07 +03:00
Anton Bannykh
4d8926cf26
[JS IR] IC: support per-module layout
2021-12-22 10:13:07 +03:00
Anton Bannykh
670572bbc6
[JS IR] IC: test private declarations with same names
2021-12-22 10:13:07 +03:00
Anton Bannykh
175d722097
[JS IR] save JsIrProgramFragment definitions
2021-12-22 10:13:07 +03:00
Dmitry Petrov
915e949dbc
JVM KT-49092 fix stack corruption in redundant boxing elimination
2021-12-22 05:32:26 +00:00
Roman Artemev
702ab3408b
[JS IC TEST] Add test case about renaming file in module
2021-12-21 18:07:57 +03:00
Roman Artemev
76b9167c15
[JS IC TEST] Add test case about moving file between modules
2021-12-21 18:07:57 +03:00
Roman Artemev
9b49f0eb70
[JS IC] Support deleted files in IC cache invalidator
...
- support them in test too
2021-12-21 18:07:56 +03:00
Roman Artemev
2ace13a904
[JS IC TEST] Support deleted files list in module step
2021-12-21 18:07:56 +03:00
Roman Artemev
2dd519c91f
[JS IC TEST] Add test case for moving inline functions between modules
2021-12-21 18:07:55 +03:00
Roman Artemev
2474702bef
[JS IC TEST] Add test case for private top-level inline functions
2021-12-21 18:07:54 +03:00
Dmitry Petrov
8905586cbb
IR KT-50258 rewrite enum-based 'when' more carefully
2021-12-21 06:06:45 +00:00
Alexander Korepanov
b82c306530
[JS IR] Add deep copying for callable reference
...
Perform a deep copy of callable reference adapter on inline lowering
^KT-49844 Fixed
2021-12-20 14:02:11 +00:00
Dmitry Petrov
976998b56c
PSI2IR KT-49526 function reference type approximation hack
2021-12-17 21:06:24 +00:00
Artem Kobzar
ab7615adaf
fix: fake override on interfaces.
2021-12-17 14:22:46 +00:00
Dmitry Petrov
0805916564
IR KT-47483 handle 'Nothing' in array constructor call
2021-12-17 13:43:59 +03: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
bc2f0936bd
Build: Rename commonDep -> commonDependency
2021-12-16 21:48:19 +03:00
Dmitry Petrov
8c71e38c92
JVM_IR KT-49765 bridge for throwing stub should just throw UOE
2021-12-16 21:07:12 +03:00
Victor Petukhov
e50e055eb4
[FE 1.0] Don't try to compute value parameters for variables while creating a flat signature for the overload resolution
...
^KT-50172 Fixed
2021-12-16 17:46:01 +03:00
Sergej Jaskiewicz
6dc69adcc9
[JS IR] Don't mark Char as a value class
...
Char will still be treated as a value class
(see JsInlineClassesUtils.kt)
2021-12-16 12:46:11 +00:00
Alexander Korepanov
f99b80c8d2
[JS IR] Add a test case with same names for private val
...
The test case checks, that KT-44728 has been already fixed
2021-12-16 10:59:01 +00:00
Victor Petukhov
b3943f5ab6
[FE 1.0] Process builder inference stub types with different nullability properly
...
^KT-49887 Fixed
2021-12-15 22:23:18 +03:00
Roman Artemev
fb84287ae0
[KLIB] Compute relative path instead of absolute if relative base is provided
...
- normalize path if required
- path it in JS/Native
- path null for JVM (temporary)
- fix build
2021-12-15 21:13:52 +03:00
Evgeniy.Zhelenskiy
ec2e96f3e4
Regenerate inline class tests as 1 arg value classes
2021-12-15 17:14:22 +00:00
Roman Artemev
312cbb6613
[JS IR IC] Add tests to check cache invalidation via fast path
2021-12-13 20:57:53 +03:00
Roman Artemev
b719865c25
[JS IR IC] Implement fast path invalidation check
...
Compute library md5 hash and check it first with cached one. If hashes
are equal it means that cache is up-to-date and no additional checks are
needed
- store library hashes (flat + trans) into cache info file
- change invalidator return value
2021-12-13 20:57:52 +03:00
Dmitry Petrov
e47871f98b
JVM_IR KT-50215 KT-50076 extra test
2021-12-13 20:34:57 +03:00
Ilya Goncharov
6adcbe081e
[JS IR] Consider erasing type parameters in return type in js signatures
2021-12-13 16:16:59 +00:00
Evgeniy.Zhelenskiy
b1d1f87318
[Tests] Introduce reversible source file preprocessor
2021-12-10 18:19:17 +03:00