Commit Graph

98390 Commits

Author SHA1 Message Date
Kirill Rakhman efc957586d FIR: Report EXPLICIT_DELEGATION_CALL_REQUIRED in some missing cases
^KT-55877 Fixed
2023-01-27 12:26:51 +00:00
Ivan Kylchik 91f68f0e17 Fix bug with wrong cast in CommonProxy 2023-01-27 10:52:56 +00:00
Ivan Kylchik bc21753877 Move IR interpreter's tests from ir/loweredIr directory into box 2023-01-27 10:52:56 +00:00
Ivan Kylchik 7d6bac64fb Extract JVM logic of AbstractIrInterpreterTest into separate class 2023-01-27 10:52:54 +00:00
Ivan Kylchik 13cad2a820 Don't save constant value for non-resolved array expression in K1
#KT-55912 Fixed
2023-01-27 09:56:35 +00:00
Yahor Berdnikau 8fcea399f9 Fix double call to get files from FileCollection
^KT-54588 Fixed
2023-01-27 09:29:16 +00:00
Yahor Berdnikau fda4ff177d Add missing javadoc and sources jar publication
That was missed during 92509ad400 on
adding commit.
2023-01-27 09:22:03 +00:00
Anna Kozlova e5b96561e0 [FIR] skip implicit call to enum constructor if super type call exists
otherwise, reference to the super type would be resolved even when it's not
e.g. for interface constructor
^ KTIJ-24437
2023-01-27 08:20:07 +00:00
Aleksei.Cherepanov 07d369998c [Maven] Add test for the fix of illegal reflective access while using jdk17
IJ-203 dependency has illegal reflective access usage, which is prohibited without a special flag since JDK17. Specific reflect usage was fixed on the IntelliJ side (IDEA-31024). After the new IC was present in 1.8.0, this problem shows up on modules with a large number of source files in Maven projects. During the incremental compilation, FileSnapshotMap is filled up with paths to files as keys, so in the test, we generate a lot of source files with long names. If there are a lot of files to compile, a key chunk with paths overflowed and drops the current chunk to the disk, after that PersistentHashMap caches FilterOutputStream and uses illegal reflective access.
Closing caches after the first IC attempt fix this problem:
`63a0660c` IC: Close caches before falling back to non-incremental compile
`908dbf32` IC: Clean up closing caches logic in IncrementalCompilerRunner.kt
authored by Hung Nguyen
This commit should be reverted after the update of IJ dependency (KT-47765)

#KT-55709 Fixed

Merge-request: KT-MR-8359
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-01-27 07:26:17 +00:00
Ilya Gorbunov b558382f17 Cleanup unneeded options in kotlin-stdlib-jdk7/8 compilations 2023-01-26 20:57:00 +00:00
Ilya Gorbunov 5a4eb22961 Move isolated addSuppressed extension test to jvm tests
Conditions for being isolated do not hold anymore:
it tested that addSuppressed extension could work without kotlin-stdlib-jdk7,
but now the latter is merged to kotlin-stdlib and thus always present

#KT-51907
2023-01-26 20:57:00 +00:00
Ilya Gorbunov 8b68234528 Include all jvm stdlib tests into kotlin-stdlib project test
JVM stdlib tests are compiled against JDK 8 so there's no need to divide them by modules anymore

#KT-51907
2023-01-26 20:57:00 +00:00
Ilya Gorbunov 72ced53833 Fix dependencies between stdlib main source sets KT-51907
Otherwise mainJdk7/8 source sets don't see symbols from main when imported to IDEA
2023-01-26 20:56:59 +00:00
Anton Lakotka ba20972449 [Gradle] Clone Properties before iterating over them as it can cause...
...ConcurrentModificationException if someone will concurrently
 modify them
2023-01-26 16:01:37 +00:00
Sergey Bogolepov f5d4984274 Update HACKING.md 2023-01-26 17:49:06 +02:00
Sebastian Sellmair 294014a85d [Gradle][Minor] KotlinTargetHierarchyDsl: Fix doc pointing to old function
KT-56204
2023-01-26 15:37:23 +00:00
Sebastian Sellmair ca859c0132 [Gradle] KotlinTargetHierarchy: Change naming from 'any' to 'with' prefix
^KT-56204 Verification Pending
2023-01-26 15:37:23 +00:00
Mikhail Glukhikh 8aed6d3c4c K2: add dispatchReceiverForStatics to ScopeTowerLevel to avoid receiver hacks
Related to KT-55116
2023-01-26 15:27:58 +00:00
Mikhail Glukhikh d436d56871 FE: add some more tests around static field fake overrides 2023-01-26 15:27:58 +00:00
Mikhail Glukhikh 938e1d5ce8 K2: copy explicit receiver to dispatch receiver for static member accesses
Related to KT-55116
2023-01-26 15:27:57 +00:00
Mikhail Glukhikh 4167a69e30 K2: generate implicit dispatch receivers for static members called
#KT-55371 Fixed
#KT-55372 Fixed
2023-01-26 15:27:57 +00:00
Mikhail Glukhikh 9cfcf057ef K2: expand qualifier type aliases in visibility checker & in FIR2IR
#KT-55408 Fixed
2023-01-26 15:27:56 +00:00
Mikhail Glukhikh ead319f832 K2: add test for KT-55408 2023-01-26 15:27:56 +00:00
Mikhail Glukhikh aafde418cc K2: store imported static qualifiers in dispatch receiver field
This is a partial revert of commit 104fd4c1
#KT-55116 Fixed
2023-01-26 15:27:55 +00:00
Mikhail Glukhikh 416d4f57eb K2: add test for KT-55371 2023-01-26 15:27:55 +00:00
Sergey Bogolepov c074cf6635 [K/N] Update HACKING.md to reflect -Xsave-llvm-ir-directory 2023-01-26 14:32:49 +00:00
Sergey Bogolepov b9a7921b10 [K/N] Remove obsolete todo message
Since we run ReturnsInsertionPhase on per-file basis,
prerequisites check is triggered only if modules has files.
2023-01-26 14:32:49 +00:00
Sergey Bogolepov 362cff892b [K/N] Code cleanup 2023-01-26 14:32:49 +00:00
Sergey Bogolepov 0b4db4beca [K/N] Fix ALL phases value 2023-01-26 14:32:48 +00:00
Sergey Bogolepov 9f4e086ff9 [K/N] Fix filecheck tests 2023-01-26 14:32:48 +00:00
Sergey Bogolepov 851d84a865 [K/N] Enable proper LLVM IR dump and verify actions
Also introduce -Xsave-llvm-ir-directory argument
that should be used instead of -Xtemporary-files-dir
as a location for LLVM IR from phases.
Motivation for this change: it is simpler to implement
and unties LLVM actions from the awful TempFiles class.
2023-01-26 14:32:48 +00:00
Sergey Bogolepov 0febffedbd [K/N] Add LlvmIrHolder adapter interface for debugging purposes
Similar to KotlinBackendIrHolder and BackendContextHolder interfaces.
2023-01-26 14:32:47 +00:00
Sergey Bogolepov 60ff50dc51 [K/N] Enable IR validation and dumping for more phases 2023-01-26 14:32:47 +00:00
Sergey Bogolepov 10f9000d46 [K/N] Add utility adapter interfaces for flexible phase processing
In the new dynamic driver we have various contexts, inputs and outputs.
To make it possible to validate and dump IR uniformly, we need a couple
of adapter interfaces that will be accessed from phase actions.
2023-01-26 14:32:46 +00:00
Sergey Bogolepov c828ac6167 [K/N] Re-enable lowering prerequisites 2023-01-26 14:32:46 +00:00
Sergey Bogolepov 4c11f6ff30 [K/N] Normalize lowering names 2023-01-26 14:32:46 +00:00
Sergey Bogolepov 5d44f01a88 [K/N] Remove old ToplevelPhases.kt
It contains only commented CheckSamSuperTypes phase which is disabled
for quite some time. If we ever need this lowering again it could be
found in this commit.
2023-01-26 14:32:45 +00:00
Sergey Bogolepov d7e44dc46a [K/N] Port lowerings from old builders to the new ones 2023-01-26 14:32:45 +00:00
Sergey Bogolepov f9d0755f94 [K/N] Introduce more createFileLoweringPhase overloads
They simplify porting from the old builders
2023-01-26 14:32:45 +00:00
Sergey Bogolepov fafa2b1a67 [K/N] Support prerequisites in phase builders 2023-01-26 14:32:44 +00:00
Sergey Bogolepov 32a265a7eb [IR] Lift restrictions on phase prerequisites
Allow depending on phases of different "types".
2023-01-26 14:32:44 +00:00
Sergey Bogolepov 1ffef21ce5 [K/N] Untie WriteBitcodeFilePhase from NativeGenerationState 2023-01-26 14:32:44 +00:00
Sergey Bogolepov a7518fed73 [K/N] Remove obsolete file 2023-01-26 14:32:43 +00:00
Bogdan Mukvich e988ac20f0 Update dokka 1.8.0-dev with OOM fixes 2023-01-26 14:13:19 +00:00
Kirill Rakhman 583584be7e FIR: Resolve error expression in initializer of FirField
^KT-54775 Fixed
2023-01-26 14:12:48 +00:00
Pavel Punegov 156c2db855 [K/N][test] Fine tune the Maven downloading test
Only final builds (without build number) should be placed to Central.
Don't run the test for these builds while they are not published there.

Merge-request: KT-MR-8491
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-01-26 14:04:46 +00:00
Alexander Shabalin dd9b0f9fa5 [K/N] Fix custom allocator ^KT-55364
* Make CustomFinalizerProcessor mirror the existing FinalizerProcessor
* Fix Heap::PrepareForGC in custom allocator

Merge-request: KOTLIN-MR-616
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-01-26 14:03:30 +00:00
pyos f8f63f4573 FIR CFA: fix function locality check 2023-01-26 13:12:16 +00:00
pyos 1d9a1e979a FIR CFA: skip member function graphs when looking for member assignments
Shouldn't affect the result, since in member functions all properties
are assumed to be initialized so the CFG is not needed for reporting
VAL_REASSIGNMENT.
2023-01-26 13:12:16 +00:00
pyos f118c94110 FIR: refactor CanBeValChecker 2023-01-26 13:12:15 +00:00