Commit Graph

87921 Commits

Author SHA1 Message Date
Anastasiya Shadrina aaabf5e1ca [PSI2IR] Support context receivers on classes 2021-12-02 20:23:38 +03:00
Anastasiya Shadrina 307f318c9e [PSI2IR] Generate IR for functions and calls with context receivers 2021-12-02 20:23:27 +03:00
Anastasiya Shadrina f4ddf66ac4 [FE] Support context receivers on classes 2021-12-02 20:23:25 +03:00
Anastasiya Shadrina c34fe8d547 [FE] Implement temporary resolution algorithm 2021-12-02 20:23:24 +03:00
Anastasiya Shadrina d923c95671 [FE] Add context receivers to scope 2021-12-02 20:23:22 +03:00
Anastasiya Shadrina c5687e080d [FE] Pass context receiver parameters where necessary 2021-12-02 20:23:18 +03:00
Anastasiya Shadrina a39fbd3822 [FE] Add getContextReceivers to CallableDescriptor interface 2021-12-02 20:23:17 +03:00
Anastasiya Shadrina 7de8380ddf [FE] Add context receivers getter to KtCallableDeclaration interface 2021-12-02 20:23:16 +03:00
Anastasiya Shadrina d1fdc4d787 [PSI] Introduce "context" soft keyword and parse context receivers 2021-12-02 20:23:11 +03:00
soywiz f6298ed1d5 Explain how to use -dev and -SNAPSHOT versions 2021-12-02 18:23:16 +03:00
Sergej Jaskiewicz 86cabf3bb7 [JS IR] Use Uint16Array as CharArray's storage 2021-12-02 12:39:41 +00:00
Sergej Jaskiewicz 67dfe7bed1 [JS IR] Make Char a value class (again)
#KT-35100 Fixed
2021-12-02 12:39:40 +00:00
Sergej Jaskiewicz 599f705842 [stdlib] Make @LowPriorityInOverloadResolution applicable to ctors 2021-12-02 12:39:40 +00:00
Yahor Berdnikau 2aa1c187d9 Revert "Set minimal supported Gradle version to 6.7.1."
Temporary until 1.6.20 release branching.

This reverts commit 4c3404888a.

^KT-49733 Open
2021-12-02 15:05:54 +03:00
Alexander Korepanov 2ae10f4378 [JS IR] Optimize equals call for inline class instances.
Remove implicit boxing of inline class instances in equals call.
2021-12-02 11:00:02 +00:00
Ilmir Usmanov b26a81435f Do not add continuation parameter for super interface bridges
If there is superinterface (more specifically, fun interface) in one
file with default suspend function, we lower the function, adding
continuation parameter. Then, when we compile another file with a child,
we generate a bridge to the default suspend function, which is already
lowered. So, we do not need to add the continuation parameter.

If the child is in the same file, then we add continuation parameter
after we create a bridge, so, AddContinuationLowering can encounter
bridges to suspend default functions in superinterfaces with
continuation parameter only in multifile examples.

 #KT-47549 Fixed
2021-12-02 10:09:22 +00:00
Alexander Udalov be6409f0af Fix property lookup in data class component generation
#KT-49812 Fixed
 #KT-49936 Fixed
2021-12-02 01:43:39 +01:00
Alexander Udalov 2fbd2e2a15 Minor, move irText tests on data classes to a subdirectory 2021-12-02 01:43:39 +01:00
Steven Schäfer a5fa69b8ee jvm-abi-gen: use kotlinx-metadata 0.4.0 from maven
(cherry picked from commit f5e95444f82bb8e4be72dcef18da3a92277911e0)
2021-12-02 01:41:57 +01:00
Ilya Muradyan 7283ea86af [scripting] Fix Kotlin reflection metadata for script constructors 2021-12-02 01:49:58 +03:00
Ian Lynagh 176803689a Add js/js.tests/build as exclusions for CodeConformanceTest
If the "jsCompilerTest"s are run before this, then we get spurious
failures due to e.g. js/js.tests/build/node_modules/mocha/mocha.js
2021-12-02 00:40:02 +03:00
Mikhail Glukhikh f09fc9a473 Optimize FirImportsChecker using lazy evaluation 2021-12-01 23:45:20 +03:00
Tianyu Geng 18f7a760bb FIR checker: report unresolved reference in imports
Compared to FE1.0, instead of using UNRESOLVED_REFERENCE, a new
UNRESOLVED_IMPORT diagnostic is introduced. This is so that we can use a
different positioning strategy to highlight the last part of the import
if the entire import is passed.

Also, this change fixed some incorrectly rejected imports in FIR. Such
cases are covered the newly added test file staticFunAndPropertyImport.kt
2021-12-01 23:45:18 +03:00
Tianyu Geng f51b108821 FIR: fix PsiElementFinderByType
Current implementation would return the input node if the type matches.
This is clear wrong since the method is supposed to return children.
2021-12-01 23:45:17 +03:00
mvicsokolova 93561a1a55 kotlinx.atomicfu compiler plugin for JS_IR backend (#4581)
* kotlinx.atomicfu compiler plugin for JS_IR

Support transformations of atomic operations introduced by the kotlinx.atomicfu library for the JS_IR backend. Compiler plugin is applied externally by the kotlinx.atomicfu gradle plugin.

* Apply compiler plugin for JS platform only

* New plugin test structure

* testGroupOutputDirPrefix changed
2021-12-01 22:33:13 +03:00
Steven Schäfer 05695761ec jvm-abi-gen: Add test to check the declaration order in interface jars 2021-12-01 19:20:47 +01:00
Steven Schäfer b8625cd233 jvm-abi-gen: Do not sort stripped methods and fields
The order is visible to annotation processors and should be considered
part of the ABI of a class.
2021-12-01 19:20:47 +01:00
Viacheslav Kormushkin 077d10edef [KMM] Fixed project import failure in case of cocoapods integration
#KT-49931
2021-12-01 16:30:35 +00:00
Mads Ager d89680b30d [FIR] Serialize annotations for type parameters properly 2021-12-01 18:25:06 +03:00
Alexander Anisimov 76b332b635 Update ReadMe.md
Add a link to the Kotlin YouTube channel
2021-12-01 17:22:34 +03:00
Leonid Startsev de128a5406 kotlinx.serialization: Support @Serializable on sealed interfaces.
Interfaces (regular and sealed) are by default polymorphic. To benefit
from sealing (i.e. knowledge of all inheritors in compile-time), @Serializable
annotation may be added on sealed interface, generating the same serializer
that can be used for sealed classes.

Synthetic nested classes are not generated in DEFAULT_IMPLS mode because
it causes problems when adding a synthetic companion to an interface.

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1576
2021-12-01 14:14:47 +00:00
Anton Bannykh e6a5614321 [JS IR] don't hash module names 2021-12-01 16:50:30 +03:00
Anton Bannykh 9122304acb [JS IR] shorten lib name to fit 255 path total length on Windows 2021-12-01 16:50:29 +03:00
Anton Bannykh 5a3c8336ca [JS IR] import Bar from its module 2021-12-01 16:50:28 +03:00
Anton Bannykh a76425a7ee [JS IR] update JS AST diagnostics 2021-12-01 16:50:28 +03:00
Anton Bannykh e90ad8b53b [JS IR] fix cross-module reference of interface default methods 2021-12-01 16:50:24 +03:00
Anton Bannykh a9b99a8eea [JS TESTS] fix moduleDescriptor dependency configuration
The dependency list doesn't get copied in the `setDependencies` API
which leads to all modules depending on each other.
2021-12-01 16:50:23 +03:00
Anton Bannykh dbbc30a6a2 [JS IR] enable per-module by default 2021-12-01 16:50:22 +03:00
Anton Bannykh af134912be [JS IR] fix test data 2021-12-01 16:50:20 +03:00
Anton Bannykh 9c4c798fe7 [JS IR] mute tests with wrong linkage 2021-12-01 16:50:16 +03:00
Sergej Jaskiewicz 1300d9604a fixup! [JS IR] [runtime] Remove valueOf method from Long
fix the test for the legacy backend
2021-12-01 12:36:35 +00:00
Sergej Jaskiewicz e13b6b2a90 [JS IR] [runtime] Remove valueOf method from Long
This method was used for coercing `Long` values to JavaScript
`number`. However, it caused issues when `Long` values were
concatenated to a string (see KT-8666, KT-26706).
2021-12-01 12:36:34 +00:00
Margarita Bobova 3b98c330fd Add changelog for 1.5.32 2021-12-01 14:34:20 +03:00
Sergey Bogolepov 0eb0d2c10e [K/N] Fix performance suite after update to Xcode 13 2021-12-01 09:53:53 +00:00
Ilya Goncharov 2e350a10bd [Gradle, JS] Windows environment for not ignoring scripts 2021-12-01 09:18:37 +00:00
Ilya Goncharov d4953cb51a [Gradle, JS] Separately add arguments for kotlin npm install
^KT-49902 fixed
2021-12-01 09:18:36 +00:00
Dmitry Petrov 52a3713c9c JVM small optimization in temporary vals elimination 2021-12-01 12:13:17 +03:00
Dmitry Petrov f3ca0afd34 JVM run temporary variable elimination before inlining 2021-12-01 12:13:16 +03:00
Dmitry Petrov de3203ee48 JVM KT-49903 prohibit reordering of 'getstatic System.out' 2021-12-01 12:13:13 +03:00
Sergey Bogolepov dfa6507cae [K/N] Bump Apple SDK versions 2021-12-01 08:49:51 +00:00