Anton Bannykh
eb0c13793b
JS IR: introduce 'lower per module' mode
...
This mode is closer to how IC supposed to work - reusing work
from dependencies, not re-lowering them.
2021-06-25 00:59:23 +03:00
Anton Bannykh
a4cb70af31
JS IR: gather statement origins in one place
...
Preparing to serialize lowered IR
2021-06-25 00:59:22 +03:00
Anton Bannykh
1b2f4ad071
dumpKotlinLike: add a flag to treat else as true
...
Deserialized IR always has `true` instead of `else` branch.
Dumping `else` as `true` helps comparing regular and serialized IR.
2021-06-25 00:59:20 +03:00
Sergey Igushkin
cf2c686630
Fix kotlin-test variants for correct resolution in *DependenciesMetadata
...
Make Gradle choose the `commonVariant` when a capability-less dependency
on kotlin-test is resolved for configurations requesting the common
artifacts.
Issue #KTIJ-6098 Fixed
2021-06-24 19:49:14 +00:00
Tianyu Geng
84f8d4d315
FIR IDE: handle reference to package and outer classes
...
For a qualified name like `foo.bar.Outer.Inner`, FIR represents it as
one atomic FIR element. Hence, to properly resolve these names to the
corresponding package and class, we need some additional work.
2021-06-24 18:27:51 +02:00
Tianyu Geng
a537074e1e
FIR: add a boolean tracking if a class ref resolves to the companion object
2021-06-24 18:27:50 +02:00
Tianyu Geng
45ccec3b64
FIR IDE: Add HLAddWhenRemainingBranchesIntention
2021-06-24 18:26:20 +02:00
Tianyu Geng
63c65edda2
FIR IDE: AddWhenRemainingBranchFix
...
The fix reuses logic that is already available from
FirWhenExhaustivenessTransformer to collect missing when branches. The
current logic unfortunately uses hackyAllowRunningOnEdt to shorten the
generated code.
2021-06-24 18:26:18 +02:00
Tianyu Geng
6ec247b861
FIR: accept when(nothing) {} as exhaustive
...
FE1.0 accepts this but FIR current rejects it.
2021-06-24 18:26:17 +02:00
pyos
26e3237b8c
JVM_IR: never rename public/protected fields
...
And if that causes a platform declaration clash, that's not a problem
that can be solved without breaking the ABI anyway.
#KT-47412 Fixed
2021-06-24 17:41:06 +03:00
Jinseong Jeon
ee02303816
FIR IDE/UAST: resolve call from KtUnaryExpression
2021-06-24 16:38:24 +02:00
Jinseong Jeon
ed2cf9afd7
FIR IDE: handle other FIR calls for KtBinaryExpression
2021-06-24 16:38:24 +02:00
Elena Lepilkina
85ecbcb8f0
[K/N] Changed inlineThreshold after BCE for varargs
2021-06-24 12:57:57 +00:00
Yahor Berdnikau
e57ac5f67b
Fix flaky test.
...
Narrow down unexpected string, so it will not clash with other output.
In this case 'AutoCloseable' was printed when Gradle 7 was generating
api jar.
2021-06-24 14:08:24 +02:00
pyos
88320cbb05
JVM_IR: produce collection stubs in a stable order
...
This means not storing intermediate results in any HashSets.
#KT-47411 Fixed
2021-06-24 14:47:49 +03:00
Pavel Punegov
6ae6209031
Native: exclude tests that fail due to the KT-47405 and KT-47408
2021-06-24 10:54:45 +00:00
Denis.Zharkov
c8c558b575
FIR: Use Any? expect type to the argument list of ==
...
^KT-47409 Related
2021-06-24 12:17:46 +03:00
Denis.Zharkov
4892ad42b9
FIR: Do not mark not found classes' based types from Java as error
...
The same happens in FE1.0
2021-06-24 12:17:45 +03:00
Denis.Zharkov
201dded237
FIR: Fix serialization of delegated members
...
^KT-47413 Relates
2021-06-24 12:17:43 +03:00
Alexander Shabalin
cc71069a3a
Do not require freezing for Worker.executeAfter on experimental MM
2021-06-24 07:57:23 +00:00
Ilya Kirillov
16e9c74523
FIR IDE: fix testdata after introducing isStatic property for symbols
2021-06-23 22:22:19 +03:00
Tianyu Geng
476d1da1cf
Rename SelfTargetingIntention#allowCaretInsideElement
...
The current method makes it a bit hard to understand its purpose.
2021-06-23 22:22:18 +03:00
Tianyu Geng
abcc716ffc
Document org.jetbrains.kotlin.idea.intentions.SelfTargetingIntention#allowCaretInsideElement
...
Also update its usage so that the contract of this method is easier to
understand.
2021-06-23 22:22:17 +03:00
Tianyu Geng
5a1223e812
FIR IDE: don't add return for when expressions when converting to block
...
There doesn't seem to be a good reason why FE1.0 does this. Hence we
won't do it in FIR.
2021-06-23 22:22:15 +03:00
Tianyu Geng
55e7cc7ea3
FIR IDE: add HLConvertToBlockBodyIntention
2021-06-23 22:22:14 +03:00
Tianyu Geng
030749eaeb
FIR IDE: make KtExpressionTypeProvider work for more cases
...
Currently it doesn't work for the following
* labeled expression
* annotated expressions
* object literal expressions
2021-06-23 22:22:13 +03:00
Tianyu Geng
3aa6cb25ba
FIR IDE: Add ImportMemberIntention
2021-06-23 22:22:12 +03:00
Tianyu Geng
66d44f2471
FIR IDE: Add ImportAllMembersIntention
2021-06-23 22:22:10 +03:00
Tianyu Geng
8d69f32d04
FIR IDE: fix test infra swallowing test failure output
2021-06-23 22:22:09 +03:00
Tianyu Geng
22fbd2044c
FIR IDE: make ref shortener strictly follow range restriction
2021-06-23 22:22:08 +03:00
Tianyu Geng
726d141589
FIR IDE: Add fine-grained control to KtReferenceShortener
...
This change makes it possible to control how references to a symbol should be shortened.
2021-06-23 22:22:07 +03:00
Ilya Kirillov
8ac2a48eaf
Allow specify path of compiler extension points for ide tests
2021-06-23 20:36:20 +03:00
Dmitry Petrov
0104b1275f
JVM_IR KT-47398 handle @EnhancedNullability String subject as in 1.0
2021-06-23 20:11:24 +03:00
Dmitry Petrov
c26d71c4ef
JVM KT-47365 add box test
2021-06-23 20:11:23 +03:00
sebastian.sellmair
7535f142c0
[Commonizer] SetExtensions: isSubsetOf: Use == over identity check
...
^KT-47301
2021-06-23 13:43:46 +00:00
sebastian.sellmair
ae57641456
[Commonizer] deserializeCirTree.kt: Optimize imports
...
^KT-47301
2021-06-23 13:43:45 +00:00
sebastian.sellmair
6044c58333
[Gradle] NativeDistributionCommonizerTask: Cleanup up-to-date checker comments
...
^KT-47301
2021-06-23 13:43:44 +00:00
sebastian.sellmair
a643ce89ff
[Commonizer] Add CommonizerQueueTest.test diamond output targets()
...
^KT-47301
2021-06-23 13:43:44 +00:00
sebastian.sellmair
770efb7ecb
[Commonizer] Replace InputTargetsSelectorInterface with a simple function
...
^KT-47301
2021-06-23 13:43:43 +00:00
sebastian.sellmair
5a8b39e08d
[Gradle] GetCommonizerTargetOfSourceSet: Simplify implementation by only relying on compilations
2021-06-23 13:43:42 +00:00
sebastian.sellmair
19b99d5d91
[Gradle] Project.getCommonizerTarget(sourceSet: KotlinSourceSet): Ignore orphan source sets
...
Orphan source set's (source sets without compilation) can't break any
compilation. The decision to ignore those source sets for determining
the platform was already done for the IDE import.
In order to stay consistent, this function also ignores orphans.
2021-06-23 13:43:41 +00:00
sebastian.sellmair
97ea9c2c16
[Gradle] Rename HierarchicalNativeDistributionCommonizerTask to NativeDistributionCommonizerTask
...
^KT-47301
2021-06-23 13:43:40 +00:00
sebastian.sellmair
91259569d7
[Gradle] Remove old NativeDistributionCommonizerTask.kt
...
- Remove kotlin.mpp.enableHierarchicalCommonization gradle property:
This had to be done, since newer optimizations are not compatible
with non-hierarchical commonization
^KT-47301
2021-06-23 13:43:39 +00:00
sebastian.sellmair
73ffc0d180
[Gradle] NativeDistributionCommonizationCache: Support associative commonization
...
^KT-47301
2021-06-23 13:43:38 +00:00
sebastian.sellmair
21cef41ba5
[Commonizer] AbstractCommonizationFromSourcesTest remove assertions on commonized leaf/platform libraries
...
Those assertions are not necessary anymore, since the commonizer is not
expected to produce any new "actuals" per given expect.
The IDE is supposed to analyze leaf source sets against the original
platform libraries.
2021-06-23 13:43:37 +00:00
sebastian.sellmair
42f60d981f
[Commonizer] Implement associative commonization
...
^KT-47301 Verification Pending
2021-06-23 13:43:36 +00:00
Kirill Shmakov
5fdbcb3dd1
[K/N][debug] Update LLDB bundle to support Apple Silicon
...
This is related to KTIJ-18889
2021-06-23 15:13:05 +03:00
Nikita Bobko
5a6f07402b
Fix 'Generate FIR Checker Components and FIR/IDE Diagnostics' run configuration
2021-06-23 14:06:08 +02:00
Ilmir Usmanov
435b522cc5
Minor. Unmute test
2021-06-23 11:18:25 +02:00
pyos
537ce05bc9
JVM_IR: assume function reference adapters are tail-call
...
Meaning, they never need continuation objects. This shouldn't affect
correctness (if the assumption is valid, the continuation object
should always have been removed in the end), but the phantom
continuation sometimes left behind unused accessors (and in case of
inline function references, those accessors would refer to non-existent
functions) - see the modified test and Kotlin/kotlinx.coroutines#2769 .
2021-06-23 11:18:25 +02:00