Commit Graph

96121 Commits

Author SHA1 Message Date
Yahor Berdnikau 49a5e9b91d Allow to suppress kotlinOptions.freeCompiler args modification warning
It could be done via 'gradle.properties':
'kotlin.options.suppressFreeCompilerArgsModificationWarning=true'

^KT-54888 Fixed
2022-11-15 16:52:02 +00:00
Dmitrii Gridin 2d6fb8a99a .idea/codeStyle: fix format to avoid changes in git 2022-11-15 17:36:28 +01:00
Yan Zhulanow e21226d02a [SLC] Ignore callables with invalid or absent names (KTIJ-23584) 2022-11-15 16:13:59 +00:00
Yan Zhulanow 6fe989b4b4 [LC] Provide proper parent element for private properties (KTIJ-23449)
Before, no parent element was returned for an object literal inside a
private property initializer, as only the getter was considered as a
potential parent.

Relevant tests are added on the IDE side (see 'LightClassBehaviorTest').
2022-11-15 16:13:59 +00:00
Jaebaek Seo 1a5a6474d6 Support TargetPlatform.isJs() for FIR 2022-11-15 16:50:17 +01:00
Jaebaek Seo f8a101cf3a Add KtType.isArrayOrPrimitiveArray/isNestedArray() to AA 2022-11-15 16:50:17 +01:00
Pavel Mikhailovskii 4436ce22b0 Generate meaningful bytecode names for extension receivers in INDY lambdas 2022-11-15 15:38:34 +00:00
Denis.Zharkov 2953e600ff K1: Deprecate incorrect callable references resolution behavior
^KT-54316 Related
^KT-54832 Fixed
2022-11-15 15:06:58 +00:00
Denis.Zharkov a3fd63fb1d Rename CompanionInParenthesesLHSCallChecker.kt -> CompanionLHSRelatedCheckers.kt 2022-11-15 15:06:58 +00:00
Yan Zhulanow 89c9646e2f [FE] Restore source compatibility in KtPsiFactory
Prevent huge code migration in kt- release branches by returning the
previously available API in deprecated status.
2022-11-15 14:58:39 +00:00
Alexander Shabalin a31c3f979b [K/N] Benchmarks on weak references
Merge-request: KT-MR-7575
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-11-15 13:22:15 +00:00
Zalim Bashorov ab590e1279 [Wasm, stdlib] Change visibility for wasm_* helper functions to internal 2022-11-15 12:55:10 +01:00
Zalim Bashorov 2fc6cea681 [Wasm] Migrate to the new GC M6 instructions 2022-11-15 12:55:10 +01:00
Pavel Kunyavskiy 838d419a84 [K/N] Fix stack overflow in DirectedGraphCondensationBuilder
^KT-54732
2022-11-15 11:39:17 +00:00
Zalim Bashorov 0c16415d26 [Wasm, stdlib] Change owner of runtime part of wasm-stdlib to "Kotlin Wasm" 2022-11-15 12:33:31 +01:00
Igor Chevdar 2353414959 [K/N][optmz] Another way of resolving escape analysis divergence
The idea is the following: if the analysis for some strongly connected
component seems not to be converging, reanalyze it again considering
all backward edges (i.e. leading to cycles) pessimistic,
basically treating the corresponding calls as external ones.

This helps to have more reasonable results for not-converging components still leaving
the chance for them to converge optimistically first.
2022-11-15 10:39:20 +00:00
Igor Chevdar 97a2ee6f2f [K/N][optmz] Fixed a bug with singletons in the call graph 2022-11-15 10:39:20 +00:00
Igor Chevdar c6ef3d849e [K/N][optmz] Fixed a problem with call graph
Previously it was considered that function references leaking to
the native world are being called at their definitions. This is wrong,
as it is impossible to deduce from the Kotlin code alone when they
will be called, so just simply assume them a part of the root set.
2022-11-15 10:39:19 +00:00
Igor Chevdar df371e8f17 [K/N][optmz] Fixed a bug in the escape analysis algorithm
Because of the problem, some edges in the points-to graph
might be lost (related to singletons and arrays).
2022-11-15 10:39:19 +00:00
Igor Chevdar 4fd64fad2f [K/N][optmz] Better escape analysis divergence handling 2022-11-15 10:39:18 +00:00
Igor Chevdar 8ed6c1a06c [K/N][optmz] Fixed bug with losing a part of the call graph
The bug might have happened on a failed to have been devirtualized
callsite as some of the potential callees might have been lost.
The commit solves the issue rather conservatively by simply adding
all those potential callees to the root set.
2022-11-15 10:39:18 +00:00
Igor Chevdar 8a03313818 [K/N][optmz] Fixed a minor bug with DataFlowIR
Because of the bug, hanging (detached from the graph) NewObject nodes
would be created. The escape analysis algorithm then happily would
decide to allocate them on the stack, thus spoiling the statistics
about actual percentage of objects allocated on the stack.
2022-11-15 10:39:18 +00:00
Simon Ogorodnik 72615ee845 Code owners. Add Compiler Core to box test ownership 2022-11-15 10:12:33 +00:00
Simon Ogorodnik 2d8254a4db Code owners. Widen ownership for various generated tests 2022-11-15 10:12:33 +00:00
Nikolay Lunyak 267ce1d892 [FIR] KT-54220: Don't crash on unsigned integers when no stdlib present
^KT-54220 Fixed
2022-11-15 09:02:33 +02:00
Nikolay Lunyak b03e14f565 [FIR] Get rid of field duplication in body resolve transformers 2022-11-14 22:40:41 +02:00
Nikolay Lunyak e34dd49872 [FIR] Get rid of the argumentMapping function.
It's just a duplicate of `resolvedArgumentMapping`. Plus there is a
member with the same name inside `FirAnnotationCall`.
2022-11-14 22:40:41 +02:00
Nikolay Lunyak 89f8821d0a [FIR] KT-53371, KT-53519: Fix annotations arguments mapping
See: compiler/testData/asJava/lightClasses/
AnnotatedParameterInInnerClassConstructor.kt

The muted tests don't work with the (KT-53371, KT-53519)-related
changes. During this test happens an attempt to access unresolved
annotations via CustomAnnotationTypeAttribute.
Discussion: KTIJ-23547
2022-11-14 22:40:41 +02:00
Nikolay Lunyak 6653f654ec [FIR] Add the missing transformPropertyAccessor override
Otherwise, `transformPropertyAccessor` from
`FirDeclarationsResolveTransformerForArgumentAnnotations` is
never called

See:
- compiler/testData/asJava/ultraLightFacades/properties.kt
- analysis/analysis-api/testData/symbols/symbolByPsi/
  contextReceivers/contextReceiversOnProperty.kt
2022-11-14 16:55:08 +02:00
Pavel Kunyavskiy ef54a6d7cb [K/N] Fix calls checker use-after-free in main thread deinit
Calls checker was trying to read thread state while unlocking mutex in
unregister thread function. At this point thread is already
unregistered and reference to current thread node is dangling.

To avoid this, we nullify this reference in advance, as its anyway
explicitly passed to unregister function, not read from global.
2022-11-14 14:25:01 +00:00
Dmitrii Gridin b7b221d261 Code ownership: /compiler/light-classes/ 2022-11-14 14:24:01 +00:00
Svyatoslav Kuzmich 4ba780be26 [Wasm] unmute test 2022-11-14 13:55:39 +01:00
nataliya.valtman 5fa3b85581 Update metric collection and tags for build statistics 2022-11-14 11:24:16 +00:00
Dmitriy Dolovov d9eda3c485 Code ownership: /compiler/testData/serialization/nonStableParameterNames/ 2022-11-14 10:29:31 +00:00
Svyatoslav Kuzmich 78bd6dbdcd [Wasm] Allow implementing function interfaces 2022-11-14 11:23:18 +01:00
Mikhael Bogdanov edc54524aa Xjdk-release: support mixed compilation of Java and Kotlin
#KT-52815 Fixed
2022-11-14 06:57:12 +00:00
mvicsokolova 9bd17f628d Atomicfu-compiler plugin: update test text files. 2022-11-13 21:58:25 +00:00
mvicsokolova 5708b2229a Atomicfu plugin (JS IR): fix for private delegated properties
Fixes https://github.com/Kotlin/kotlinx-atomicfu/issues/260
2022-11-13 21:58:25 +00:00
Ilya Chernikov 92ec8e6a3e FIR JS: Convert KLib symbol provider for handling multiple libs 2022-11-12 16:28:25 +01:00
Ilya Chernikov b28dd95621 FIR JS: rename test classes for uniformity 2022-11-12 16:28:25 +01:00
Ilya Chernikov c3197491a0 FIR JS: temporarily mute failing box tests 2022-11-12 16:28:25 +01:00
Ilya Chernikov 7e4ee399c8 FIR JS: temporarily mute remaining codegen tests 2022-11-12 16:28:25 +01:00
Ilya Chernikov 78ca733c38 FIR JS: add K2 variants of all other JS tests
except tests that are not possible to add without some modifications in
the test infra. See todos on the commented-out test declarations
2022-11-12 16:28:24 +01:00
Ilya Chernikov 5baf4a55c1 FIR JS: fix nodejs box tests infrastructure 2022-11-12 16:28:24 +01:00
Ilya Chernikov 4e4511bba2 FIR2IR: convert enums with non-primary default ctor correctly
see added test for example
2022-11-12 16:28:24 +01:00
Ilya Chernikov 22d6906b33 FIR JS: implement a copy of JS Gradle IT with K2 2022-11-12 16:28:24 +01:00
Ilya Chernikov a4da33cae6 [minor] missing option rename fir -> k2 2022-11-12 16:28:24 +01:00
Ilya Chernikov 7a57e8d903 FIR JS: Add K2 support to K2JsIrCompiler 2022-11-12 16:28:24 +01:00
Ilya Chernikov 4e8fed09b4 FIR JS: fix klib matching in fir dependencies
use file paths for more reliable matching, since klib-based libs
do strange things with libraryName
2022-11-12 16:28:24 +01:00
Ilya Chernikov 1f11a2865f FIR: refactor session factory to better support JS scenarios 2022-11-12 16:28:23 +01:00