pyos
effd21d074
JVM_IR: do not optimize suspend$$forInline functions
...
`$$forInline` functions do not pass through the state machine generator,
and optimizing `Ref`s before that changes how assignments inside lambdas
passed to `suspendCoroutine`, etc. behave: without a `Ref`, the
assignment is not reflected in the continuation object, so the variable
has old value on resumption.
These functions will be optimized later, after they are inlined
somewhere and the state machine is generated.
^KT-52198 Fixed
2022-05-02 20:18:08 +02:00
pyos
153f878df4
Convert OptimizationClassBuilder to Kotlin
2022-05-02 20:18:08 +02:00
pyos
0ec5975730
JVM: ignore non-meaningful instructions during peephole optimization
...
Also, produce more nops, since they no longer take up memory for frames
and a later pass will remove the unneeded ones anyway.
2022-05-02 19:28:10 +02:00
pyos
c43acba0b9
JVM: restore call site line number after inlining lambda
...
E.g. in `x + f()` where `f` is an inline lambda, the instructions for
`+` should have the line number of that expression (while previously
they instead had the line number of the last line of the lambda).
^KT-51738 Fixed
2022-05-02 19:28:10 +02:00
pyos
9d3a5e93d4
JVM: reuse Frames of instructions that do nothing
...
This saves some RAM when optimizing functions with lots of line numbers.
2022-05-02 19:28:10 +02:00
pyos
db62640ae2
JVM: remove InlineOnlySmapSkipper
...
1. the class didn't make much sense anyway;
2. the same code is useful for default lambdas, which can also have
a line number equal to the call site.
2022-05-02 19:28:10 +02:00
konstantin.tskhovrebov
9220d47594
KT-51861: Apply custom cocoapods framework name to fat framework.
2022-05-02 14:46:40 +00:00
Mikhail Zarechenskiy
24220cbfb5
KotlinBinaryClassCache: restore missing fixes after merge to Kotlin repo
...
- Avoid lookups in branches: https://github.com/JetBrains/intellij-community/commit/c904c56bb4ac9764935aed09e2107636e2e5bb68
- Don't fail during index of incorrect class files: https://github.com/JetBrains/intellij-community/commit/3af051e3d30e773d9dfe6cb388a42387b8636c6b
^KTIJ-21472 In Progress
Also, this commit fixes projectLeak in Intellij Aggregator _LastInSuiteTest.testProjectLeak[Java Tests / 3]
2022-05-02 12:21:43 +00:00
Yahor Berdnikau
c345f01a79
Fix IDEA Gradle import error
2022-05-02 12:02:30 +02:00
Mikhail Glukhikh
15d58aff92
K2: drop C/DFA warning which fixes can break compilation in K1 till 1.8
...
#KT-50965 Fixed
2022-05-01 16:40:04 +00:00
Nikolay Lunyak
cc086bed58
[FIR] Use a tree with the proper root node
...
This commit ensures all the conversions inside the lambda expression
use the correct tree reference.
Otherwise, the problem arises in the
`toFirSourceElement()` call: if called form inside the
ExpressionsConverter, everything is OK, but calling it from inside
DeclarationsConverter will result in the wrong source text range.
This happens, because during the lambda expressions conversion a custom
ExpressionsConverter is created with the `lambdaTree` tree, but the
DeclarationsConverter continues to use the previous tree.
2022-04-30 19:51:57 +00:00
Alexander Shabalin
caf90de2b8
[K/N] Compile runtime tests in parallel.
...
Merge-request: KT-MR-6164
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com >
2022-04-29 20:30:57 +00:00
Pavel Punegov
d5b450c8fa
[K/N][publish] Fix getting the extracted dir name
...
Python's rstrip() method with argument removes not the string
but all combinations of specified chars
2022-04-29 17:34:35 +00:00
Nikita Bobko
c1f2d66ed8
Kotlin JPS plugin: drop intellij-core dependency
...
Drop dependency because
https://youtrack.jetbrains.com/issue/IDEA-292483/UnsupportedClassVersionError-when-trying-to-run-JUnit5-unit-test#focus=Comments-27-6034750.0-0
IDEA plans to drop `PathUtil` from JPS classpath, we should prepare to
that
`KotlinFacetSettingsProvider` isn't used in jps so it was moved into
intellij repo. It was moved to
`community/plugins/kotlin/idea/src/org/jetbrains/kotlin/config/KotlinFacetSettingsProvider.kt`
path (so you can find it git history)
Review: KT-MR-6195
2022-04-29 14:51:03 +02:00
Ilya Goncharov
1fc7fbed79
rra/ilgonmic/export-call-site
...
[JS IR] Add test with exported overridden property from interface
[JS IR] Accessors should not be exported when overridden from non-exported interface
Merge-request: KT-MR-6166
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com >
^KT-52144 fixed
2022-04-29 12:13:09 +00:00
Ilya Chernikov
cdb5845693
[minor] fix double warning about FastJarFS
2022-04-29 11:03:13 +00:00
Ilya Chernikov
a78d063bef
Scripting: fix script type extraction on psi2ir
...
#KT-48812 fixed
2022-04-29 11:03:12 +00:00
Ilya Chernikov
3e19e9d190
Scripting: fix loadDependencies property use with cached scripts
...
#KT-50902 fixed
2022-04-29 11:03:12 +00:00
Ilya Chernikov
f7fb586ee5
Scripting: fix JSR-223 invocable handling of receivers
2022-04-29 11:03:12 +00:00
Ilya Chernikov
49902bb851
IR Scripting: allow to specify nullable types for provided props...
...
but only explicitly. This does not fix a breaking change described in
#KT-52120, because it seems the correct behavior, but it allows
to "workaround" the problem by specifying nullability explicitly.
Also improve handling of nullable bindings in JSR-223.
#KT-49173 fixed
#KT-51213 fixed
2022-04-29 11:03:11 +00:00
Alexander Shabalin
4a66cd0c69
[K/N] Remove usage of legacy allocation stuff ^KT-52130
...
Merge-request: KT-MR-6182
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com >
2022-04-29 10:12:44 +00:00
Yahor Berdnikau
cb35e868cc
Don't add Kotlin specific attributes to legacy 'default' configuration
...
^KT-51913 Fixed
2022-04-29 08:29:34 +00:00
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