diff --git a/build.gradle.kts b/build.gradle.kts index aa3a40e0ba9..720220ad368 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -699,11 +699,9 @@ tasks { register("scriptingJvmTest") { dependsOn("dist") dependsOn(":kotlin-scripting-compiler:test") - dependsOn(":kotlin-scripting-compiler:testWithIr") dependsOn(":kotlin-scripting-common:test") dependsOn(":kotlin-scripting-jvm:test") dependsOn(":kotlin-scripting-jvm-host-test:test") - dependsOn(":kotlin-scripting-jvm-host-test:testWithIr") dependsOn(":kotlin-scripting-dependencies:test") dependsOn(":kotlin-scripting-dependencies-maven:test") dependsOn(":kotlin-scripting-jsr223-test:test") diff --git a/compiler/testData/cli/jvm/abiStabilityIncorrectValue.args b/compiler/testData/cli/jvm/abiStabilityIncorrectValue.args index 3bdd5af2b60..2032ab1c72b 100644 --- a/compiler/testData/cli/jvm/abiStabilityIncorrectValue.args +++ b/compiler/testData/cli/jvm/abiStabilityIncorrectValue.args @@ -1,5 +1,4 @@ $TESTDATA_DIR$/simple.kt -d $TEMP_DIR$ --Xuse-ir -Xabi-stability=unknown diff --git a/compiler/testData/cli/jvm/inlineCycle_ir.args b/compiler/testData/cli/jvm/inlineCycle_ir.args deleted file mode 100644 index bd33672d8ad..00000000000 --- a/compiler/testData/cli/jvm/inlineCycle_ir.args +++ /dev/null @@ -1,4 +0,0 @@ -$TESTDATA_DIR$/inlineCycle.kt --d -$TEMP_DIR$ --Xuse-ir diff --git a/compiler/testData/cli/jvm/inlineCycle_ir.out b/compiler/testData/cli/jvm/inlineCycle_ir.out deleted file mode 100644 index 5c8928dd385..00000000000 --- a/compiler/testData/cli/jvm/inlineCycle_ir.out +++ /dev/null @@ -1,7 +0,0 @@ -compiler/testData/cli/jvm/inlineCycle.kt:2:5: error: the 'b' invocation is a part of inline cycle - b(q) - ^ -compiler/testData/cli/jvm/inlineCycle.kt:18:5: error: the 'a' invocation is a part of inline cycle - a(p) - ^ -COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/irSupported.args b/compiler/testData/cli/jvm/irSupported.args deleted file mode 100644 index eeec739a45e..00000000000 --- a/compiler/testData/cli/jvm/irSupported.args +++ /dev/null @@ -1,8 +0,0 @@ -$TESTDATA_DIR$/simple.kt --d -$TEMP_DIR$ --language-version -1.4 --api-version -1.4 --Xuse-ir diff --git a/compiler/testData/cli/jvm/irSupported.out b/compiler/testData/cli/jvm/irSupported.out deleted file mode 100644 index 856bf234263..00000000000 --- a/compiler/testData/cli/jvm/irSupported.out +++ /dev/null @@ -1,2 +0,0 @@ -warning: language version 1.4 is deprecated and its support will be removed in a future version of Kotlin -OK diff --git a/compiler/testData/cli/jvm/jvmIrByDefault.kt b/compiler/testData/cli/jvm/jvmIrByDefault.kt deleted file mode 100644 index 16576cea591..00000000000 --- a/compiler/testData/cli/jvm/jvmIrByDefault.kt +++ /dev/null @@ -1,13 +0,0 @@ -// This test checks that with -language-version 1.4 we're using the old JVM backend, -// and with -language-version 1.5 -- the new JVM IR backend. -// JVM IR doesn't produce classes for local functions, so the test checks which backend -// is used by asserting that the file for the anonymous class does or doesn't exist. - -// Feel free to remove both _1_4 and _1_5 tests as soon as either the old JVM backend -// or LV 1.4 is removed, whichever happens earlier. - -class C { - fun test() { - fun local() {} - } -} diff --git a/compiler/testData/cli/jvm/jvmIrByDefault1_4.args b/compiler/testData/cli/jvm/jvmIrByDefault1_4.args deleted file mode 100644 index e82803d8640..00000000000 --- a/compiler/testData/cli/jvm/jvmIrByDefault1_4.args +++ /dev/null @@ -1,5 +0,0 @@ -$TESTDATA_DIR$/jvmIrByDefault.kt --d -$TEMP_DIR$ --language-version -1.4 diff --git a/compiler/testData/cli/jvm/jvmIrByDefault1_4.out b/compiler/testData/cli/jvm/jvmIrByDefault1_4.out deleted file mode 100644 index 856bf234263..00000000000 --- a/compiler/testData/cli/jvm/jvmIrByDefault1_4.out +++ /dev/null @@ -1,2 +0,0 @@ -warning: language version 1.4 is deprecated and its support will be removed in a future version of Kotlin -OK diff --git a/compiler/testData/cli/jvm/jvmIrByDefault1_4.test b/compiler/testData/cli/jvm/jvmIrByDefault1_4.test deleted file mode 100644 index 6992627b278..00000000000 --- a/compiler/testData/cli/jvm/jvmIrByDefault1_4.test +++ /dev/null @@ -1 +0,0 @@ -// EXISTS: C$test$1.class diff --git a/compiler/testData/cli/jvm/jvmIrByDefault1_5.args b/compiler/testData/cli/jvm/jvmIrByDefault1_5.args deleted file mode 100644 index 21fdb80fe66..00000000000 --- a/compiler/testData/cli/jvm/jvmIrByDefault1_5.args +++ /dev/null @@ -1,5 +0,0 @@ -$TESTDATA_DIR$/jvmIrByDefault.kt --d -$TEMP_DIR$ --language-version -1.5 diff --git a/compiler/testData/cli/jvm/jvmIrByDefault1_5.out b/compiler/testData/cli/jvm/jvmIrByDefault1_5.out deleted file mode 100644 index be580538bbd..00000000000 --- a/compiler/testData/cli/jvm/jvmIrByDefault1_5.out +++ /dev/null @@ -1,2 +0,0 @@ -warning: language version 1.5 is deprecated and its support will be removed in a future version of Kotlin -OK diff --git a/compiler/testData/cli/jvm/jvmIrByDefault1_5.test b/compiler/testData/cli/jvm/jvmIrByDefault1_5.test deleted file mode 100644 index c7ca4da7275..00000000000 --- a/compiler/testData/cli/jvm/jvmIrByDefault1_5.test +++ /dev/null @@ -1 +0,0 @@ -// ABSENT: C$test$1.class diff --git a/compiler/testData/cli/jvm/nonExistingPhaseName.args b/compiler/testData/cli/jvm/nonExistingPhaseName.args index 573ff3c2ed7..031b8484be1 100644 --- a/compiler/testData/cli/jvm/nonExistingPhaseName.args +++ b/compiler/testData/cli/jvm/nonExistingPhaseName.args @@ -1,5 +1,4 @@ -d $TEMP_DIR$ --Xuse-ir -Xverbose-phases=qz,qq $TESTDATA_DIR$/simple.kt diff --git a/compiler/testData/cli/jvm/nonLocalDisabled_ir.args b/compiler/testData/cli/jvm/nonLocalDisabled_ir.args deleted file mode 100644 index 796cfbb1fe0..00000000000 --- a/compiler/testData/cli/jvm/nonLocalDisabled_ir.args +++ /dev/null @@ -1,5 +0,0 @@ -$TESTDATA_DIR$/nonLocalDisabled.kt --Xno-inline --d -$TEMP_DIR$ --Xuse-ir diff --git a/compiler/testData/cli/jvm/nonLocalDisabled_ir.out b/compiler/testData/cli/jvm/nonLocalDisabled_ir.out deleted file mode 100644 index a7cfcfadfa5..00000000000 --- a/compiler/testData/cli/jvm/nonLocalDisabled_ir.out +++ /dev/null @@ -1,7 +0,0 @@ -compiler/testData/cli/jvm/nonLocalDisabled.kt:3:9: error: non-local returns are not allowed with inlining disabled - return - ^ -compiler/testData/cli/jvm/nonLocalDisabled.kt:7:9: error: non-local returns are not allowed with inlining disabled - return@a - ^ -COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyNestedAnnotationIr/library/a.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyNestedAnnotationIr/library/a.kt deleted file mode 100644 index 17d7314b7bb..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyNestedAnnotationIr/library/a.kt +++ /dev/null @@ -1,10 +0,0 @@ -package a - -import kotlin.reflect.KClass - -interface A { - @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPE_PARAMETER) - annotation class Anno(val value: String) -} - -annotation class K(val klass: KClass<*>) diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyNestedAnnotationIr/library/b.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyNestedAnnotationIr/library/b.kt deleted file mode 100644 index f006d4734f6..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyNestedAnnotationIr/library/b.kt +++ /dev/null @@ -1,10 +0,0 @@ -package b - -import a.* - -@A.Anno("B") -interface B { - @A.Anno("foo") - @K(A.Anno::class) - fun <@A.Anno("T") T> foo(t: T) = t -} diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyNestedAnnotationIr/source.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyNestedAnnotationIr/source.kt deleted file mode 100644 index ad564297819..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyNestedAnnotationIr/source.kt +++ /dev/null @@ -1,8 +0,0 @@ -package c - -import b.B - -// There should be _no_ error despite the fact that B and B#foo are annotated with an annotation which cannot be resolved -fun bar(b: B) { - b.foo("") -} diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgumentIr/library/a.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/library/a.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgumentIr/library/a.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/library/a.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgumentIr/library/b.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/library/b.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgumentIr/library/b.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/library/b.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/library/source.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/library/source.kt deleted file mode 100644 index 0964f508972..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/library/source.kt +++ /dev/null @@ -1,7 +0,0 @@ -package test - -enum class E { ENTRY } - -annotation class Anno(val e: E) - -@Anno(E.ENTRY) open class Class diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/missingEnumReferencedInAnnotationArgument.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/missingEnumReferencedInAnnotationArgument.kt deleted file mode 100644 index c964ab991a5..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/missingEnumReferencedInAnnotationArgument.kt +++ /dev/null @@ -1,3 +0,0 @@ -package test - -class Subclass : Class() diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/missingEnumReferencedInAnnotationArgument.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/missingEnumReferencedInAnnotationArgument.txt deleted file mode 100644 index 5620c1a69eb..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/missingEnumReferencedInAnnotationArgument.txt +++ /dev/null @@ -1,14 +0,0 @@ -package test - -public final annotation class Anno : kotlin.Annotation { - public constructor Anno(/*0*/ e: test.E) - public final val e: test.E -} - -@test.Anno(e = E.ENTRY) public open class Class { - public constructor Class() -} - -public final class Subclass : test.Class { - public constructor Subclass() -} diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyNestedAnnotationIr/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/output.txt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencyNestedAnnotationIr/output.txt rename to compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/output.txt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgumentIr/source.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/source.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgumentIr/source.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgument/source.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgumentIr/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgumentIr/output.txt deleted file mode 100644 index a0aba9318ad..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/missingEnumReferencedInAnnotationArgumentIr/output.txt +++ /dev/null @@ -1 +0,0 @@ -OK \ No newline at end of file diff --git a/compiler/testData/integration/smoke/helloAppFQMainIR/hello.compile.expected b/compiler/testData/integration/smoke/helloAppFQMainIR/hello.compile.expected deleted file mode 100644 index a14ac74940f..00000000000 --- a/compiler/testData/integration/smoke/helloAppFQMainIR/hello.compile.expected +++ /dev/null @@ -1 +0,0 @@ -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppFQMainIR/hello.kt b/compiler/testData/integration/smoke/helloAppFQMainIR/hello.kt deleted file mode 100644 index b6b68d62f4d..00000000000 --- a/compiler/testData/integration/smoke/helloAppFQMainIR/hello.kt +++ /dev/null @@ -1,6 +0,0 @@ -package Hello - -fun main(args: kotlin.Array) { - args.size - System.out.println("Hello from fully qualified main!") -} diff --git a/compiler/testData/integration/smoke/helloAppFQMainIR/hello.run.expected b/compiler/testData/integration/smoke/helloAppFQMainIR/hello.run.expected deleted file mode 100644 index f052dde0a17..00000000000 --- a/compiler/testData/integration/smoke/helloAppFQMainIR/hello.run.expected +++ /dev/null @@ -1,4 +0,0 @@ -OUT: -Hello from fully qualified main! - -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppIR/hello.compile.expected b/compiler/testData/integration/smoke/helloAppIR/hello.compile.expected deleted file mode 100644 index a14ac74940f..00000000000 --- a/compiler/testData/integration/smoke/helloAppIR/hello.compile.expected +++ /dev/null @@ -1 +0,0 @@ -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppIR/hello.kt b/compiler/testData/integration/smoke/helloAppIR/hello.kt deleted file mode 100644 index 54674a02472..00000000000 --- a/compiler/testData/integration/smoke/helloAppIR/hello.kt +++ /dev/null @@ -1,5 +0,0 @@ -package Hello - -fun main() { - System.out.println("Hello!") -} diff --git a/compiler/testData/integration/smoke/helloAppIR/hello.run.expected b/compiler/testData/integration/smoke/helloAppIR/hello.run.expected deleted file mode 100644 index fd58d467c30..00000000000 --- a/compiler/testData/integration/smoke/helloAppIR/hello.run.expected +++ /dev/null @@ -1,4 +0,0 @@ -OUT: -Hello! - -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppOldAndParameterlessMainIR/hello.compile.expected b/compiler/testData/integration/smoke/helloAppOldAndParameterlessMainIR/hello.compile.expected deleted file mode 100644 index a14ac74940f..00000000000 --- a/compiler/testData/integration/smoke/helloAppOldAndParameterlessMainIR/hello.compile.expected +++ /dev/null @@ -1 +0,0 @@ -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppOldAndParameterlessMainIR/hello.kt b/compiler/testData/integration/smoke/helloAppOldAndParameterlessMainIR/hello.kt deleted file mode 100644 index b5c9eb3b90e..00000000000 --- a/compiler/testData/integration/smoke/helloAppOldAndParameterlessMainIR/hello.kt +++ /dev/null @@ -1,10 +0,0 @@ -package Hello - -fun main(args: Array) { - args.size - System.out.println("Hello!") -} - -fun main() { - System.out.println("Fail") -} diff --git a/compiler/testData/integration/smoke/helloAppOldAndParameterlessMainIR/hello.run.expected b/compiler/testData/integration/smoke/helloAppOldAndParameterlessMainIR/hello.run.expected deleted file mode 100644 index fd58d467c30..00000000000 --- a/compiler/testData/integration/smoke/helloAppOldAndParameterlessMainIR/hello.run.expected +++ /dev/null @@ -1,4 +0,0 @@ -OUT: -Hello! - -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppParameterlessMainIR/hello.compile.expected b/compiler/testData/integration/smoke/helloAppParameterlessMainIR/hello.compile.expected deleted file mode 100644 index a14ac74940f..00000000000 --- a/compiler/testData/integration/smoke/helloAppParameterlessMainIR/hello.compile.expected +++ /dev/null @@ -1 +0,0 @@ -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppParameterlessMainIR/hello.kt b/compiler/testData/integration/smoke/helloAppParameterlessMainIR/hello.kt deleted file mode 100644 index 54674a02472..00000000000 --- a/compiler/testData/integration/smoke/helloAppParameterlessMainIR/hello.kt +++ /dev/null @@ -1,5 +0,0 @@ -package Hello - -fun main() { - System.out.println("Hello!") -} diff --git a/compiler/testData/integration/smoke/helloAppParameterlessMainIR/hello.run.expected b/compiler/testData/integration/smoke/helloAppParameterlessMainIR/hello.run.expected deleted file mode 100644 index fd58d467c30..00000000000 --- a/compiler/testData/integration/smoke/helloAppParameterlessMainIR/hello.run.expected +++ /dev/null @@ -1,4 +0,0 @@ -OUT: -Hello! - -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppSuspendMainIR/hello.compile.expected b/compiler/testData/integration/smoke/helloAppSuspendMainIR/hello.compile.expected deleted file mode 100644 index a14ac74940f..00000000000 --- a/compiler/testData/integration/smoke/helloAppSuspendMainIR/hello.compile.expected +++ /dev/null @@ -1 +0,0 @@ -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppSuspendMainIR/hello.kt b/compiler/testData/integration/smoke/helloAppSuspendMainIR/hello.kt deleted file mode 100644 index 6d04a9e3581..00000000000 --- a/compiler/testData/integration/smoke/helloAppSuspendMainIR/hello.kt +++ /dev/null @@ -1,35 +0,0 @@ -package Hello - -import kotlin.concurrent.thread -import kotlin.coroutines.suspendCoroutine -import kotlin.coroutines.resume - -@kotlin.jvm.Volatile -private var result = "" -@kotlin.jvm.Volatile -private var callback: Function0? = null - -suspend fun appendAndSuspend(s: String) { - result += s - - suspendCoroutine { continuation -> - callback = { - continuation.resume(Unit) - } - } -} - -suspend fun main(args: Array) { - thread(isDaemon = true) { - while (true) { - val c = callback - c?.invoke() - Thread.sleep(500) - } - } - - appendAndSuspend(args[0]) - appendAndSuspend(args[1]) - println(result) - callback = null -} diff --git a/compiler/testData/integration/smoke/helloAppSuspendMainIR/hello.run.expected b/compiler/testData/integration/smoke/helloAppSuspendMainIR/hello.run.expected deleted file mode 100644 index 4000785a4d1..00000000000 --- a/compiler/testData/integration/smoke/helloAppSuspendMainIR/hello.run.expected +++ /dev/null @@ -1,4 +0,0 @@ -OUT: -OK - -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppSuspendMainInMultifileIR/hello.compile.expected b/compiler/testData/integration/smoke/helloAppSuspendMainInMultifileIR/hello.compile.expected deleted file mode 100644 index a14ac74940f..00000000000 --- a/compiler/testData/integration/smoke/helloAppSuspendMainInMultifileIR/hello.compile.expected +++ /dev/null @@ -1 +0,0 @@ -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppSuspendMainInMultifileIR/hello.kt b/compiler/testData/integration/smoke/helloAppSuspendMainInMultifileIR/hello.kt deleted file mode 100644 index f71af621f9a..00000000000 --- a/compiler/testData/integration/smoke/helloAppSuspendMainInMultifileIR/hello.kt +++ /dev/null @@ -1,37 +0,0 @@ -@file:JvmMultifileClass -@file:JvmName("Foo") -package Hello - -import kotlin.concurrent.thread -import kotlin.coroutines.suspendCoroutine -import kotlin.coroutines.resume - -@kotlin.jvm.Volatile -private var result = "" -@kotlin.jvm.Volatile -private var callback: Function0? = null - -suspend fun appendAndSuspend(s: String) { - result += s - - suspendCoroutine { continuation -> - callback = { - continuation.resume(Unit) - } - } -} - -suspend fun main(args: Array) { - thread(isDaemon = true) { - while (true) { - val c = callback - c?.invoke() - Thread.sleep(500) - } - } - - appendAndSuspend(args[0]) - appendAndSuspend(args[1]) - println(result) - callback = null -} diff --git a/compiler/testData/integration/smoke/helloAppSuspendMainInMultifileIR/hello.run.expected b/compiler/testData/integration/smoke/helloAppSuspendMainInMultifileIR/hello.run.expected deleted file mode 100644 index 4000785a4d1..00000000000 --- a/compiler/testData/integration/smoke/helloAppSuspendMainInMultifileIR/hello.run.expected +++ /dev/null @@ -1,4 +0,0 @@ -OUT: -OK - -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppSuspendParameterlessMainIR/hello.compile.expected b/compiler/testData/integration/smoke/helloAppSuspendParameterlessMainIR/hello.compile.expected deleted file mode 100644 index a14ac74940f..00000000000 --- a/compiler/testData/integration/smoke/helloAppSuspendParameterlessMainIR/hello.compile.expected +++ /dev/null @@ -1 +0,0 @@ -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppSuspendParameterlessMainIR/hello.kt b/compiler/testData/integration/smoke/helloAppSuspendParameterlessMainIR/hello.kt deleted file mode 100644 index 473bde1e5d8..00000000000 --- a/compiler/testData/integration/smoke/helloAppSuspendParameterlessMainIR/hello.kt +++ /dev/null @@ -1,36 +0,0 @@ -package Hello - -import kotlin.concurrent.thread -import kotlin.coroutines.suspendCoroutine -import kotlin.coroutines.resume -import kotlin.reflect.jvm.javaMethod - -@kotlin.jvm.Volatile -private var result = "" -@kotlin.jvm.Volatile -private var callback: Function0? = null - -suspend fun appendAndSuspend(s: String) { - result += s - - suspendCoroutine { continuation -> - callback = { - continuation.resume(Unit) - } - } -} - -suspend fun main() { - thread(isDaemon = true) { - while (true) { - val c = callback - c?.invoke() - Thread.sleep(500) - } - } - - appendAndSuspend("O") - appendAndSuspend("K") - println(result) - callback = null -} diff --git a/compiler/testData/integration/smoke/helloAppSuspendParameterlessMainIR/hello.run.expected b/compiler/testData/integration/smoke/helloAppSuspendParameterlessMainIR/hello.run.expected deleted file mode 100644 index 4000785a4d1..00000000000 --- a/compiler/testData/integration/smoke/helloAppSuspendParameterlessMainIR/hello.run.expected +++ /dev/null @@ -1,4 +0,0 @@ -OUT: -OK - -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppVarargMainIR/hello.compile.expected b/compiler/testData/integration/smoke/helloAppVarargMainIR/hello.compile.expected deleted file mode 100644 index a14ac74940f..00000000000 --- a/compiler/testData/integration/smoke/helloAppVarargMainIR/hello.compile.expected +++ /dev/null @@ -1 +0,0 @@ -Return code: 0 diff --git a/compiler/testData/integration/smoke/helloAppVarargMainIR/hello.kt b/compiler/testData/integration/smoke/helloAppVarargMainIR/hello.kt deleted file mode 100644 index 0382047311b..00000000000 --- a/compiler/testData/integration/smoke/helloAppVarargMainIR/hello.kt +++ /dev/null @@ -1,6 +0,0 @@ -package Hello - -fun main(vararg args: kotlin.String) { - args.size - System.out.println("Hello from vararg main!") -} diff --git a/compiler/testData/integration/smoke/helloAppVarargMainIR/hello.run.expected b/compiler/testData/integration/smoke/helloAppVarargMainIR/hello.run.expected deleted file mode 100644 index bb985624029..00000000000 --- a/compiler/testData/integration/smoke/helloAppVarargMainIR/hello.run.expected +++ /dev/null @@ -1,4 +0,0 @@ -OUT: -Hello from vararg main! - -Return code: 0 diff --git a/compiler/testData/integration/smoke/simplestSuspendMainIR/hello.compile.expected b/compiler/testData/integration/smoke/simplestSuspendMainIR/hello.compile.expected deleted file mode 100644 index a14ac74940f..00000000000 --- a/compiler/testData/integration/smoke/simplestSuspendMainIR/hello.compile.expected +++ /dev/null @@ -1 +0,0 @@ -Return code: 0 diff --git a/compiler/testData/integration/smoke/simplestSuspendMainIR/hello.kt b/compiler/testData/integration/smoke/simplestSuspendMainIR/hello.kt deleted file mode 100644 index 602f561a07f..00000000000 --- a/compiler/testData/integration/smoke/simplestSuspendMainIR/hello.kt +++ /dev/null @@ -1,10 +0,0 @@ -package Hello - -suspend fun f(o: String, k: String): String { - return o + k -} - -suspend fun main(args: Array) { - val result = f(args[0], args[1]) - println(result) -} diff --git a/compiler/testData/integration/smoke/simplestSuspendMainIR/hello.run.expected b/compiler/testData/integration/smoke/simplestSuspendMainIR/hello.run.expected deleted file mode 100644 index 4000785a4d1..00000000000 --- a/compiler/testData/integration/smoke/simplestSuspendMainIR/hello.run.expected +++ /dev/null @@ -1,4 +0,0 @@ -OUT: -OK - -Return code: 0 diff --git a/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java index 0876eafa7dd..d6c44ecd869 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java @@ -840,16 +840,6 @@ public class CliTestGenerated extends AbstractCliTest { runTest("compiler/testData/cli/jvm/jvmDefaultIncorrectValue.args"); } - @TestMetadata("jvmIrByDefault1_4.args") - public void testJvmIrByDefault1_4() throws Exception { - runTest("compiler/testData/cli/jvm/jvmIrByDefault1_4.args"); - } - - @TestMetadata("jvmIrByDefault1_5.args") - public void testJvmIrByDefault1_5() throws Exception { - runTest("compiler/testData/cli/jvm/jvmIrByDefault1_5.args"); - } - @TestMetadata("jvmRecordOk.args") public void testJvmRecordOk() throws Exception { runTest("compiler/testData/cli/jvm/jvmRecordOk.args"); diff --git a/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java b/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java index 64e79733ff7..b85a56689ed 100644 --- a/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java +++ b/compiler/tests/org/jetbrains/kotlin/integration/CompilerSmokeTest.java @@ -24,7 +24,10 @@ import org.jetbrains.kotlin.utils.StringsKt; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; @SuppressWarnings("ResultOfMethodCallIgnored") public class CompilerSmokeTest extends CompilerSmokeTestBase { @@ -36,13 +39,6 @@ public class CompilerSmokeTest extends CompilerSmokeTestBase { run("hello.run", "-cp", jar, "Hello.HelloKt"); } - public void testHelloAppIR() throws Exception { - String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; - - assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "-Xuse-ir", "hello.kt", "-d", jar)); - run("hello.run", "-cp", jar, "Hello.HelloKt"); - } - public void testHelloAppFQMain() throws Exception { String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; @@ -50,13 +46,6 @@ public class CompilerSmokeTest extends CompilerSmokeTestBase { run("hello.run", "-cp", jar, "Hello.HelloKt"); } - public void testHelloAppFQMainIR() throws Exception { - String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; - - assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "-Xuse-ir", "hello.kt", "-d", jar)); - run("hello.run", "-cp", jar, "Hello.HelloKt"); - } - public void testHelloAppVarargMain() throws Exception { String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; @@ -64,13 +53,6 @@ public class CompilerSmokeTest extends CompilerSmokeTestBase { run("hello.run", "-cp", jar, "Hello.HelloKt"); } - public void testHelloAppVarargMainIR() throws Exception { - String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; - - assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "-Xuse-ir", "hello.kt", "-d", jar)); - run("hello.run", "-cp", jar, "Hello.HelloKt"); - } - public void testHelloAppSuspendMain() throws Exception { String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; @@ -85,13 +67,6 @@ public class CompilerSmokeTest extends CompilerSmokeTestBase { run("hello.run", "-cp", jar, "Hello.Foo", "O", "K"); } - public void testHelloAppSuspendMainInMultifileIR() throws Exception { - String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; - - assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "-Xuse-ir", "hello.kt", "-d", jar)); - run("hello.run", "-cp", jar, "Hello.Foo", "O", "K"); - } - public void testHelloAppParameterlessMain() throws Exception { String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; @@ -99,13 +74,6 @@ public class CompilerSmokeTest extends CompilerSmokeTestBase { run("hello.run", "-cp", jar, "Hello.HelloKt"); } - public void testHelloAppParameterlessMainIR() throws Exception { - String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; - - assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "-Xuse-ir", "hello.kt", "-d", jar)); - run("hello.run", "-cp", jar, "Hello.HelloKt"); - } - public void testHelloAppOldAndParameterlessMain() throws Exception { String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; @@ -113,13 +81,6 @@ public class CompilerSmokeTest extends CompilerSmokeTestBase { run("hello.run", "-cp", jar, "Hello.HelloKt"); } - public void testHelloAppOldAndParameterlessMainIR() throws Exception { - String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; - - assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "-Xuse-ir", "hello.kt", "-d", jar)); - run("hello.run", "-cp", jar, "Hello.HelloKt"); - } - public void testHelloAppSuspendParameterlessMain() throws Exception { String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; @@ -127,20 +88,6 @@ public class CompilerSmokeTest extends CompilerSmokeTestBase { run("hello.run", "-cp", jar, "Hello.HelloKt", "O", "K"); } - public void testHelloAppSuspendParameterlessMainIR() throws Exception { - String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; - - assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "-Xuse-ir", "hello.kt", "-d", jar)); - run("hello.run", "-cp", jar, "Hello.HelloKt", "O", "K"); - } - - public void testSimplestSuspendMainIR() throws Exception { - String jar = tmpdir.getAbsolutePath() + File.separator + "hello.jar"; - - assertEquals("compilation failed", 0, runCompiler("hello.compile", "-include-runtime", "-Xuse-ir", "hello.kt", "-d", jar)); - run("hello.run", "-cp", jar, "Hello.HelloKt", "O", "K"); - } - public void testCompilationFailed() throws Exception { String jar = tmpdir.getAbsolutePath() + File.separator + "smoke.jar"; diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt index 155b023679a..eb509591902 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt @@ -179,11 +179,7 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration } fun testMissingEnumReferencedInAnnotationArgument() { - doTestWithTxt(copyJarFileWithoutEntry(compileLibrary("library"), "test/E.class")) - } - - fun testMissingEnumReferencedInAnnotationArgumentIr() { - doTestBrokenLibrary("library", "a/E.class", additionalOptions = listOf("-Xuse-ir")) + doTestBrokenLibrary("library", "a/E.class") } fun testNoWarningsOnJavaKotlinInheritance() { @@ -266,10 +262,6 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration doTestBrokenLibrary("library", "a/A\$Anno.class") } - fun testMissingDependencyNestedAnnotationIr() { - doTestBrokenLibrary("library", "a/A\$Anno.class", additionalOptions = listOf("-Xuse-ir")) - } - fun testMissingDependencyConflictingLibraries() { val library1 = copyJarFileWithoutEntry( compileLibrary("library1"), @@ -680,10 +672,10 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration } fun testOldJvmAgainstJvmIr() { - val library = compileLibrary("library", additionalOptions = listOf("-Xuse-ir")) + val library = compileLibrary("library") compileKotlin("source.kt", tmpdir, listOf(library)) - val library2 = compileLibrary("library", additionalOptions = listOf("-Xuse-ir", "-Xabi-stability=stable")) + val library2 = compileLibrary("library", additionalOptions = listOf("-Xabi-stability=stable")) compileKotlin("source.kt", tmpdir, listOf(library2)) } @@ -696,7 +688,7 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration } fun testOldJvmAgainstJvmIrWithUnstableAbi() { - val library = compileLibrary("library", additionalOptions = listOf("-Xuse-ir", "-Xabi-stability=unstable")) + val library = compileLibrary("library", additionalOptions = listOf("-Xabi-stability=unstable")) compileKotlin("source.kt", tmpdir, listOf(library)) } diff --git a/libraries/scripting/jvm-host-test/build.gradle.kts b/libraries/scripting/jvm-host-test/build.gradle.kts index 10aa019a66d..996ebcddf05 100644 --- a/libraries/scripting/jvm-host-test/build.gradle.kts +++ b/libraries/scripting/jvm-host-test/build.gradle.kts @@ -43,7 +43,6 @@ tasks.withType> { projectTest(parallel = true) { dependsOn(":dist") workingDir = rootDir - systemProperty("kotlin.script.test.base.compiler.arguments", "-Xuse-old-backend") } // This doesn;t work now due to conflicts between embeddable compiler contents and intellij sdk modules @@ -54,12 +53,6 @@ projectTest(parallel = true) { // classpath = embeddableTestRuntime //} -projectTest(taskName = "testWithIr", parallel = true) { - dependsOn(":dist") - workingDir = rootDir - systemProperty("kotlin.script.base.compiler.arguments", "-Xuse-ir") -} - projectTest(taskName = "testWithK2", parallel = true) { dependsOn(":dist") workingDir = rootDir diff --git a/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/ImplicitsFromScriptResultTest.kt b/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/ImplicitsFromScriptResultTest.kt index a590f0f5a1e..f0bd400ab5b 100644 --- a/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/ImplicitsFromScriptResultTest.kt +++ b/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/ImplicitsFromScriptResultTest.kt @@ -35,24 +35,19 @@ import kotlin.script.experimental.jvmhost.JvmScriptCompiler */ class ImplicitsFromScriptResultTest : TestCase() { fun testImplicits() { - if (System.getProperty("kotlin.script.base.compiler.arguments")?.let { - !it.contains("-Xuse-ir") || it.contains("-Xuse-old-backend") - } == true - ) { - // the implementation of the Compiler Host doesn't work with IR - the inter-script symbol table - // should be maintained to make it run (see latest REPL compiler implementations for details - // TODO: consider either fix it or rewrite to the REPL compiler - val host = CompilerHost() + // the implementation of the Compiler Host doesn't work with IR - the inter-script symbol table + // should be maintained to make it run (see latest REPL compiler implementations for details + // TODO: consider either fix it or rewrite to the REPL compiler + val host = CompilerHost() - val snippets = listOf( - "val xyz0 = 42", - "fun f() = xyz0", - "val finalRes = xyz0 + f()", - ) - for (snippet in snippets) { - val res = host.compile(snippet) - assertTrue(res is ResultWithDiagnostics.Success) - } + val snippets = listOf( + "val xyz0 = 42", + "fun f() = xyz0", + "val finalRes = xyz0 + f()", + ) + for (snippet in snippets) { + val res = host.compile(snippet) + assertTrue(res is ResultWithDiagnostics.Success) } } } diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/CompilerOptionsProjectIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/CompilerOptionsProjectIT.kt index dc505e14dab..d3432b7e1a3 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/CompilerOptionsProjectIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/CompilerOptionsProjectIT.kt @@ -74,7 +74,7 @@ class CompilerOptionsProjectIT : KGPBaseTest() { | apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0 | progressiveMode = true | optIn.add("my.custom.OptInAnnotation") - | freeCompilerArgs.add("-Xuse-ir") + | freeCompilerArgs.add("-Xdebug") | } |} """.trimMargin() @@ -105,9 +105,9 @@ class CompilerOptionsProjectIT : KGPBaseTest() { "Compiler arguments does not contain '-opt-in my.custom.OptInAnnotation': $compilationArgs" } - assert(compilationArgs.contains("-Xuse-ir")) { + assert(compilationArgs.contains("-Xdebug")) { printBuildOutput() - "Compiler arguments does not contain '-Xuse-ir': $compilationArgs" + "Compiler arguments does not contain '-Xdebug': $compilationArgs" } } } @@ -132,7 +132,7 @@ class CompilerOptionsProjectIT : KGPBaseTest() { | apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0 | progressiveMode = true | optIn.add("my.custom.OptInAnnotation") - | freeCompilerArgs.add("-Xuse-ir") + | freeCompilerArgs.add("-Xdebug") | } | | sourceSets.all { diff --git a/plugins/scripting/scripting-compiler/build.gradle.kts b/plugins/scripting/scripting-compiler/build.gradle.kts index 20c010705a2..0aafbd8e4e7 100644 --- a/plugins/scripting/scripting-compiler/build.gradle.kts +++ b/plugins/scripting/scripting-compiler/build.gradle.kts @@ -63,14 +63,6 @@ projectTest(parallel = true) { dependsOn(":dist") workingDir = rootDir systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator)) - systemProperty("kotlin.script.test.base.compiler.arguments", "-Xuse-old-backend") -} - -projectTest(taskName = "testWithIr", parallel = true) { - dependsOn(":dist") - workingDir = rootDir - systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator)) - systemProperty("kotlin.script.test.base.compiler.arguments", "-Xuse-ir") } projectTest(taskName = "testWithK2", parallel = true) {