Commit Graph

88109 Commits

Author SHA1 Message Date
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
Sergey Bogolepov 10b48296e8 [K/N] Fix FrameworkTest in case of simulator target
As of Xcode 13.1 Swift 5.5 passes wrong libclang_rt to simulator targets
(similar to ours KT-47333). To workaround this problem, we explicitly
provide the correct one.
2021-12-01 08:49:51 +00:00
Sergey Bogolepov 3ef97511f6 [K/N] Fix testStackTraceFramework test after Xcode update 2021-12-01 08:49:51 +00:00
Sergey Bogolepov 9b06df48e4 [K/N] Update Xcode version to 13.1 2021-12-01 08:49:50 +00:00
Dmitriy Novozhilov dd17e98266 Revert changes in .idea/vcs.xml 2021-12-01 11:49:36 +03:00
Denis.Zharkov 6082f0b712 FIR2IR: Postpone binding overrides for lazy classes until sources processed 2021-12-01 08:32:20 +00:00
Denis.Zharkov 78ba49ddd8 FIR2IR: Make a component for Fir2IrConverter 2021-12-01 08:32:20 +00:00
Denis.Zharkov 60073239bb FIR2IR: Introduce non-static main conversion method to Fir2IrConverter 2021-12-01 08:32:20 +00:00
Pavel Kunyavskiy 9b366af38b [K/N] Fix String.compareTo on unicode strings
^KT-49873
2021-12-01 07:51:27 +00:00
Pavel Kunyavskiy 8b4540f7e4 [K/N] Add test for suspend function inheritance in ObjCExport
^KT-49395
2021-12-01 07:50:39 +00:00
Alexander Udalov d3e9ea0aae Prepare kotlinx-metadata-jvm 0.4.1 for release 2021-12-01 01:05:22 +01:00
Morten Krogh-Jespersen 544689dc4f Add getter for syntheticMethodForDelegate in JvmExtensions 2021-12-01 01:05:22 +01:00
Kristoffer Andersen 0dd5ad08f3 [EE-IR] Support inline functions in IR evaluator
Inline functions called by the fragment is detected by the fragment
frontend and the PSI for them is supplied to the compiler backend.

For the purpose of compilation, the inline function is considered as
part of the same source module as the fragment, and then discarded
upon loading the compiled fragment for evaluation.
2021-12-01 00:52:46 +01:00