Commit Graph

90761 Commits

Author SHA1 Message Date
Dmitriy Dolovov 7df68af664 [IR, Native] KLIB ABI tests: backup but don't overwrite artifacts
^KT-50775
2022-01-26 13:36:25 +03:00
Dmitriy Dolovov 3648ae222c [IR, Native] KLIB ABI tests: add support to new test infrastructure
^KT-50775
2022-01-26 13:36:25 +03:00
Dmitriy Dolovov 9096725d1d [IR, JS] KLIB ABI tests: separate testing logic so that it can be reused in non-JS tests
^KT-50775
2022-01-26 13:36:25 +03:00
Dmitriy Dolovov d64a720749 [IR, JS] KLIB ABI tests: create KotlinCoreEnvironment in setUp()
^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Dolovov d80572dac8 [IR, JS] KLIB ABI tests: create and clean up build directory with setUp()/tearDown()
^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Dolovov 703fd8539d [IR, JS] KLIB ABI tests: don't create unnecessary disposable
^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Dolovov 3ec4a8d6f3 [IR] Rename LinkageError symbol to IrLinkageError
This is needed to 1) avoid ambiguity about the type of linkage used in Kotlin/Native compiler, 2) have the same exception name in JS and Native backends.

^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Dolovov 24b011436c [IR] Improve partial linkage error messages
^KT-50775
2022-01-26 13:36:24 +03:00
Dmitriy Dolovov 15e6101608 [IR, Native] Support partial linkage in backend
^KT-50775
2022-01-26 13:36:23 +03:00
Dmitriy Dolovov 4726b14c4b [IR, Native] Refactoring: Introduce KonanUnlinkedDeclarationsSupport
^KT-50775
2022-01-26 13:36:23 +03:00
Dmitriy Dolovov 319125607e [IR, JS] Refactoring: Introduce JsUnlinkedDeclarationsSupport
^KT-50775
2022-01-26 13:36:23 +03:00
Dmitriy Dolovov 0b1a7d05a9 [IR] Move UnlinkedDeclarationsProcessor to another package
^KT-50775
2022-01-26 13:36:23 +03:00
Dmitriy Dolovov cc37934d6f [IR, Native] Add compiler flag for partial linkage mode
^KT-50775
2022-01-26 13:36:23 +03:00
Aleksei.Cherepanov 9971ae4ffd Revert "Fix org.jetbrains.kotlin.jps.build.KotlinJpsBuildTest#testSourcePackageLongPrefix"
This reverts commit e3634c16
2022-01-26 10:03:06 +00:00
Aleksei.Cherepanov 44d796e850 Fix JPS tests after JPS module moved to Kotlin repo
Fix testdata of new compiler tests for JPS, as it is build-log-sensitive:
ClassHierarchyAffected.testWithIntermediateBodiesChanged
PureKotlin.testSerializedSubClassAndChangedInterfaces
WithJava.JavaUsedInKotlin.testRawErrorTypeDuringSerialization

Mute JavaUsedInKotlin.SamConversions tests, as it was fixed in 212 idea

Add missed part of commit 5f4be072 [JPS] Fix JS incremental compilation
Part of commit, located in JPS module, was missed during JPS relocation

Fix test MixedInheritance for non-JPS builds
Depends on commit [CHERRY PICKED FROM IJ] [testdata] Replace test IncrementalJvmJpsTest...
2022-01-26 10:03:05 +00:00
Aleksei.Cherepanov 411a0ecc38 [CHERRY PICKED FROM IJ] [testdata] Replace test IncrementalJvmJpsTestGenerated.WithJava.JavaUsedInKotlin.testMixedInheritance with new one
Replace test because JPS recompile inherited classes only in case of existence of direct use (like override or direct call of parent methods).
Tested cases:
*Add new abstract method when derived class does not abstract
*Add and remove method, when such method is present in derived class
*Change return type/access modifier

GitOrigin-RevId: 767e58ba3d3e4069838c717666329b43f1b8e936
Original commit: https://github.com/JetBrains/intellij-community/commit/d738c61aaefe95acd8130066f53f8d8bcadfa977
2022-01-26 10:03:04 +00:00
Sergey.Shanshin aa1700f3e7 Fixed serialization with custom serializer for parametrized sealed class
#KT-50764 Fixed
#KT-50718 Fixed
Fixes Kotlin/kotlinx.serialization#1705
2022-01-26 09:42:36 +00:00
Ilya Matveev acced31bb2 [K/N] Fix CMS GC hanging on Windows
Issue #KT-50948 Fixed
2022-01-26 12:57:09 +07:00
Nikita Bobko 81b4760907 Kotlin JPS plugin: set JVM bytecode target to 1.8
^KTIJ-20854 Fixed
2022-01-25 18:28:25 +00:00
sebastian.sellmair e8d64542b0 Bump bundled K/N version to 1.7.0-dev-1037 2022-01-25 16:59:28 +00:00
sebastian.sellmair 9c124e9f30 [Gradle][MPP] Add mavenCentral to repositories for KT-50847 test 2022-01-25 16:59:28 +00:00
sebastian.sellmair 8208f8cc0f Bump bundled K/N version to 1.7.0-dev-953 2022-01-25 16:59:27 +00:00
sebastian.sellmair eecc63594c benchmarksAnalyzer: Remove workaround for KT-50847 2022-01-25 16:59:27 +00:00
sebastian.sellmair 0fd65ab1a0 [Native] TargetedLibraryImpl: Respect 'commonizerNativeTargets' property
^KT-50847 Verification Pending
2022-01-25 16:59:27 +00:00
sebastian.sellmair 5e931a3039 [Gradle][MPP] Implement test ^KT-50847 missing cinterop in supported target 2022-01-25 16:59:26 +00:00
Mads Ager f5ec168b89 Support namespace Android Gradle Plugin BaseExtension value.
This is in addition to supporting the `package` attribute in
AndroidManifest.xml.

In AGP 7 developers can use `namespace` instead of the manifest
attribute. In AGP 8 it will no longer be possible to use the `package`
attribute in AndroidManifest.xml.

^KT-50887 Fixed
2022-01-25 17:16:18 +03:00
Simon Ogorodnik 33e16d3761 FIR Tests. Fix jdkHome loading, allow to specify jvmTarget for FP test 2022-01-25 17:13:25 +03:00
Roman Golyshev 8befbc6375 KTIJ-20826 Approximate builder inference stub types as type parameters
This is a temporary fix to avoid crashes in FIR IDE

Of all stub types, only `ConeStubTypeForChainInference` is handled now,
so we can catch the other possible errors with stub types (in the
delegates' inference, for example)

The fix introduced in this commit should be reworked when KT-50916 is
fixed

^KTIJ-20826 Fixed
2022-01-25 17:09:03 +03:00
Dmitry Petrov baf4b3158c JVM_IR merge lateinit lowerings into one 2022-01-25 13:50:21 +00:00
Pavel Kunyavskiy 803014ef24 [K/N] Test for freezing disabling 2022-01-25 13:43:48 +00:00
Alexander Korepanov 68117faa73 [JS Legacy] Add an implicit cast to int for the mod operation
^KT-45620 Fixed
2022-01-25 13:40:37 +00:00
Yahor Berdnikau 34ca38d1a0 Fix comment in properties was not ignored by property
This lead to inable to spawn Kotlin daemon in buildSrc files compilation
2022-01-25 14:30:03 +01:00
Svyatoslav Scherbina 26a970bd1e [Gradle] Unmute BuildCacheRelocationIT.testRelocationNative on Windows
The actual problem was fixed in 4c45f71e

^KT-48283
2022-01-25 09:44:53 +00:00
Alexander Shabalin b29b6227c2 [K/N] Adjust timings in GCSchedulerTest
Merge-request: KT-MR-5555
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-01-25 09:38:32 +00:00
Igor Chevdar 2e5a110a3e [K/N][gradle] Fixed platform libraries generation 2022-01-25 09:17:45 +00:00
Sergey Bogolepov 322bffd75a [K/N] Add FileCheck test for constants merging 2022-01-25 09:11:01 +00:00
Sergey Bogolepov 2306834b06 [K/N] Fix comparison of IrConstantPrimitiveImpl 2022-01-25 09:11:00 +00:00
Sergey Bogolepov a6455a906b [K/N] Fix KT-50843
Marking constants with unnamed_addr allows LLVM to merge them.
2022-01-25 09:10:59 +00:00
Ilmir Usmanov da80ac008b Make CHECKCAST not break TCO
So, treat CHECKCASTs as { POP, Unit } sequences. If the CHECKCAST is
between suspension point and ARETURN, put check for COROUTINE_SUSPENDED
before it and return if the suspension point is suspended.

This is safe, since if the function throws CCE, it will be thrown from
the last state in state-machine and we cannot reenter the function
during resume. So, in case of CHECKCAST throwing CCE the behavior is the
same, whether we have state-machine or not.

We do not need to disable TCO in some cases, as we do for functions,
returning Unit, since in latter case suspend function, returning Unit
might appear as returning non-Unit during resumption due to missing
{ POP, Unit } sequence, which is not executed, since the function is
tail-call. However, in case of functions, returning non-Unit there is
no such concern, since we do not POP result of suspension point, but
rather, return it after CHECKCAST.

 #KT-50835 Fixed
2022-01-25 03:30:22 +01:00
Yahor Berdnikau e05f189082 Convert KotlinProjectIT to new test dsl
^KT-45745 In Progress
2022-01-24 23:27:28 +01:00
Yahor Berdnikau 1ac579b9b6 Convert SamWithReceiverModelIT to new test dsl
^KT-45745 In Progress
2022-01-24 23:27:28 +01:00
Yahor Berdnikau 8486972845 Convert NoArgModelIT to new test dsl
^KT-45745 In Progress
2022-01-24 23:27:28 +01:00
Yahor Berdnikau eba9f697c0 Convert KotlinAndroidExtensionIT to new test dsl
^KT-45745 In Progress
2022-01-24 23:27:28 +01:00
Yahor Berdnikau b07ba5f712 Convert KaptModelIT to new test dsl
^KT-45745 In Progress
2022-01-24 23:27:27 +01:00
Yahor Berdnikau 052b5c347e Convert AllOpenModelIT to new test dsl
^KT-45745 In Progress
2022-01-24 23:27:27 +01:00
Yahor Berdnikau e632189651 Add method to fetch from the project available models
^KT-45745 In Progress
2022-01-24 23:27:24 +01:00
Nikolay Krasko da556452c9 Use project directory as a base for stdlib js build
Some sources for kotlin-stdlib-js-ir are not copied to build dir
and used directly from the project.

Modify kotlin.test/js-ir as well, while there's no evidence of the
problem so far.

Should be removed after KT-50876 fix.

^KTI-730 In Progress
2022-01-25 00:58:54 +03:00
Xin Wang ebcc2cc3b2 PSI2IR: KT-49485 chunk ktConditions to avoid stackoverflow 2022-01-24 19:28:59 +03:00
Alexander Korepanov b40227b66e [JS IR] Re-export all JS-exports from main module in multi-module mode
Add an implicit transitive re-export through
main module for all other module's JS-exports.
2022-01-24 15:17:56 +00:00
Ilya Goncharov d52fa8dd9b [Gradle, JS] Add test on JS IR IC case with multiple artifacts 2022-01-24 14:46:50 +00:00