Commit Graph

95316 Commits

Author SHA1 Message Date
Mikhail Glukhikh 62ba1277bb K2: don't duplicate custom annotations in types #KT-54275 Fixed 2022-10-10 06:20:39 +00:00
Mikhail Glukhikh d491eba629 K2: add reproducer for KT-54275 2022-10-10 06:20:39 +00:00
Ilya Muradyan 7f6bd2ab1e Fix compatibility issue for kotlin.jupyter 2022-10-08 04:02:39 +02:00
Zalim Bashorov 2c889f56fa [K/JS] Add missed JsExport in the test, and uncomment part of it which passes with v8
#KT-41294 Fixed
2022-10-07 19:37:56 +02:00
Zalim Bashorov 75510e6019 [K/Wasm] Fix incompatibilities with webpack.
* Webpack doesn't support "node:" prefix out of the box, so we can just ignore it.
* Use a proper way to get a path to the script's dir.

#KT-53790 Fixed
2022-10-07 19:37:56 +02:00
Igor Chevdar 4ac9e49abd [K/N][codegen] Moved llvmContext from global scope to generationState 2022-10-07 17:32:26 +00:00
mvicsokolova cb23dbb492 atomicfu-compiler-plugin: support declaration of properties in objects for JVM IR
Fix: https://github.com/Kotlin/kotlinx-atomicfu/issues/241
Merge-request: KT-MR-6871
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2022-10-07 17:10:41 +00:00
Svyatoslav Scherbina 28dea9d949 Native: remove obsolete compiler flags that have no effect
Same for compiler configuration keys.
2022-10-07 15:33:42 +00:00
Nikolay Lunyak b6f950ed75 [FIR][FE 1.0] KT-47933: Warn about redundant @Repeatable
Merge-request: KT-MR-7318
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2022-10-07 13:33:49 +00:00
Evgeniy.Zhelenskiy 6117cdc0c3 [IR] Remove unused MFVC getters
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2022-10-07 12:43:46 +00:00
Evgeniy.Zhelenskiy 9dd308dc01 [IR] Add context receivers test, fix a flattening fields bug
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2022-10-07 12:43:46 +00:00
Evgeniy.Zhelenskiy e1f886936c [IR] Support try for MFVC
#KT-1179
2022-10-07 12:43:45 +00:00
Evgeniy.Zhelenskiy f8aa3612f8 [IR] Support if and when for MFVC, fix several bugs, refactor
#KT-1179
2022-10-07 12:43:44 +00:00
Evgeniy.Zhelenskiy 70293fab60 [IR] Rename MFVC tests + Add test for get-field optimization
#KT-1179
2022-10-07 12:43:43 +00:00
Evgeniy.Zhelenskiy ec3c0af09d [IR] Suppress temporary test failing on Android
Bug is fixed in https://jetbrains.team/p/kt/reviews/6452

#KT-1179
2022-10-07 12:43:42 +00:00
Evgeniy.Zhelenskiy cfc17849d8 [IR] Document the new MFVC lowering classes when necessary
#KT-1179
2022-10-07 12:43:42 +00:00
Evgeniy.Zhelenskiy 6f94af80ab [IR] Correct work of the new MFVC lowering classes
#KT-1179
2022-10-07 12:43:42 +00:00
Evgeniy.Zhelenskiy 8ba20bee5b [IR] Prepare MFVC-lowering for the new MFVC classes
#KT-1179
2022-10-07 12:43:41 +00:00
Evgeniy.Zhelenskiy eb0aa55571 [IR] Fix MFVC with type arguments/parameters
#KT-1179
2022-10-07 12:43:40 +00:00
Evgeniy.Zhelenskiy f9bed3d946 [IR] Support MFVC with type parameters
#KT-1179
2022-10-07 12:43:40 +00:00
Evgeniy.Zhelenskiy 14b8e41967 [IR] Integrate MFVC with Inline classes
#KT-1179
2022-10-07 12:43:39 +00:00
Evgeniy.Zhelenskiy 79ae0a1bd6 [IR] Fix compilation of MFVC in different module
#KT-1179
2022-10-07 12:43:38 +00:00
Evgeniy.Zhelenskiy 765c212327 [IR] Add MFVC generation tests
#KT-1179
2022-10-07 12:43:38 +00:00
Evgeniy.Zhelenskiy 894cdc2307 [IR] Implement equals call correct generation for MFVC
#KT-1179
2022-10-07 12:43:37 +00:00
Evgeniy.Zhelenskiy 0d350f94f2 [IR] Implement bridges generation for MFVC
#KT-1179
2022-10-07 12:43:37 +00:00
Evgeniy.Zhelenskiy 0c1c25e477 [IR] Implement MFVC basic flattening
#KT-1179
2022-10-07 12:43:36 +00:00
Evgeniy.Zhelenskiy d4969e9b97 Revert "rra/zhelenskiy/flattening_impl"
This reverts commit b7f5c039a6.
2022-10-07 12:43:36 +00:00
Evgeniy.Zhelenskiy dff949344d [IR] Remove unused MFVC getters
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2022-10-07 12:42:15 +00:00
Evgeniy.Zhelenskiy 5c0784fef5 [IR] Add context receivers test, fix a flattening fields bug
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2022-10-07 12:42:14 +00:00
Evgeniy.Zhelenskiy afe67f9bc1 [IR] Support try for MFVC
#KT-1179
2022-10-07 12:42:14 +00:00
Evgeniy.Zhelenskiy ca789607ba [IR] Support if and when for MFVC, fix several bugs, refactor
#KT-1179
2022-10-07 12:42:13 +00:00
Evgeniy.Zhelenskiy e76041bb3b [IR] Rename MFVC tests + Add test for get-field optimization
#KT-1179
2022-10-07 12:42:12 +00:00
Evgeniy.Zhelenskiy 2c50fef251 [IR] Suppress temporary test failing on Android
Bug is fixed in https://jetbrains.team/p/kt/reviews/6452

#KT-1179
2022-10-07 12:42:12 +00:00
Evgeniy.Zhelenskiy 0bff8a21a1 [IR] Document the new MFVC lowering classes when necessary
#KT-1179
2022-10-07 12:42:11 +00:00
Evgeniy.Zhelenskiy c2284d15a5 [IR] Correct work of the new MFVC lowering classes
#KT-1179
2022-10-07 12:42:11 +00:00
Evgeniy.Zhelenskiy 5ea1edf6d1 [IR] Prepare MFVC-lowering for the new MFVC classes
#KT-1179
2022-10-07 12:42:10 +00:00
Evgeniy.Zhelenskiy d0590e4e83 [IR] Fix MFVC with type arguments/parameters
#KT-1179
2022-10-07 12:42:10 +00:00
Evgeniy.Zhelenskiy cd432b1371 [IR] Support MFVC with type parameters
#KT-1179
2022-10-07 12:42:09 +00:00
Evgeniy.Zhelenskiy b1dced6cda [IR] Integrate MFVC with Inline classes
#KT-1179
2022-10-07 12:42:08 +00:00
Evgeniy.Zhelenskiy 406bc4e497 [IR] Fix compilation of MFVC in different module
#KT-1179
2022-10-07 12:42:08 +00:00
Evgeniy.Zhelenskiy a788433aac [IR] Add MFVC generation tests
#KT-1179
2022-10-07 12:42:07 +00:00
Evgeniy.Zhelenskiy 73b0fac657 [IR] Implement equals call correct generation for MFVC
#KT-1179
2022-10-07 12:42:07 +00:00
Evgeniy.Zhelenskiy ee2d327243 [IR] Implement bridges generation for MFVC
#KT-1179
2022-10-07 12:42:06 +00:00
Evgeniy.Zhelenskiy 2896f5613d [IR] Implement MFVC basic flattening
#KT-1179
2022-10-07 12:42:06 +00:00
Evgeniy.Zhelenskiy 93ffd9f233 Revert "rra/zhelenskiy/flattening_impl"
This reverts commit b7f5c039a6.
2022-10-07 12:42:05 +00:00
Abduqodiri Qurbonzoda 71381ec8e2 [K/N] HashMap/HashSet doesn't reclaim storage after removing elements #KT-53310 2022-10-07 11:19:31 +00:00
Alexander Udalov 4dcf50d483 Fix reflection for repeated annotations with array arguments
This is related to 8308f5d7d3 (KT-44977).

It turns out that it's necessary to create `ArrayValue` with a
precomputed type not only in case of annotations stored directly in
Kotlin metadata (i.e. annotations on types and type parameters), but
also for arguments of repeated annotations. The reason is that repeated
annotations are stored in an array themselves, as an argument to another
(container) annotation. The annotation-reading code unwraps this array
to load repeated annotations as individual instances of
`AnnotationDescriptor`, but in contrast to loading normal annotations,
it doesn't set `source` to the reflection object, it uses `NO_SOURCE`
(see BinaryClassAnnotationAndConstantLoaderImpl.AbstractAnnotationArgumentVisitor.visitArray).

So when kotlin-reflect is later asked for the arguments of the
annotation, it needs to recreate the reflection object from
`AnnotationDescriptor` in `util.kt`. Doing so requires knowing the array
type, which is now present because we're creating a `TypedArrayValue`
(previously `DeserializedArrayValue`) in places where arrays are read as
annotation arguments.

Alternative solution would be to fix source passed to
`AnnotationDescriptorImpl` in the annotation-reading code, but that
seems a bit messy because the code is very abstract and is used in lots
of other places.

 #KT-53279 Fixed
2022-10-07 10:48:51 +00:00
Alexander Udalov 51ce829b96 Fix reflection class lookup in default package
Do not append "." to the name of the class in the default package.
2022-10-07 10:48:51 +00:00
Dmitriy Novozhilov e290fa5f7b Add workaround for KT-54318 2022-10-07 10:38:52 +00:00
Dmitriy Novozhilov 5c1eaa6fa4 Advance bootstrap to 1.8.20-dev-649 2022-10-07 10:38:52 +00:00