Commit Graph

85871 Commits

Author SHA1 Message Date
Ilya Kirillov 5b38bd2be2 FIR IDE: fix generators after changing analysis api packages 2021-09-15 11:32:47 +02:00
Ilya Kirillov 99a65527b7 FIR IDE: fix symbol light classes imports after package changes 2021-09-15 11:32:45 +02:00
Ilya Kirillov 42f0536904 FIR IDE: move analysis api fir testdata to the analysis directory 2021-09-15 11:32:43 +02:00
Ilya Kirillov 4d52b354af FIR IDE: move analysis api fir generator to the analysis directory 2021-09-15 11:32:33 +02:00
Ilya Kirillov b43e664985 FIR IDE: move analysis api fir test sources to the analysis directory 2021-09-15 11:32:32 +02:00
Ilya Kirillov 5e9f807c78 FIR IDE: move analysis api fir main sources to the analysis directory 2021-09-15 11:32:30 +02:00
Ilya Kirillov 989f3248e4 FIR IDE: move low level api testdata sources to the analysis directory 2021-09-15 11:32:28 +02:00
Ilya Kirillov 633b0fa612 FIR IDE: move low level api test sources to the analysis directory 2021-09-15 11:32:25 +02:00
Ilya Kirillov b70f4f581e FIR IDE: move low level api main sources to the analysis directory 2021-09-15 11:32:22 +02:00
Ilya Kirillov 0c04ff98c3 FIR IDE: move analysis api to the analysis directory 2021-09-15 11:31:30 +02:00
Tianyu Geng 0996513f82 FIR: remove unused private property 2021-09-15 12:11:41 +03:00
Tianyu Geng dfc36ec614 FIR checker: ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_(ANNOTATION|FUNCTION) 2021-09-15 12:11:41 +03:00
Tianyu Geng e95de0a778 FIR checker: report type mismatch for named vararg arguement
ProhibitAssigningSingleElementsToVarargsInNamedForm is enabled from 1.3
so there is no need to make FIR accepting single element passed through
named arguments.

In addition, we may want to report only
ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_FUNCTION and not arg
type mismatch. But FE1.0 is reporting both so I am following it. If we
want to remove the redundant report, we will probably want to remove
FirNamedVarargChecker and report during resolution as a cone diagnostic.
2021-09-15 12:11:36 +03:00
Tianyu Geng 3708290ca3 FIR checker: fix NON_VARARG_SPREAD 2021-09-15 12:11:35 +03:00
Tianyu Geng ef80a8ebf6 FIR checker: createPrimitiveArrayType -> createPrimitiveArrayTypeIfPossible 2021-09-15 12:11:33 +03:00
Tianyu Geng b8b9502db4 FIR checker: fix ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_ANNOTATION
Currently this checker is missing `arrayOf` calls inside annotation.
2021-09-15 12:11:28 +03:00
Alexander Udalov 3ef9649344 Minor, fix test data of localVariables/suspend/mergeLvt.kt
It was incorrectly adapted (by me) in d07070e184.
2021-09-15 00:07:49 +02:00
Tianyu Geng 3c84fbcab1 IR: make calls with explicit singleton receiver tailrec [KT-48602] 2021-09-14 23:48:52 +03:00
Tianyu Geng 8525b4932b FIR Checker: check tailrec
Difference from FE1.0
* KT-4285: calls to virtual method with default argument should be
  reported as not tailrec. FE1.0 is missing such cases.
* KT-48600: calls inside lambda should be reported as not tailrec. FE1.0
  also misses such cases.
2021-09-14 23:48:50 +03:00
Alexander Udalov 5df316a129 Minor, rename module backend.jvm:backend.jvm.entrypoint -> backend.jvm.entrypoint 2021-09-14 22:29:13 +02:00
Alexander Udalov 7efc9dac9b JVM IR: extract lowerings to a separate module
Together with extracting codegen to a separate (unrelated) module in the
future, hopefully it'll speed up the build of JVM IR by making it more
parallel, and helping incremental compilation to avoid recompiling code
that depends on lowerings because of `implementation` dependency.
2021-09-14 22:29:12 +02:00
Alexander Udalov eee8b033a6 JVM IR: minimize usages of jvmPhases outside backend.jvm 2021-09-14 22:29:12 +02:00
Alexander Udalov b4c84aa2a6 JVM IR: move out bridge/collection lowering caches to separate files
Both BridgeLoweringCache and CollectionStubComputer are not tecnically
part of the lowerings, so they shouldn't be in the "lower" package.
2021-09-14 22:29:12 +02:00
Alexander Udalov 08cc789123 JVM IR: move out common utilities from lowerings
The main idea is to remove dependencies on lowerings from other
backend.jvm code (mainly codegen), with the hope of extracting lowerings
and codegen to separate unrelated modules in the future.

To achieve this, code which is used both in lowerings and codegen is
moved to the "common" code, mainly JvmIrUtils/JvmIrTypeUtils.
2021-09-14 22:29:12 +02:00
Alexander Udalov 36a3db44da JVM IR: slightly cleanup and split IrUtils.kt
- Move IrType-specific utilities to separate JvmIrTypeUtils.kt
- Extract JvmIrBuilder to a separate file
- Rename IrUtils.kt to JvmIrUtils.kt to be able to tell it apart from
  numerous other IR utils files
2021-09-14 22:29:12 +02:00
Alexander Udalov e857966edb JVM: remove support for disabling NoConstantValueAttributeForNonConstVals
This feature is enabled by default since 1.4, which is the earliest
language version supported by Kotlin at this moment.
2021-09-14 22:29:12 +02:00
pyos d07070e184 JVM_IR: avoid redundant accessors in private inline funs
Their call sites are all in the same file, so we can check whether the
declarations used in the inline function are accessible from all the
places where it will be inlined.

 #KT-48736 Fixed
2021-09-14 22:17:10 +02:00
Denis.Zharkov ef684c0dff FIR: Improve error reporting for EXPRESSION_EXPECTED_PACKAGE_FOUND 2021-09-14 19:13:47 +03:00
Denis.Zharkov 8f6ec42304 FIR: Drop unnecessary withIncrementedQualifierPartIndex 2021-09-14 19:13:46 +03:00
Denis.Zharkov 0923526162 FIR: Minor. Drop unused getWholeQualifierSourceIfPossible 2021-09-14 19:13:45 +03:00
Denis.Zharkov 8ff25825dd Minor. Extract obtainValueParametersFromResolvedLambdaAtom 2021-09-14 19:13:44 +03:00
Denis.Zharkov e3122d0c90 Minor. Extract transformAnonymousFunctionWithExpectedType 2021-09-14 19:13:42 +03:00
Denis.Zharkov 226893c648 FIR: Adjust test data to correct from FE 1.0 point-of-view behavior
^KT-38031 Related
2021-09-14 19:13:41 +03:00
Denis.Zharkov 6e6be7c953 FIR: Adjust test data
Currently, we've got two places where NO_COMPANION_OBJECT is reported
and they perform it kind of differently
2021-09-14 19:13:40 +03:00
Denis.Zharkov 9ca96ebbd2 FIR: Add FirVisibilityQualifierChecker 2021-09-14 19:13:39 +03:00
Denis.Zharkov 9575d4d242 FIR: Rework qualifier-in-expression resolution
Get rid of stateful FirQualifiedNameResolver
Resolve a.b.c-like calls step-by-step using just recursion

^KT-48363 Fixed
2021-09-14 19:13:38 +03:00
Denis.Zharkov 69f7c2278d FIR: Simplify resolution for qualifier receiver
Seems there's no need anymore in ClassifierPrioritized group
2021-09-14 19:13:36 +03:00
pyos 9fa3e2eb13 FIR: always load parents of nested classes first 2021-09-14 19:00:48 +03:00
pyos 032cf5a892 FIR: JavaSymbolProviderWrapper -> JavaSymbolProvider 2021-09-14 19:00:47 +03:00
pyos 30c8fa89f6 FIR: rename JavaSymbolProvider to JavaClassConverter 2021-09-14 19:00:46 +03:00
pyos 3a80cb1808 FIR: hide construction of JavaSymbolProvider 2021-09-14 19:00:45 +03:00
pyos 8ff79e002e FIR: load parents of Java inner classes first, as before 2021-09-14 19:00:44 +03:00
pyos cac0cf6a50 FIR: join KotlinDeserializedJvmSymbolsProvider and JavaSymbolProvider
This allows reusing class finder results.
2021-09-14 19:00:43 +03:00
Nikolay Lunyak 0181c80ddb [FIX] Add some more tests 2021-09-14 18:42:27 +03:00
Nikolay Lunyak d7e00a5907 [FIX] Fix error types 2021-09-14 18:42:26 +03:00
nataliya.valtman 130fd8311e KT-48620: add readable output size metric into build scan 2021-09-14 17:56:11 +03:00
Alexander Shabalin 0b431d5ea5 [K/N] Link GC triggers issue 2021-09-14 14:00:46 +00:00
Alexander Shabalin d03a7993ed [K/N] Implement GCScheduler 2021-09-14 13:53:36 +00:00
Ilya Kirillov a8d321db63 FIR IDE: do not use FE1.0 compiler jars in frontend-independent-modules 2021-09-14 14:45:43 +02:00
Ilya Kirillov da962895a8 Split compiler-for-ide jar into multiple jars
Needed for IDE to gradually control which plugin (FE1.0, FIR) on which jar may depend

Jars: Common, IR, FIR FE1.0 and PSI
2021-09-14 14:45:41 +02:00