Commit Graph

97353 Commits

Author SHA1 Message Date
Dmitrii Gridin 2dfa4d37ea [SLC] SymbolLightMethod: avoid resolve to calculate isOverride 2023-01-06 21:09:41 +00:00
Dmitrii Gridin 6cea761b6e [SLC] reduce resolve from ANNOTATIONS_ARGUMENTS_MAPPING to TYPES phase on annotations search 2023-01-06 21:09:41 +00:00
Dmitrii Gridin 4626b19fce [AA] KtAnnotated: introduce more flexible search API 2023-01-06 21:09:40 +00:00
Dmitrii Gridin 461682a797 [LC] createField: avoid body resolve in case of psi declaration 2023-01-06 21:09:40 +00:00
Dmitrii Gridin 5950820787 [AA FIR] KtFirScopeProvider: avoid redundant resolve 2023-01-06 21:09:40 +00:00
Dmitrii Gridin c522c6e29d [SLC] SymbolLightClassBase: add more diagnostics 2023-01-06 21:09:39 +00:00
Dmitrii Gridin 7982d33677 [AA FIR] mapAnnotationParameters: improve logging 2023-01-06 21:09:39 +00:00
Ilya Kirillov ae68f08856 [FIR] make FirJavaClass.superTypes to be lazily enhanced
This should solve the problem with deadlocks/performance in the K2 IDE

This is a temporary solution until the ^KT-55387 is properly fixed

^KT-55387
^KT-54890
2023-01-06 18:55:43 +00:00
Ilya Goncharov cf8b1692ca [Gradle, JS] Remove base plugin applying in NodeJsRootPlugin and dependencies on clean task 2023-01-06 17:37:12 +00:00
Ilya Goncharov f1aedc74da [Gradle, JS] Use mjs extension for wasm in webpack task 2023-01-06 17:33:16 +00:00
Svyatoslav Scherbina 5320fbeb6e K1: support pre-release checks for klibs
This commit makes the compiler read the pre-release flag from loaded
klibs. Now the K1 frontend checks this flag in
MissingDependencyClassChecker checker, reporting errors if the current
compiler configuration doesn't allow using pre-release dependencies.

^KT-54905 Fixed
2023-01-06 16:57:39 +00:00
Svyatoslav Scherbina 7788304645 Change klib PRE_RELEASE flag value to ignore it set in existing klibs
JsAllowValueClassesInExternals language feature had UNSTABLE_FEATURE
kind and was enabled by default for JS IR backend. As a result, klibs
compiled with recent compiler versions were marked with the pre-release
flag.

Now, if we enabled reading the flag from klibs, the JS IR compiler would
reject all these klibs by default. To fix that, this commit changes the
flag value from 0x1 to 0x2, so that all previously compiled klibs are
treated as not having the pre-release flag.
2023-01-06 16:57:39 +00:00
Svyatoslav Scherbina 4db7bac4c0 Switch JsAllowValueClassesInExternals kind from UNSTABLE_FEATURE to OTHER
When a language feature has UNSTABLE_FEATURE kind, enabling it causes
the compiler to mark the compiled library with the pre-release flag.

JsAllowValueClassesInExternals feature is enabled by default in JS IR
backend. So effectively, all JS klibs are marked with the pre-release
flag. This remained unnoticed because the compiler currently doesn't
read this flag from klibs. This will change soon.

To fix the problem, this commit changes the feature kind to OTHER, which
doesn't enforce the pre-release flag.
2023-01-06 16:57:38 +00:00
Svyatoslav Scherbina 0f63cfecbd Introduce KlibMetadataHeaderFlags
This class lists possible flags for KlibMetadataProtoBuf.Header, and
helps avoid using magic constants in the source code.
2023-01-06 16:57:38 +00:00
Svyatoslav Scherbina d9ba950d7b Introduce KlibDeserializedContainerSource
It is a DeserializedContainerSource implementation for deserializing
metadata from klibs.
2023-01-06 16:57:38 +00:00
pyos 923837f26b FIR: keep nullability when serializing suspend function types
No clue where to put the test for that since diagnostic tests, even
multi-module ones, never touch the metadata serializer. So the test is
a bytecode text one pretending to be about nullability annotations even
though it also affects what resolution in another module will do.
2023-01-06 13:54:35 +01:00
Troels Bjerre Lund ec891474b0 [K/N] custom-alloc: AtomicStack avoid loop on move ^KT-55364
This change avoids looping through the source stack, looking for the
last element, in the case where the target stack is empty. This could
matter in two places:

* when merging ready_ and used_ into unswept_ in PrepareForGC. The first
  of these will be faster with this change.
* when merging finalizer queues (in CR-592, not merged yet), where we
  expect the target queue to be empty.

Since we can expect used_ to be larger than ready_, since we are about
to do a GC, the order of these two has also been reversed.


Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-599
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-01-06 12:44:28 +00:00
Troels Bjerre Lund e04c6220ff [K/N] custom-alloc: free largepages on sweep ^KT-55364
The default behavior on a sweep is to push empty pages into a separate
stack, which will be freed if not used before the next GC starts. This
serves two purposes: it reduces the number of system allocations, and it
avoids a race condition inside AtomicStack::Pop.

Neither of these are relevant for LargePages, since LargePages are never
reused and it is only the GC thread that calls
AtomicStack<LargePage>::Pop. The change is to free LargePages
immediately instead of waiting for the next GC cycle.


Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-598
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-01-06 12:43:46 +00:00
Artem Daugel-Dauge 1538f7ba27 Fix sdk selection for watchosDeviceArm64
^KT-55790 Fixed
2023-01-05 20:47:35 +00:00
Yahor Berdnikau 464005aebc Add check to validate related project are added into kotlin plugins bom
^KT-54691 Fixed
2023-01-05 18:26:28 +00:00
Yahor Berdnikau 8ec90e2bf2 Remove dependency order workaround for kotlinx-serialization plugin
Current workaround is not working with platform (bom) and since 1.8.0
release kotlinx-serialization was migrated to IR which removed need for
workaround.

^KT-54691 In Progress
2023-01-05 18:26:28 +00:00
Yahor Berdnikau b9aac83135 Add Kotlin Gradle plugins bom
This should help with failed variants selection between different Kotlin
 Gradle plugins versions.

 ^KT-54691 In Progress
2023-01-05 18:26:27 +00:00
Artem Kobzar 7d881842b4 [K/JS] Include protected member declarations into checked by JsExportDeclarationChecker declarations ^Fixed KT-55786 2023-01-05 16:30:23 +00:00
Dmitriy Novozhilov d0183f78ff Advance bootstrap to 1.8.20-dev-5197 2023-01-05 15:21:31 +02:00
Mikhail Glukhikh ad29fb349f FirRepeatableAnnotationChecker: expand some annotation class ids
Related to KT-55615
2023-01-05 13:00:35 +00:00
Vladimir Sukharev 31a20a6631 Regenerate native tests
Merge-request: KT-MR-8207
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-01-05 11:02:27 +00:00
Sergej Jaskiewicz a66950b629 [klib] Finish refactoring of ZipUtil 2023-01-05 10:13:38 +00:00
Sergej Jaskiewicz e4d32f3615 Bump kotlin-build-gradle-plugin version to 0.0.39
This is so that the new APIs added in
d50c072af0 could be used in subprojects
that depend on kotlin-build-gradle-plugin
2023-01-05 10:13:38 +00:00
Nikolay Krasko 6f276b7504 Use line diff in RuntimePublicAPITest
Otherwise, test fails because of too big comparison.
2023-01-04 19:57:17 +00:00
Mikhail Glukhikh 1344a9b1bb ConeTypeIntersector: preserve raw & dynamic types as is 2023-01-04 18:29:34 +00:00
Mikhail Glukhikh 55fdb43620 ConeTypeIntersector: drop obsolete comment 2023-01-04 18:29:34 +00:00
Mikhail Glukhikh b5111d101e ConeTypeIntersector: reuse isNullableType from type context 2023-01-04 18:29:34 +00:00
pyos ee6af9af5f FIR: intersect flexible type bounds separately
^KT-54522 Fixed
2023-01-04 18:29:33 +00:00
Mikhail Glukhikh 8bc9fd91d5 ConeTypeIntersector: inline flatIntersectionTypes 2023-01-04 18:29:33 +00:00
pyos 45e884ec67 FIR: refactor ConeTypeIntersector 2023-01-04 18:29:33 +00:00
Ilya Gorbunov 916f733f73 Make k.c.Volatile since 1.9 in JVM and Common KT-55268, KT-55609
Leave it experimental since 1.8 for K/Native.
2023-01-04 17:28:46 +00:00
Igor Yakovlev f7940a2d46 [Wasm] Fix invalid cast generation for inline classes 2023-01-04 17:16:04 +00:00
Vyacheslav Gerasimov 1fa7c7119b Build: Fix caching of some ShadowJar tasks in the project
To be cacheable relocated shadow jars should not include manifest with
build number. Instead, we repack relocated shadow jar in default jar
task with proper manifest.
2023-01-04 16:31:48 +00:00
Ilya Goncharov a05d49d27e [Gradle, JS] Revert Gradle integration tests 2023-01-04 16:30:34 +00:00
Ilya Goncharov b4c0cab22a [Gradle, JS] Regenerate API stdlib 2023-01-04 16:30:34 +00:00
Ilya Goncharov 680f644265 [Gradle, JS] Revert codeowners 2023-01-04 16:30:33 +00:00
Ilya Goncharov ba8cc877fd [Gradle, JS] Remove module dom-api-compat 2023-01-04 16:30:33 +00:00
Ilya Goncharov c73b6ac352 Revert "[Gradle, JS] Add module kotlin-dom-compat-api as dependency with opt-out"
This reverts commit 24cb10bbf3.
2023-01-04 16:30:32 +00:00
Vladimir Sukharev 924898afb7 [K/N] KFC-446: K2 platform: Native alpha
Merge-request: KT-MR-7905
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-01-04 16:10:40 +00:00
Artem Kobzar 97be632c9a [K/JS] Add @ts-ignore for the case when there is a class with a private primary constructor (or excluded from export) which has an exported subclass ^Fixed KT-52563 2023-01-04 15:21:40 +00:00
Kirill Rakhman 2a724787f0 K2: fix SUPERTYPE_NOT_INITIALIZED not being reported on object expressions ^KT-55597 Fixed 2023-01-04 15:09:26 +00:00
Kirill Rakhman 868fe913f1 reformat test data 2023-01-04 15:09:26 +00:00
Dmitrii Gridin 5dc728ab38 [SLC] inner classes must have name
^KT-55743 Fixed
2023-01-04 14:51:27 +00:00
Kirill Rakhman 721a37f7e7 K2: implement FirLateinitIntrinsicApplicabilityChecker ^KT-55495 Fixed 2023-01-04 14:42:43 +00:00
Dmitrii Gridin cfe8bc682c [LC] fix compatibility 2023-01-04 14:08:16 +00:00