Commit Graph

92330 Commits

Author SHA1 Message Date
Dmitriy Novozhilov c2bb8d6de0 [Test] Fix CLI tests due to migration from -Xuse-fir to -Xuse-k2 flag 2022-04-29 12:26:01 +04:00
Igor Chevdar f62e4e7b97 [klibs] Refactored BasicIrModuleDeserializer 2022-04-28 19:11:14 +00:00
Igor Chevdar 31eedebec6 [klibs] Added deserialization strategy: on-demand
With on-demand strategy only file header is deserialized
2022-04-28 19:11:13 +00:00
Artem Kobzar 025a21761b fix: change logic of calculation fqName for export model. 2022-04-28 15:54:50 +00:00
Simon Ogorodnik 58885a1b07 KT-52217 Rename 'use-fir' to 'use-k2', update message 2022-04-28 15:42:42 +00:00
Simon Ogorodnik 1c90d8a960 KT-52038 Kapt. Disable FIR for kapt run automatically 2022-04-28 15:42:41 +00:00
Igor Chevdar ca602d76df [K/N][klib] Use cache for interop libraries
#KT-51925 Fixed
2022-04-28 14:31:31 +00:00
Igor Chevdar af566dd454 [K/N][tests] Added test for KT-51925 2022-04-28 14:31:30 +00:00
Igor Chevdar 2b75ba203a [K/N][tests] Possible intermediate library for interop test
Now along with earlier [interop] <- [main] scheme one can also use
[interop] <- [lib] <- [main] which previously was only for link tests
2022-04-28 14:31:29 +00:00
Sergey Bogolepov ba9c2e51a7 [K/N] Fix filecheck_enum_when for -opt build. 2022-04-28 13:43:03 +00:00
Mikhail Glukhikh 08ba89b4ec CLI K2: report an error for JS/Native/Metadata #KT-52035 Fixed 2022-04-28 13:25:48 +00:00
Mads Ager 17b5e46547 [FE1.0] Fix CFG for inline function calls in finally blocks.
The body of the InlinedLocalFunctionDeclarationInstruction was
not copied. That confuses the information on the exceptional edge
with the information on the normal edge.

^KT-52131 Fixed
2022-04-28 14:39:59 +03:00
Dmitry Gridin 2100afd122 [jps] extract testdata to separate artifact
^KTIJ-20456
2022-04-28 12:21:33 +07:00
Igor Laevsky d46102b129 [Wasm] Fix few things around assertions in stdlib 2022-04-27 20:21:21 +00:00
Victor Petukhov 6c54b78574 [FE 1.0] Don't capture projections during compatibility check of supertypes to determine intersection type emptiness 2022-04-27 19:50:30 +00:00
Victor Petukhov 73be9d0a20 [FE] Don't check intersection emptiness if there were lower constraints 2022-04-27 19:50:30 +00:00
Victor Petukhov d4d45a8410 Fix wrong inferred type argument in InlineCodegen::inlineCall 2022-04-27 19:50:29 +00:00
Victor Petukhov 20a8e5d742 [FE] Determine intersection type emptiness by looking at supertypes properly: substitute their type arguments 2022-04-27 19:50:29 +00:00
Victor Petukhov a0260292ec [FIR] Remove always-false check for type of candidate while collection candidates 2022-04-27 19:50:28 +00:00
Victor Petukhov 54f0794ce3 [FE] Substitute erased type parameters as covariant 2022-04-27 19:50:28 +00:00
Victor Petukhov 4293b546ba [FE] Provide org.jetbrains.kotlin.load.java.components.TypeUsage as an alias of org.jetbrains.kotlin.types.TypeUsage for IDEA 2022-04-27 19:50:27 +00:00
Victor Petukhov fb76d819f0 [FE] Erase type parameters of super types during intersection type emptiness check as well 2022-04-27 19:50:27 +00:00
Victor Petukhov 0f1d212fc5 [FE] Fix tests 2022-04-27 19:50:27 +00:00
Victor Petukhov 12a39d0330 [FE 1.0] Report errors due to inferred empty intersection on those candidates which were already previously discriminated by CompatibilityOfTypeVariableAsIntersectionTypePart 2022-04-27 19:50:26 +00:00
Victor Petukhov 38913b68b2 [FE] Add additional test for marking with warnings a call resolve of which is going to be changed 2022-04-27 19:50:26 +00:00
Victor Petukhov 39d13442be [FE] Support intersection type emptiness checking for interfaces 2022-04-27 19:50:25 +00:00
Victor Petukhov 1da52ab197 [FE] Add test for KT-51016 2022-04-27 19:50:25 +00:00
Victor Petukhov b32887380a [FE] Move empty intersection tests into separate directory 2022-04-27 19:50:24 +00:00
Victor Petukhov e0a1f1c405 [FE] Review fixes 2022-04-27 19:50:24 +00:00
Victor Petukhov c71ae4301c [FE 1.0] Get rid of absolute CompatibilityOfTypeVariableAsIntersectionTypePart 2022-04-27 19:50:24 +00:00
Victor Petukhov 47d6236a2d [FIR] Support determining emptiness of an intersection type with type parameters' types 2022-04-27 19:50:23 +00:00
Victor Petukhov 313da6f41e [FIR] Unbind type parameter erasing from java 2022-04-27 19:50:23 +00:00
Victor Petukhov f31cf90de2 [FE 1.0] Unbind type parameter erasing from java 2022-04-27 19:50:22 +00:00
Victor Petukhov 5bfe6cd20a [FE] Implement discussed rules to report empty intersection errors 2022-04-27 19:50:22 +00:00
Victor Petukhov b96708c3e2 [FE] Support reporting INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION for empty intersection types with type parameters 2022-04-27 19:50:21 +00:00
Victor Petukhov c16ae81a48 [FIR] Report errors for upper bounded type variables by an empty intersection type
^KT-51221 Fixed
2022-04-27 19:50:21 +00:00
Victor Petukhov 65213e9a42 [FE 1.0] Report warnings or errors for upper bounded type variables by an empty intersection type 2022-04-27 19:50:21 +00:00
Victor Petukhov 9474406375 [FIR] Check if type variable is bounded in upper by incompatible types (resolution stage) 2022-04-27 19:50:20 +00:00
Victor Petukhov 095a5d1fdf [FIR] Get rid of unnecessary opt ins 2022-04-27 19:50:20 +00:00
Victor Petukhov 9885094472 [FIR] Don't turn constraint storage into FREEZED stage during resolution 2022-04-27 19:50:19 +00:00
Victor Petukhov e7bd464a3c [FE 1.0] Check if type variable is bounded in upper by incompatible types (resolution stage)
^KT-51221 Fixed
2022-04-27 19:50:19 +00:00
Victor Petukhov 9e9e0211eb [FE] Check if type variable is fixed into an empty intersection type and report resolution warnings/errors if needed (completion stage)
^KT-51221 Fixed
2022-04-27 19:50:18 +00:00
Victor Petukhov 8e834fc7bb [FIR] Move subtyping helpers into TypeUtils.kt 2022-04-27 19:50:17 +00:00
Hung Nguyen a7403fc615 [New IC] Remove "-dontwarn com.google.gson.**" from compiler.pro
This line was added in commit 8c611e0 to allow the
`incremental-compilation-impl` module to use Gson.

This module is no longer using Gson now (only used by its unit tests),
so we can revert that commit.

^KT-52141 Fixed
2022-04-27 15:26:27 +00:00
Hung Nguyen 9eb3c7ed76 [New IC] Optimize Java class snapshotting with ASM ClassWriter
To snapshot a Java class (+ its fields and methods), previously we used
Gson to serialize a class field/method to a string via reflection, and
hash that string.

We now use an ASM ClassWriter to write a placeholder class containing
the field/method of interest and hash the bytecode of that class.

One experiment showed that this new approach is ~10 times faster than
the previous approach (140s down to 16s when snapshotting 600 jars).

Test: Updated expectation files for JavaClassSnapshotterTest unit tests
      + Existing integration tests to prevent regression

^KT-52141 In Progress
2022-04-27 15:26:26 +00:00
Sergey Bogolepov 5a0c3920a5 [K/N] Properly support watchosArm64 2022-04-27 14:46:35 +00:00
Sergey Bogolepov 7401760d23 [K/N] Remove obsolete hack in ClangArgs
Fixes backend.native:tests for watchosArm64 target.
2022-04-27 14:46:34 +00:00
Yahor Berdnikau 0d38f293d5 Properly set jvmTarget from toolchain for KaptGenerateStubsTask
^KT-51415 Fixed
2022-04-27 14:01:05 +00:00
Alexander Shabalin 663e843544 [K/N] Refactor allocators ^KT-52130
Merge-request: KT-MR-6135
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-04-27 14:00:27 +00:00
nataliya.valtman a05bb3c77c Store module info under own module name for incremental compilation
#KT-51463 Fixed
2022-04-27 13:17:07 +00:00