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
Jinseong Jeon
a153a1fefb
FIR LC: create inline methods
...
unless the functions (or accessors) have reified type parameters
or inline-only annotations
2021-12-30 10:47:32 +03: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
Ivan Kylchik
493d9a49cb
Drop jmh benchmarks for light-tree2fir
...
These benchmarks are not used and interfere with FIR IDE plugin.
2021-12-29 16:23:12 +03: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
Alexander Udalov
9a9a8f1999
Restore support of language version 1.3
...
#KT-50251 Fixed
(cherry picked from commit a0004ed03adc9f50f26c8b11d178afcc2abf2a9c)
2021-12-28 13:21:18 +01:00
Alexander Udalov
92c80873ba
Revert "JVM: remove support for disabling NoConstantValueAttributeForNonConstVals"
...
This is a partial revert of e857966edb .
Specifically, behavior is restored in the old backend, which will allow
to support language version 1.3, where this language feature was not
enabled yet. There are no changes in the JVM IR backend, because to
enable JVM IR with LV 1.3, you need to pass the compiler argument
`-Xuse-ir` which is not stable and we don't guarantee anything about it.
#KT-50251
2021-12-28 13:21:18 +01: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
Victor Petukhov
29f174f074
Revert "Revert "Temporary workaround for failing tests on teamcity.""
...
This reverts commit 2c51799e0a .
2021-12-27 22:56:01 +03:00
Victor Petukhov
9c225c5b56
Revert "[Compiler CLI] Use LanguageVersion.LATEST_STABLE instead of KotlinVersion.CURRENT for java type enhancement settings to prevent dependency on kotlin version."
...
This reverts commit 0689d74353 .
2021-12-27 22:56:00 +03:00
Ilya Kirillov
62c9a7888b
Analysis: remove // FIR_COMPARISON form LC testdata as LC tests are moved from IJ
2021-12-27 16:23:21 +03:00
Ilya Kirillov
4e58dc3467
Fix small compilation problems in LC testdata which should not influence LC results
2021-12-27 16:23:21 +03:00
Ilya Kirillov
02f9f116b2
Analysis: ignore failing LC test
2021-12-27 16:23:20 +03:00
Ilya Kirillov
db31e0292c
Analysis: add LC testdata with current behaviour
2021-12-27 16:23:20 +03:00
Ilya Kirillov
0b3a0fd799
Analysis: fix LC test environment
2021-12-27 16:23:19 +03:00
Ilya Kirillov
40fdb26569
Analysis LC: introduce Symbol LC tests
2021-12-27 16:23:18 +03:00
Ilya Kirillov
aa87524513
Migrate stub and psi builders by classfiles form IJ repository
2021-12-27 16:23:16 +03:00
Ilya Kirillov
1e9764c639
Move stub building from psi module to analysis module
2021-12-27 16:23:14 +03:00
Ilya Kirillov
cd3905e400
Fix dependencies to intellij modules after gradle dependency DSL update
2021-12-27 16:23:13 +03:00
Ilya Kirillov
3779acbc3d
Add testdata from intellij for cls stub building tests and generate tests
2021-12-27 16:23:11 +03:00
Ilya Kirillov
02d68d7b12
Introduce cls stub building tests (mostly migrated from intellij)
2021-12-27 16:23:10 +03:00
Ilya Kirillov
127dc7670e
Move IDEKotlinBinaryClassCache from intellij
2021-12-27 16:23:10 +03:00
Ilya Kirillov
b222bf88a0
Move DirectoryBasedClassFinder and DirectoryBasedDataFinder from intellij
2021-12-27 16:23:10 +03:00
Ilya Kirillov
dbb3ebb8df
Implement AnnotationLoaderForClassFileStubBuilder
2021-12-27 16:23:09 +03:00
Ilya Kirillov
b9b0bb309d
Move KotlinClsStubBuilder from intellij repository
...
This commit is just move, without any modifications
2021-12-27 16:23:09 +03:00
Ilya Kirillov
52baf7338e
Move KotlinBinaryClassCache to separate module, so it can be used outside FE1.0
2021-12-27 16:23:08 +03:00
Ilya Kirillov
25fe14b514
Move PerformanceCounter to runtime utils, so it can be used outside FE1.0
2021-12-27 16:23:07 +03:00
Ilya Kirillov
3686fc109d
Extract AnnotationLoader from AnnotationAndConstantLoader, so it can be used without FE1.0
2021-12-27 16:23:07 +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
Ilya Kirillov
53346e0aa6
Merge KotlinFileStubImpl and KotlinFileStubForIde into KotlinFileStubImpl
...
as the only difference is additional fields in KotlinFileStubForIde
2021-12-27 16:23:05 +03:00
Ilya Kirillov
a9d7e5db72
Move stub builder stuff from intellij
...
This is mechanical moving without fixing compilation errors,
just packages are changes
2021-12-27 16:21:51 +03:00
Hung Nguyen
78f10d9142
KT-45777: Keep only package facades whose members are looked up
...
to reduce the size of the shrunk classpath snapshot further.
2021-12-25 00:20:31 +03:00
Hung Nguyen
9b96dbe2d2
KT-45777: Parse classes only once with ASM
...
to get both constants and inline functions.
Also add BasicClassInfo to ClassFileWithContents to simplify the code.
2021-12-24 18:31:49 +03:00
Hung Nguyen
9a995af0df
KT-44741: Improve handling of constants defined in companion objects
2021-12-24 18:31:49 +03:00
Hung Nguyen
a900f2b66d
KT-45777: Reorganize unit test data for classpath snapshot feature
...
to make it easier to add more tests in the next commits.
- Add unit tests for constants and inline functions
Also add tests for different kinds of Kotlin classes: CLASS,
FILE_FACADE, MULTIFILE_CLASS.
-Add unit test for nested classes
Also remove the existing integration test for nested classes to keep the
integration tests focused on the key scenarios while unit tests will
cover the corner cases.
Ignore inline functions that are private
2021-12-24 18:31:49 +03:00
Roman Artemev
93e7eb2a8e
[JS IR] Cleanup StageController & Lowerings magic a bit
2021-12-24 16:50:47 +03:00
Roman Artemev
7341a17a5d
[IR] Cleanup ir serialization
2021-12-24 16:50:44 +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
Victor Petukhov
d3ee284461
[FE 1.0] Check for readiness to fix for all type variables after try analysing a lambda with the builder inference
...
^KT-50498 Fixed
2021-12-24 13:37:45 +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
Mikhail Glukhikh
61e0375900
Drop YIELD_IS_RESERVED diagnostic in 1.7.0 #KT-27750 Fixed
2021-12-23 17:45:50 +03:00
Mikhail Glukhikh
0739925869
Drop QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE diagnostic in 1.7.0
...
#KT-49016 Fixed
2021-12-23 17:45:49 +03:00
Mikhail Glukhikh
f53cd22253
FIR: copy builder inference session when creating snapshot for locals
...
This commit fixes one builder inference case from KT-49925
2021-12-23 17:28:01 +03:00
Mikhail Glukhikh
3f02309dad
FIR: add example 2 from KT-49925 (fails yet)
2021-12-23 17:27:59 +03:00