Dmitriy Novozhilov
a967a242c7
[FIR] Allows use DSL for building FIR declarations from any FirExtension
2023-02-08 08:44:50 +00:00
Dmitriy Novozhilov
1248ee12d6
[FIR] Add ability to provide additional synthetic declarations to metadata from plugins
...
^KT-55885 Fixed
2023-02-08 08:44:49 +00:00
Dmitriy Novozhilov
8350226bad
[FIR] Collect constructors from scope instead of .declarations in metadata serialization
...
This is needed to save in metadata constructors, generated by plugins
with FirDeclarationGenerationExtension
2023-02-08 08:44:49 +00:00
Igor Chevdar
12d0b1e846
[K/N][codegen] Fixed wrong arguments evaluation order for IrSetField
...
#KT-56326 Fixed
2023-02-08 06:56:09 +00:00
Svyatoslav Scherbina
2bafa0eb77
Bump Kotlin/Native version to 1.9.0-dev-1261
2023-02-07 21:05:12 +00:00
Ilya Kirillov
69e41e19e7
[Analysis API] fix possible leaks of FirDeclarations from cache keys in KtSymbolByFirBuilder
...
If some FirDeclarations is inaccessible then there is no reason to store KtSymbol for it
^KTIJ-22749
2023-02-07 17:57:38 +00:00
Ilya Kirillov
f5e5a134e7
[Analysis API] remove caches from KtSymbolByFirBuilder with very low hit rates
...
^KTIJ-22749
2023-02-07 17:57:38 +00:00
Ilya Kirillov
a587913225
[Analysis API] avoid having separate versions of KtFirScopeProvider for each thread
...
Now KtFirScopeProvider do not contain caches, so it can be reused between the threads. The only thread-local thing it had, was a ScopeSession. Now it's not stored in the KtFirScopeProvider
2023-02-07 17:57:37 +00:00
Ilya Kirillov
489ffc5acb
[Analysis API] remove caches from KtFirScopeProvider
...
The hit-rate for this cache seems to be very law and it causes additional memory consumption
^KTIJ-22749
2023-02-07 17:57:37 +00:00
Vladimir Dolzhenko
b04b3d389f
Add ability for DeclarationDescriptor validation
...
Not fully initialized DeclarationDescriptor could leak to bindingTrace.
It is hard to detect the outcome of that kind of leakage due to
possibility to have not fully initialized instances if PCE happens in
the middle of publication and instance full initialization.
#KT-56364
#KT-56388
#KT-54085
#KT-55150
2023-02-07 17:40:42 +00:00
Vladimir Dolzhenko
a049fda75b
Create SimpleFunctionDescriptorImpl under nonCancelableSection
...
SimpleFunctionDescriptorImpl initialization consists of two phases:
ctor + initialize.
When SimpleFunctionDescriptorImpl is created wrapped descriptor
(e.g. ValueParameterDescriptorImpl) is leaked through bindingTrace
with not fully initialized `containingDeclaration` (that is
SimpleFunctionDescriptorImpl).
If PCE happens after this unsafe publication prior to `initialize` then
it will be case with NPE on fully initialized instance reading.
#KT-56364 Fixed
2023-02-07 17:40:41 +00:00
Vladimir Dolzhenko
9be4aa2e02
Create PropertyDescriptorImpl under nonCancelableSection
...
PropertyDescriptorImpl initialization consists of two phases:
ctor + setType.
When PropertyDescriptorImpl is created wrapped descriptor
(e.g. WithDestructuringDeclaration) is leaked through bindingTrace
with not fully initialized `containingDeclaration` (that is
PropertyDescriptorImpl).
If PCE happens after this unsafe publication prior to `setType` then it
will be case with NPE on fully initialized instance reading.
#KT-56388 Fixed
2023-02-07 17:40:41 +00:00
Leonid Startsev
e0dce31cde
Support situation when argument for serializer<T>() function has SerialInfo annotations.
...
Because SerializationJvmIrIntrinsicSupport does not instantiate annotations yet,
this info could be lost. As a workaround, it is possible to call Companion.serializer()
functions instead of direct serializer instantiation, as they are plugin-generated
and correctly handle annotations.
Note that for some cases (enums & interfaces) this WA is not enough, so additional work
is needed later.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2179
2023-02-07 16:41:01 +00:00
Alexander.Likhachev
363330f904
[Build] Remove obsolete Gradlew wrapper files
2023-02-07 14:45:35 +00:00
Alexander.Likhachev
06fb658887
[Build] Remove remaining obsolete files of the new daemon
...
KT-50846 Related
2023-02-07 14:45:35 +00:00
Ivan Kochurkin
8cbb6ff47a
[FIR2IR] Use convertToIrAndActualize() for JS CLI
2023-02-07 14:16:31 +00:00
Svyatoslav Scherbina
d8bae5a6f8
[FIR] Implement support for MPP in Native
...
^KT-56071
2023-02-07 14:16:30 +00:00
Svyatoslav Scherbina
cf4934f539
[FIR2IR] Make convertToIrAndActualize() more reusable across backends
2023-02-07 14:16:30 +00:00
Ivan Kochurkin
199b0e8cbe
[FIR] Minor: Unify all create*Session functions across all factories
...
Rename: createJsLibrarySession -> createLibrarySession
Rename: createJsModuleBasedSession -> createModuleBasedSession
2023-02-07 14:16:30 +00:00
Ivan Kochurkin
a9bac2f18b
Add PackageAndMetadataPartProvider interface
...
Use it for parameter in MetadataSymbolProvider
2023-02-07 14:16:29 +00:00
Ivan Kochurkin
f3e3cc0037
[FIR] Implement support of MPP in JS CLI
2023-02-07 14:16:29 +00:00
Ivan Kochurkin
d401ff7b09
[FIR & IR] Implement JS MPP test infrastructure
...
^KT-55295 Fixed
2023-02-07 14:16:29 +00:00
Ilmir Usmanov
e42efe1ee6
JVM IR: Ignore class type parameters if function is static
...
Otherwise, it leads to type parameters duplication in case of
suspendImpls, since they inherit type parameters from containing class.
#KT-56407: Fixed
2023-02-07 13:39:25 +00:00
Ilmir Usmanov
c7bc439661
JVM IR: Remove usages of PSI in coroutines codegen
...
Instead, use IR based reporter.
2023-02-07 13:12:19 +00:00
Dmitriy Novozhilov
dfeabea0ab
[Test] Skip tests with IGNORE_BACKEND_K1 directive in android runner
2023-02-07 09:49:21 +00:00
Dmitriy Novozhilov
a0bdecd22b
[Test] Ignore Native codegen test with IGNORE_BACKEND_...: ANY directive
2023-02-07 09:49:20 +00:00
Dmitriy Novozhilov
ae7718514b
[Test] Don't run LightAnalysisModeTest in presence IGNORE_BACKEND_K1 directive
2023-02-07 09:49:20 +00:00
Dmitriy Novozhilov
075e025452
[FIR2IR] Properly generate GetObject expression for callable reference on companion object
...
^KT-55909 Fixed
2023-02-07 09:49:20 +00:00
Abduqodiri Qurbonzoda
80b48eed0b
Fix Path.copyToRecursively when copying across file systems #KT-55935
...
Merge-request: KT-MR-8705
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com >
2023-02-07 08:25:54 +00:00
Alexander Udalov
1844869e8a
Kapt+JVM_IR: fix ordering of properties in generated stubs
...
Apparently it depended on the ordering of the synthetic `$annotations`
methods generated for properties. And those methods were always
generated at the end of a Java stub by kapt because they lacked PSI
element, and thus `ClassFileToSourceStubConverter.convertClass` could
not compute their source position, and it placed them at the end as all
other synthetic methods.
The solution is to provide PSI element for `$annotations` methods in
JvmDeclarationOrigin. This origin is then collected in kapt in
`OriginCollectingClassBuilderFactory` and used for sorting, as in the
case of the old JVM backend.
#KT-56360 Fixed
2023-02-06 21:34:10 +00:00
Alexander.Likhachev
67c4dc3cce
[Gradle, K/N] Stop using enableEndorsedLibs Gradle flag, make it Error
...
#KT-54098 Fixed
2023-02-06 19:24:05 +00:00
Sebastian Sellmair
3b75658113
[Gradle] IdeBinaryDependencyResolverTest: Add test - android artifact transformation
...
^KT-56439 Verification Pending
2023-02-06 18:38:49 +00:00
Sebastian Sellmair
dd2317b1c2
[Gradle] IdeBinaryDependencyResolver: Add componentFilter to 'ResolvableConfiguration' and 'Compilation'
...
^KT-56439 Verification Pending
2023-02-06 18:38:49 +00:00
Sebastian Sellmair
889dc8d669
[Gradle] Rename IdePlatformDependencyResolverTest.kt to IdeBinaryDependencyResolverTest.kt
...
KT-56439
2023-02-06 18:38:49 +00:00
Sebastian Sellmair
513f4a3c42
[Commonizer] Commonize 'HAS_ENUM_ENTRIES' flag
...
^KT-56207 Verification Pending
2023-02-06 18:36:37 +00:00
Kirill Rakhman
e232cc92f9
[FIR] Eliminate ClassId.isSame call from FirClass.isSubclassOf
...
^KT-55664 Fixed
2023-02-06 17:51:32 +00:00
Dmitrii Gridin
6c24436657
[SLC] make INSTANCE field for object public
...
^KT-56441 Fixed
2023-02-06 17:48:37 +00:00
Dmitrii Gridin
8e815e943e
[SLC] add tests on private object
...
^KT-56441
2023-02-06 17:48:37 +00:00
Dmitrii Gridin
fa231f60ae
[LC] rename testData for objects
...
^KT-56441
2023-02-06 17:48:37 +00:00
Dmitrii Gridin
bd7e5fd324
[LC] update testData for objects
...
^KTIJ-24119
2023-02-06 17:48:36 +00:00
Vladimir Sukharev
e75d739c7a
Add tests for property const initializers
...
Merge-request: KT-MR-8661
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-02-06 15:43:41 +00:00
Sebastian Sellmair
3a9ca1c1eb
[Gradle] IdeMultiplatformImportFactory: Empty overwrite for Android AdditionalArtifactResolutionPhase.SourcesAndDocumentationResolution
...
^KT-56430 Verification Pending
2023-02-06 13:05:06 +00:00
Sebastian Sellmair
7341f37838
[Gradle] Implement IdeAndroidDependencyResolutionTest
...
Added failing test for: KT-56430
2023-02-06 13:05:05 +00:00
Oleksandr Karpovich
dec9704cea
Add more methods to DescriptorSerializerPlugin
...
New methods:
afterFunction, afterConstructor, afterProperty, afterTypealias
2023-02-06 11:15:53 +00:00
aleksandrina-streltsova
7db32f6430
[FIR] Fix unexpected primary constructor scope in secondary constructor
...
^KTIJ-23720
^KT-56353 Fixed
2023-02-06 10:30:28 +00:00
Dmitriy Novozhilov
c25a5bc9c1
[FIR] Cleanup storing context for lambdas during body resolution
2023-02-06 10:08:37 +00:00
Dmitriy Novozhilov
791a7b1c31
[FIR] Extract function type kind for lambda in argument position
...
^KT-56381 Fixed
2023-02-06 10:08:37 +00:00
Dmitriy Novozhilov
e36d3c94a5
[FIR] Add containingFunctionSymbol property to FirValueParameterSymbol
2023-02-06 10:08:36 +00:00
Nikolay Krasko
6afaa13eab
Add docker file for building Kotlin build environment
...
KTI-1119
2023-02-06 10:01:53 +00:00
Nikolay Krasko
e8e79985a5
Fix import for performance project when kotlin.native is enabled
2023-02-06 10:01:52 +00:00