Commit Graph

97367 Commits

Author SHA1 Message Date
Nikolay Lunyak f422a3a4e8 [FIR JS] Report WRONG_JS_QUALIFIER for the argument of JsQualifier 2023-01-09 08:57:08 +00:00
Nikolay Lunyak 73c89a5d9d [FIR JS] Prepare the test data for FIR 2023-01-09 08:57:08 +00:00
Nikolay Lunyak 0e38d0ebd2 [FIR JS] Ensure JS-specific diagnostics are generated properly 2023-01-09 08:57:07 +00:00
Nikolay Lunyak 5ae9444745 [FIR JS] Add a test runner for FIR JS with old diagnostic tests 2023-01-09 08:57:07 +00:00
Vladimir Dolzhenko 4466b2c980 Mark KtStubElementTypes#FILE will be deleted in 1.9.0
#KT-53781
2023-01-08 21:43:26 +01:00
Abduqodiri Qurbonzoda 4af0f110c7 Fix 'Test: stdlib-js public kotlin api test' IDEA run configuration
Moving tests to another package made the IDEA run configuration obsolete.
To prevent this problem in the future a separate task (jsStdlibApiTest)
was introduced. The task is run in TC and will fail if the tests are missing.

Merge-request: KT-MR-8128
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-01-07 12:30:52 +00:00
Dmitrii Gridin 0e23ffcec9 [LC] add test on Throws annotation 2023-01-06 21:09:44 +00:00
Dmitrii Gridin 5a74fec3ac [AA] KtAnnotated: split hasAnnotation to two extensions 2023-01-06 21:09:43 +00:00
Dmitrii Gridin 2c305b46df [SLC] SymbolLightSimpleMethod: simplify isOverride for top level functions 2023-01-06 21:09:43 +00:00
Dmitrii Gridin 4d258d7f74 [SLC] AbstractSymbolLightClassesParentingTest: cover more cases 2023-01-06 21:09:43 +00:00
Dmitrii Gridin 7dbffa3a1f [SLC] SymbolLightClassForFacade: add missing parent to modifier list in case of JvmMultifileClass 2023-01-06 21:09:42 +00:00
Dmitrii Gridin 5a081e8291 [SLC] implement missing accept for SymbolLightParameterList and SymbolLightModifierList 2023-01-06 21:09:42 +00:00
Dmitrii Gridin a05842400c [SLC] SymbolLightClassForFacade: reduce access to visibility 2023-01-06 21:09:42 +00:00
Dmitrii Gridin 96aa067aad [SLC] createPropertyAccessors: simplify condition 2023-01-06 21:09:41 +00:00
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