diff --git a/compiler/testData/codegen/bytecodeListing/annotations/JvmSynthetic.kt b/compiler/testData/codegen/bytecodeListing/annotations/JvmSynthetic.kt index 83c67516e11..f89bfc794eb 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/JvmSynthetic.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/JvmSynthetic.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME class Example { diff --git a/compiler/testData/codegen/bytecodeListing/annotations/deprecatedJvmOverloads.kt b/compiler/testData/codegen/bytecodeListing/annotations/deprecatedJvmOverloads.kt index 5f8714792ef..cebdb0077e9 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/deprecatedJvmOverloads.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/deprecatedJvmOverloads.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME class Foo { diff --git a/compiler/testData/codegen/bytecodeListing/annotations/kt27895.kt b/compiler/testData/codegen/bytecodeListing/annotations/kt27895.kt index 120785dc2f9..e6f78ac0e54 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/kt27895.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/kt27895.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR @Target(AnnotationTarget.FIELD) annotation class Anno diff --git a/compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt b/compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt index 146922068b2..9671debbfb9 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR annotation class Ann @Ann open class My diff --git a/compiler/testData/codegen/bytecodeListing/annotations/literals.kt b/compiler/testData/codegen/bytecodeListing/annotations/literals.kt index f25566a7679..3edca14540d 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/literals.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/literals.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR @Target(AnnotationTarget.CLASS) annotation class ClsAnn diff --git a/compiler/testData/codegen/bytecodeListing/annotations/localClassWithCapturedParams.kt b/compiler/testData/codegen/bytecodeListing/annotations/localClassWithCapturedParams.kt index 5bc9bd54e7f..b69b4e2c3de 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/localClassWithCapturedParams.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/localClassWithCapturedParams.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR annotation class Simple(val value: String) fun localCaptured(): Any { diff --git a/compiler/testData/codegen/bytecodeListing/annotations/noAdditionalAnnotationsInAccessors.kt b/compiler/testData/codegen/bytecodeListing/annotations/noAdditionalAnnotationsInAccessors.kt index deb6346204a..402e087dc22 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/noAdditionalAnnotationsInAccessors.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/noAdditionalAnnotationsInAccessors.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class Foo private constructor(s: String) { private fun foo(s: String) {} diff --git a/compiler/testData/codegen/bytecodeListing/annotations/noAnnotationsInSyntheticAccessors.kt b/compiler/testData/codegen/bytecodeListing/annotations/noAnnotationsInSyntheticAccessors.kt index b266aca852c..159caa5a807 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/noAnnotationsInSyntheticAccessors.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/noAnnotationsInSyntheticAccessors.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR annotation class Ann class Foo private @Ann constructor(@Ann s: String) { diff --git a/compiler/testData/codegen/bytecodeListing/annotations/onProperties.kt b/compiler/testData/codegen/bytecodeListing/annotations/onProperties.kt index 0f135bf929c..c16d367b387 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/onProperties.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/onProperties.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm +// IGNORE_BACKEND: JVM_IR import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt b/compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt index c607b5ba4ba..a256b93734d 100644 --- a/compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt +++ b/compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class A { val a = "" fun b() = "" diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.kt index 401e304ccaa..354f7e5d8ac 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.kt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // FILE: test/B.java diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.kt index 621e835c000..bb9b84f058b 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.kt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME open class A : Collection { diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.kt index 1007fe0c8f1..7e327e9f447 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.kt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME open class A : Collection { diff --git a/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_after.kt b/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_after.kt index b4bfd809bc9..1f3c1e13f78 100644 --- a/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_after.kt +++ b/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_after.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField +// IGNORE_BACKEND: JVM_IR open class TestProtectedCompanionInClass { protected companion object diff --git a/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_before.kt b/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_before.kt index 8e91d07b7a3..7ce60715062 100644 --- a/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_before.kt +++ b/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_before.kt @@ -1,4 +1,5 @@ // !LANGUAGE: -ProperVisibilityForCompanionObjectInstanceField +// IGNORE_BACKEND: JVM_IR open class TestProtectedCompanionInClass { protected companion object diff --git a/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_lv13.kt b/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_lv13.kt index a350bb47e98..b0596804cc5 100644 --- a/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_lv13.kt +++ b/compiler/testData/codegen/bytecodeListing/companionObjectVisibility_lv13.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR open class TestProtectedCompanionInClass { protected companion object } diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/coroutineContextIntrinsic.kt b/compiler/testData/codegen/bytecodeListing/coroutines/coroutineContextIntrinsic.kt index 3c406d64a77..12c45270b93 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/coroutineContextIntrinsic.kt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/coroutineContextIntrinsic.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // COMMON_COROUTINES_TEST import COROUTINES_PACKAGE.* diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/coroutineFields.kt b/compiler/testData/codegen/bytecodeListing/coroutines/coroutineFields.kt index 157186a1bf6..02f4488ceaa 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/coroutineFields.kt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/coroutineFields.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // COMMON_COROUTINES_TEST import COROUTINES_PACKAGE.* diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.kt b/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.kt index 30419952e54..ef7f2b817b2 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.kt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // COMMON_COROUTINES_TEST // WITH_COROUTINES diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/privateAccessor.kt b/compiler/testData/codegen/bytecodeListing/coroutines/privateAccessor.kt index 35aae7d604c..e55883ab685 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/privateAccessor.kt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/privateAccessor.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // COMMON_COROUTINES_TEST import COROUTINES_PACKAGE.* diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/privateSuspendFun.kt b/compiler/testData/codegen/bytecodeListing/coroutines/privateSuspendFun.kt index ef751acfc87..6a917105b85 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/privateSuspendFun.kt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/privateSuspendFun.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR private suspend fun foo() {} class A { diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/suspendReifiedFun.kt b/compiler/testData/codegen/bytecodeListing/coroutines/suspendReifiedFun.kt index 89e4f357fe4..a5dda618eac 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/suspendReifiedFun.kt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/suspendReifiedFun.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // COMMON_COROUTINES_TEST // WITH_RUNTIME diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.kt b/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.kt index ea900311c20..b650ee83e77 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.kt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // COMMON_COROUTINES_TEST // WITH_RUNTIME // WITH_COROUTINES diff --git a/compiler/testData/codegen/bytecodeListing/defaultImpls.kt b/compiler/testData/codegen/bytecodeListing/defaultImpls.kt index 98b37bbca45..4629670528b 100644 --- a/compiler/testData/codegen/bytecodeListing/defaultImpls.kt +++ b/compiler/testData/codegen/bytecodeListing/defaultImpls.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface A interface B { diff --git a/compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt b/compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt index bf435726c0a..d81ae42cc9c 100644 --- a/compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt +++ b/compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME @file:[JvmName("Foo") JvmMultifileClass] diff --git a/compiler/testData/codegen/bytecodeListing/immutableCollection.kt b/compiler/testData/codegen/bytecodeListing/immutableCollection.kt index 827f0a50f45..3dec72a3bb4 100644 --- a/compiler/testData/codegen/bytecodeListing/immutableCollection.kt +++ b/compiler/testData/codegen/bytecodeListing/immutableCollection.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface ImmutableCollection : Collection { fun add(element: @UnsafeVariance E): ImmutableCollection fun addAll(elements: Collection<@UnsafeVariance E>): ImmutableCollection diff --git a/compiler/testData/codegen/bytecodeListing/inline/InlineOnlyMultifile.kt b/compiler/testData/codegen/bytecodeListing/inline/InlineOnlyMultifile.kt index 9ca588a09ef..097d02557a2 100644 --- a/compiler/testData/codegen/bytecodeListing/inline/InlineOnlyMultifile.kt +++ b/compiler/testData/codegen/bytecodeListing/inline/InlineOnlyMultifile.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME @file:[JvmName("Foo") JvmMultifileClass] diff --git a/compiler/testData/codegen/bytecodeListing/inline/InlineOnlyPropertyMultifile.kt b/compiler/testData/codegen/bytecodeListing/inline/InlineOnlyPropertyMultifile.kt index f73516ef2bd..a97fd9f9179 100644 --- a/compiler/testData/codegen/bytecodeListing/inline/InlineOnlyPropertyMultifile.kt +++ b/compiler/testData/codegen/bytecodeListing/inline/InlineOnlyPropertyMultifile.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME @file:[JvmName("Foo") JvmMultifileClass] diff --git a/compiler/testData/codegen/bytecodeListing/inline/InlineReifiedMultifile.kt b/compiler/testData/codegen/bytecodeListing/inline/InlineReifiedMultifile.kt index a73ab89072c..a1ea740d039 100644 --- a/compiler/testData/codegen/bytecodeListing/inline/InlineReifiedMultifile.kt +++ b/compiler/testData/codegen/bytecodeListing/inline/InlineReifiedMultifile.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME @file:[JvmName("Foo") JvmMultifileClass] diff --git a/compiler/testData/codegen/bytecodeListing/inline/InlineReifiedPropertyMultifile.kt b/compiler/testData/codegen/bytecodeListing/inline/InlineReifiedPropertyMultifile.kt index 15ae30ba78c..d46823c27d3 100644 --- a/compiler/testData/codegen/bytecodeListing/inline/InlineReifiedPropertyMultifile.kt +++ b/compiler/testData/codegen/bytecodeListing/inline/InlineReifiedPropertyMultifile.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME @file:[JvmName("Foo") JvmMultifileClass] diff --git a/compiler/testData/codegen/bytecodeListing/inline/inlineOnlyProperty.kt b/compiler/testData/codegen/bytecodeListing/inline/inlineOnlyProperty.kt index cc6ea56387d..7ae6fb3d256 100644 --- a/compiler/testData/codegen/bytecodeListing/inline/inlineOnlyProperty.kt +++ b/compiler/testData/codegen/bytecodeListing/inline/inlineOnlyProperty.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") diff --git a/compiler/testData/codegen/bytecodeListing/inline/inlineReified.kt b/compiler/testData/codegen/bytecodeListing/inline/inlineReified.kt index 68dc34d48ab..4d4c26b078a 100644 --- a/compiler/testData/codegen/bytecodeListing/inline/inlineReified.kt +++ b/compiler/testData/codegen/bytecodeListing/inline/inlineReified.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR inline fun bar() { } inline fun baz() {} diff --git a/compiler/testData/codegen/bytecodeListing/inline/inlineReifiedProperty.kt b/compiler/testData/codegen/bytecodeListing/inline/inlineReifiedProperty.kt index f24ca57dc30..fd07a3b3f4b 100644 --- a/compiler/testData/codegen/bytecodeListing/inline/inlineReifiedProperty.kt +++ b/compiler/testData/codegen/bytecodeListing/inline/inlineReifiedProperty.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR inline val Z.extProp: String get() = "123" diff --git a/compiler/testData/codegen/bytecodeListing/inline/simpleNamed.kt b/compiler/testData/codegen/bytecodeListing/inline/simpleNamed.kt index f4226f1356e..1041bf3705e 100644 --- a/compiler/testData/codegen/bytecodeListing/inline/simpleNamed.kt +++ b/compiler/testData/codegen/bytecodeListing/inline/simpleNamed.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME suspend inline fun simple() {} diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/annotationsOnHiddenConstructor.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/annotationsOnHiddenConstructor.kt index a01c480422c..88ad2e947f8 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/annotationsOnHiddenConstructor.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/annotationsOnHiddenConstructor.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR annotation class Ann diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/companionObjectInsideInlineClass.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/companionObjectInsideInlineClass.kt index 5f482095528..f3494aa2063 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/companionObjectInsideInlineClass.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/companionObjectInsideInlineClass.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR inline class Foo(val x: Int) { companion object { diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/computablePropertiesInsideInlineClass.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/computablePropertiesInsideInlineClass.kt index dafa4616f9a..b7eea9a594f 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/computablePropertiesInsideInlineClass.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/computablePropertiesInsideInlineClass.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR inline class Foo(val x: Int) { val prop: Int get() = 1 diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/constructorsWithDefaultParameterValues.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/constructorsWithDefaultParameterValues.kt index 13de329d234..79266470154 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/constructorsWithDefaultParameterValues.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/constructorsWithDefaultParameterValues.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR inline class Test(val x: Int = 0) { constructor(a: Int, b: Int, c: Int = 42) : this(a + b + c) diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassMembersVisibility.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassMembersVisibility.kt index 8e29c2d58cc..5598c90c661 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassMembersVisibility.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassMembersVisibility.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR inline class Z(val x: Int) { constructor(x: Long) : this(x.toInt()) diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.kt index c8f0b7ffcba..e52a50b03c5 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR inline class Z(val x: Int) diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithInlineClassUnderlyingType.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithInlineClassUnderlyingType.kt index ac8d12e9f93..215da088483 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithInlineClassUnderlyingType.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithInlineClassUnderlyingType.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR inline class Z1(val x: Int) diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithManyKindsOfMembers.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithManyKindsOfMembers.kt index 4122d2f2a58..b7aff75a4d5 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithManyKindsOfMembers.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithManyKindsOfMembers.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +UseGetterNameForPropertyAnnotationsMethodOnJvm +// IGNORE_BACKEND: JVM_IR interface IFoo { fun overridingFun() diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.kt index 7d665432f24..4965c36f0b4 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR interface A { fun foo(a: T) diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/nullabilityInExpansion.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/nullabilityInExpansion.kt index 0b8676305fe..1956c578aca 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/nullabilityInExpansion.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/nullabilityInExpansion.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR inline class Z1(val x: Int) inline class Z2(val z: Z1) diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/primaryValsWithDifferentVisibilities.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/primaryValsWithDifferentVisibilities.kt index 0f39b5e41fa..90200c312b3 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/primaryValsWithDifferentVisibilities.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/primaryValsWithDifferentVisibilities.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR interface IValue { val value: Int diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/publishedApiAnnotationOnInlineClassConstructor.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/publishedApiAnnotationOnInlineClassConstructor.kt index 0f122f258d6..c4b954eb558 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/publishedApiAnnotationOnInlineClassConstructor.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/publishedApiAnnotationOnInlineClassConstructor.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR @Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS") inline class Z @PublishedApi internal constructor(val value: Int) \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrimitive.kt b/compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrimitive.kt index 815b0cec570..d899ad355d6 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrimitive.kt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrimitive.kt @@ -1,4 +1,5 @@ // !LANGUAGE: +InlineClasses +// IGNORE_BACKEND: JVM_IR inline class Foo(val l: Long) { fun empty() {} diff --git a/compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt b/compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt index 458b4f14add..0a4312659e7 100644 --- a/compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt +++ b/compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME annotation class StringRes diff --git a/compiler/testData/codegen/bytecodeListing/main/multifileSuspend.kt b/compiler/testData/codegen/bytecodeListing/main/multifileSuspend.kt index 2c5c1a1bd42..459fbdc1bc8 100644 --- a/compiler/testData/codegen/bytecodeListing/main/multifileSuspend.kt +++ b/compiler/testData/codegen/bytecodeListing/main/multifileSuspend.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME @file:JvmMultifileClass @file:JvmName("Foo") diff --git a/compiler/testData/codegen/bytecodeListing/main/parameterlessMain.kt b/compiler/testData/codegen/bytecodeListing/main/parameterlessMain.kt index 1eb139e269f..ed4dd2d4709 100644 --- a/compiler/testData/codegen/bytecodeListing/main/parameterlessMain.kt +++ b/compiler/testData/codegen/bytecodeListing/main/parameterlessMain.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME fun main() {} diff --git a/compiler/testData/codegen/bytecodeListing/main/suspendMain.kt b/compiler/testData/codegen/bytecodeListing/main/suspendMain.kt index 6bce5e92de0..5686bd25b48 100644 --- a/compiler/testData/codegen/bytecodeListing/main/suspendMain.kt +++ b/compiler/testData/codegen/bytecodeListing/main/suspendMain.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME suspend fun main(args: Array) {} diff --git a/compiler/testData/codegen/bytecodeListing/main/suspendMain_before.kt b/compiler/testData/codegen/bytecodeListing/main/suspendMain_before.kt index bb783cce828..eb85884b63c 100644 --- a/compiler/testData/codegen/bytecodeListing/main/suspendMain_before.kt +++ b/compiler/testData/codegen/bytecodeListing/main/suspendMain_before.kt @@ -1,4 +1,5 @@ // !LANGUAGE: -ExtendedMainConvention -ReleaseCoroutines +// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // uses kotlin.coroutines.experimental classes under the hood diff --git a/compiler/testData/codegen/bytecodeListing/noDelegationsToPrivateInterfaceMembers.kt b/compiler/testData/codegen/bytecodeListing/noDelegationsToPrivateInterfaceMembers.kt index bf0f476fe00..875b76ef5d4 100644 --- a/compiler/testData/codegen/bytecodeListing/noDelegationsToPrivateInterfaceMembers.kt +++ b/compiler/testData/codegen/bytecodeListing/noDelegationsToPrivateInterfaceMembers.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR interface A { // There must be no delegation methods for 'log' and 'bar' in C as they are private private val log: String get() = "O" diff --git a/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.kt b/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.kt index 61fddc4b17f..820f6a5c951 100644 --- a/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.kt +++ b/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR class A { fun foo() {} val bar = 42 diff --git a/compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.kt b/compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.kt index 424e70e2710..54dfc7d6b68 100644 --- a/compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.kt +++ b/compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.kt @@ -1,2 +1,3 @@ +// IGNORE_BACKEND: JVM_IR abstract class A : List abstract class B : List diff --git a/compiler/testData/codegen/bytecodeListing/noToArrayInJava.kt b/compiler/testData/codegen/bytecodeListing/noToArrayInJava.kt index 0687d450900..ef997dfdd0d 100644 --- a/compiler/testData/codegen/bytecodeListing/noToArrayInJava.kt +++ b/compiler/testData/codegen/bytecodeListing/noToArrayInJava.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // FILE: test/JavaClass.java package test; diff --git a/compiler/testData/codegen/bytecodeListing/privateDefaultSetter.kt b/compiler/testData/codegen/bytecodeListing/privateDefaultSetter.kt index 98b0087deaf..f2e1e8a16cd 100644 --- a/compiler/testData/codegen/bytecodeListing/privateDefaultSetter.kt +++ b/compiler/testData/codegen/bytecodeListing/privateDefaultSetter.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR open class Test { var publicProperty: String = "" private set diff --git a/compiler/testData/codegen/bytecodeListing/samAdapterAndInlinedOne.kt b/compiler/testData/codegen/bytecodeListing/samAdapterAndInlinedOne.kt index 55e63be845c..41842c7243a 100644 --- a/compiler/testData/codegen/bytecodeListing/samAdapterAndInlinedOne.kt +++ b/compiler/testData/codegen/bytecodeListing/samAdapterAndInlinedOne.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR package test inline fun makeRunnable(noinline lambda: ()->Unit) : Runnable { diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt b/compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt index f05c357bffb..3c5ee143624 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR abstract class A1 : MutableCollection { override fun contains(o: Q): Boolean { throw UnsupportedOperationException() diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/noSpecialBridgeIfPresentInSuperClass.kt b/compiler/testData/codegen/bytecodeListing/specialBridges/noSpecialBridgeIfPresentInSuperClass.kt index fdc81e4f175..02577fd3306 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/noSpecialBridgeIfPresentInSuperClass.kt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/noSpecialBridgeIfPresentInSuperClass.kt @@ -1,2 +1,3 @@ +// IGNORE_BACKEND: JVM_IR abstract class A : List abstract class B : A() diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.kt b/compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.kt index 290b0d93a62..80ef3d3fb13 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.kt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR open class A1 { open val size: Int = 56 } diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/removeAtTwoSpecialBridges.kt b/compiler/testData/codegen/bytecodeListing/specialBridges/removeAtTwoSpecialBridges.kt index 89daa48784d..22bf0dbbddc 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/removeAtTwoSpecialBridges.kt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/removeAtTwoSpecialBridges.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR open class A0 : MutableList { override fun add(element: E): Boolean { throw UnsupportedOperationException() diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.kt b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.kt index 1eb2dbc6c7b..bd5614c012f 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.kt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_SIGNATURES class GenericMap : MutableMap by HashMap() diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.kt b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.kt index efab98d9f34..a1851b0711c 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.kt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_SIGNATURES class StringStringMap : MutableMap by HashMap() diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.kt b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.kt index 6d50b49f84d..de8de6cde65 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.kt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_SIGNATURES class StringMap : MutableMap by HashMap() diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrBytecodeListingTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrBytecodeListingTest.kt new file mode 100644 index 00000000000..be9f9e9da2b --- /dev/null +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/AbstractIrBytecodeListingTest.kt @@ -0,0 +1,13 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.codegen.ir + +import org.jetbrains.kotlin.codegen.AbstractBytecodeListingTest +import org.jetbrains.kotlin.test.TargetBackend + +abstract class AbstractIrBytecodeListingTest : AbstractBytecodeListingTest() { + override fun getBackend() = TargetBackend.JVM_IR +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java new file mode 100644 index 00000000000..eb9a7d4f020 --- /dev/null +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java @@ -0,0 +1,512 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.codegen.ir; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; +import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.TargetBackend; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.runner.RunWith; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("compiler/testData/codegen/bytecodeListing") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInBytecodeListing() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("callableNameIntrinsic.kt") + public void testCallableNameIntrinsic() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt"); + } + + @TestMetadata("companionObjectVisibility_after.kt") + public void testCompanionObjectVisibility_after() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/companionObjectVisibility_after.kt"); + } + + @TestMetadata("companionObjectVisibility_before.kt") + public void testCompanionObjectVisibility_before() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/companionObjectVisibility_before.kt"); + } + + @TestMetadata("companionObjectVisibility_lv13.kt") + public void testCompanionObjectVisibility_lv13() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/companionObjectVisibility_lv13.kt"); + } + + @TestMetadata("defaultImpls.kt") + public void testDefaultImpls() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/defaultImpls.kt"); + } + + @TestMetadata("emptyMultifileFacade.kt") + public void testEmptyMultifileFacade() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt"); + } + + @TestMetadata("immutableCollection.kt") + public void testImmutableCollection() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/immutableCollection.kt"); + } + + @TestMetadata("jvmOverloadsAndParametersAnnotations.kt") + public void testJvmOverloadsAndParametersAnnotations() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt"); + } + + @TestMetadata("noCollectionStubMethodsInInterface.kt") + public void testNoCollectionStubMethodsInInterface() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/noCollectionStubMethodsInInterface.kt"); + } + + @TestMetadata("noDelegationsToPrivateInterfaceMembers.kt") + public void testNoDelegationsToPrivateInterfaceMembers() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/noDelegationsToPrivateInterfaceMembers.kt"); + } + + @TestMetadata("noReceiverInCallableReferenceClasses.kt") + public void testNoReceiverInCallableReferenceClasses() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.kt"); + } + + @TestMetadata("noRemoveAtInReadOnly.kt") + public void testNoRemoveAtInReadOnly() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.kt"); + } + + @TestMetadata("noToArrayInJava.kt") + public void testNoToArrayInJava() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/noToArrayInJava.kt"); + } + + @TestMetadata("platformTypes.kt") + public void testPlatformTypes() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/platformTypes.kt"); + } + + @TestMetadata("privateDefaultSetter.kt") + public void testPrivateDefaultSetter() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/privateDefaultSetter.kt"); + } + + @TestMetadata("samAdapterAndInlinedOne.kt") + public void testSamAdapterAndInlinedOne() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/samAdapterAndInlinedOne.kt"); + } + + @TestMetadata("compiler/testData/codegen/bytecodeListing/annotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Annotations extends AbstractIrBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInAnnotations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("defaultTargets.kt") + public void testDefaultTargets() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/annotations/defaultTargets.kt"); + } + + @TestMetadata("deprecatedJvmOverloads.kt") + public void testDeprecatedJvmOverloads() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/annotations/deprecatedJvmOverloads.kt"); + } + + @TestMetadata("JvmSynthetic.kt") + public void testJvmSynthetic() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/annotations/JvmSynthetic.kt"); + } + + @TestMetadata("kt27895.kt") + public void testKt27895() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/annotations/kt27895.kt"); + } + + @TestMetadata("kt9320.kt") + public void testKt9320() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt"); + } + + @TestMetadata("literals.kt") + public void testLiterals() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/annotations/literals.kt"); + } + + @TestMetadata("localClassWithCapturedParams.kt") + public void testLocalClassWithCapturedParams() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/annotations/localClassWithCapturedParams.kt"); + } + + @TestMetadata("noAdditionalAnnotationsInAccessors.kt") + public void testNoAdditionalAnnotationsInAccessors() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/annotations/noAdditionalAnnotationsInAccessors.kt"); + } + + @TestMetadata("noAnnotationsInSyntheticAccessors.kt") + public void testNoAnnotationsInSyntheticAccessors() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/annotations/noAnnotationsInSyntheticAccessors.kt"); + } + + @TestMetadata("onProperties.kt") + public void testOnProperties() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/annotations/onProperties.kt"); + } + + @TestMetadata("onReceiver.kt") + public void testOnReceiver() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/annotations/onReceiver.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/bytecodeListing/collectionStubs") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CollectionStubs extends AbstractIrBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInCollectionStubs() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/collectionStubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("noStubsInJavaSuperClass.kt") + public void testNoStubsInJavaSuperClass() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.kt"); + } + + @TestMetadata("stubsFromSuperclass.kt") + public void testStubsFromSuperclass() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.kt"); + } + + @TestMetadata("stubsFromSuperclassNoBridges.kt") + public void testStubsFromSuperclassNoBridges() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/bytecodeListing/coroutines") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Coroutines extends AbstractIrBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception { + KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInCoroutines() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("coroutineContextIntrinsic.kt") + public void testCoroutineContextIntrinsic_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/coroutineContextIntrinsic.kt", "kotlin.coroutines"); + } + + @TestMetadata("coroutineFields.kt") + public void testCoroutineFields_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/coroutineFields.kt", "kotlin.coroutines"); + } + + @TestMetadata("oomInReturnUnit.kt") + public void testOomInReturnUnit_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.kt", "kotlin.coroutines"); + } + + @TestMetadata("privateAccessor.kt") + public void testPrivateAccessor_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/privateAccessor.kt", "kotlin.coroutines"); + } + + @TestMetadata("privateSuspendFun.kt") + public void testPrivateSuspendFun() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/coroutines/privateSuspendFun.kt"); + } + + @TestMetadata("suspendReifiedFun.kt") + public void testSuspendReifiedFun_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/suspendReifiedFun.kt", "kotlin.coroutines"); + } + + @TestMetadata("tcoContinuation.kt") + public void testTcoContinuation_1_3() throws Exception { + runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.kt", "kotlin.coroutines"); + } + } + + @TestMetadata("compiler/testData/codegen/bytecodeListing/inline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inline extends AbstractIrBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInInline() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("inlineOnly.kt") + public void testInlineOnly() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inline/inlineOnly.kt"); + } + + @TestMetadata("InlineOnlyMultifile.kt") + public void testInlineOnlyMultifile() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inline/InlineOnlyMultifile.kt"); + } + + @TestMetadata("inlineOnlyProperty.kt") + public void testInlineOnlyProperty() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inline/inlineOnlyProperty.kt"); + } + + @TestMetadata("InlineOnlyPropertyMultifile.kt") + public void testInlineOnlyPropertyMultifile() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inline/InlineOnlyPropertyMultifile.kt"); + } + + @TestMetadata("inlineReified.kt") + public void testInlineReified() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inline/inlineReified.kt"); + } + + @TestMetadata("InlineReifiedMultifile.kt") + public void testInlineReifiedMultifile() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inline/InlineReifiedMultifile.kt"); + } + + @TestMetadata("inlineReifiedProperty.kt") + public void testInlineReifiedProperty() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inline/inlineReifiedProperty.kt"); + } + + @TestMetadata("InlineReifiedPropertyMultifile.kt") + public void testInlineReifiedPropertyMultifile() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inline/InlineReifiedPropertyMultifile.kt"); + } + + @TestMetadata("simpleNamed.kt") + public void testSimpleNamed() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inline/simpleNamed.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineClasses extends AbstractIrBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInInlineClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("annotationsOnHiddenConstructor.kt") + public void testAnnotationsOnHiddenConstructor() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/annotationsOnHiddenConstructor.kt"); + } + + @TestMetadata("companionObjectInsideInlineClass.kt") + public void testCompanionObjectInsideInlineClass() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/companionObjectInsideInlineClass.kt"); + } + + @TestMetadata("computablePropertiesInsideInlineClass.kt") + public void testComputablePropertiesInsideInlineClass() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/computablePropertiesInsideInlineClass.kt"); + } + + @TestMetadata("constructorsWithDefaultParameterValues.kt") + public void testConstructorsWithDefaultParameterValues() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/constructorsWithDefaultParameterValues.kt"); + } + + @TestMetadata("inlineClassMembersVisibility.kt") + public void testInlineClassMembersVisibility() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassMembersVisibility.kt"); + } + + @TestMetadata("inlineClassTypeParametersInConstructor.kt") + public void testInlineClassTypeParametersInConstructor() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.kt"); + } + + @TestMetadata("inlineClassWithInlineClassUnderlyingType.kt") + public void testInlineClassWithInlineClassUnderlyingType() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithInlineClassUnderlyingType.kt"); + } + + @TestMetadata("inlineClassWithManyKindsOfMembers.kt") + public void testInlineClassWithManyKindsOfMembers() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithManyKindsOfMembers.kt"); + } + + @TestMetadata("noBridgesForErasedInlineClass.kt") + public void testNoBridgesForErasedInlineClass() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.kt"); + } + + @TestMetadata("nullabilityInExpansion.kt") + public void testNullabilityInExpansion() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/nullabilityInExpansion.kt"); + } + + @TestMetadata("primaryValsWithDifferentVisibilities.kt") + public void testPrimaryValsWithDifferentVisibilities() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/primaryValsWithDifferentVisibilities.kt"); + } + + @TestMetadata("publishedApiAnnotationOnInlineClassConstructor.kt") + public void testPublishedApiAnnotationOnInlineClassConstructor() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/publishedApiAnnotationOnInlineClassConstructor.kt"); + } + + @TestMetadata("shapeOfInlineClassWithPrimitive.kt") + public void testShapeOfInlineClassWithPrimitive() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrimitive.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/bytecodeListing/main") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Main extends AbstractIrBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInMain() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/main"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("multifileSuspend.kt") + public void testMultifileSuspend() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/main/multifileSuspend.kt"); + } + + @TestMetadata("parameterlessMain.kt") + public void testParameterlessMain() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/main/parameterlessMain.kt"); + } + + @TestMetadata("parameterlessMain_before.kt") + public void testParameterlessMain_before() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/main/parameterlessMain_before.kt"); + } + + @TestMetadata("suspendMain.kt") + public void testSuspendMain() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/main/suspendMain.kt"); + } + + @TestMetadata("suspendMain_before.kt") + public void testSuspendMain_before() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/main/suspendMain_before.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/bytecodeListing/multiplatform") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Multiplatform extends AbstractIrBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInMultiplatform() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("optionalExpectation.kt") + public void testOptionalExpectation() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/multiplatform/optionalExpectation.kt"); + } + } + + @TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SpecialBridges extends AbstractIrBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInSpecialBridges() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/specialBridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("contains.kt") + public void testContains() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt"); + } + + @TestMetadata("noSpecialBridgeIfPresentInSuperClass.kt") + public void testNoSpecialBridgeIfPresentInSuperClass() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/noSpecialBridgeIfPresentInSuperClass.kt"); + } + + @TestMetadata("redundantStubForSize.kt") + public void testRedundantStubForSize() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.kt"); + } + + @TestMetadata("removeAtTwoSpecialBridges.kt") + public void testRemoveAtTwoSpecialBridges() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/removeAtTwoSpecialBridges.kt"); + } + + @TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/signatures") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Signatures extends AbstractIrBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInSignatures() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/specialBridges/signatures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("genericClass.kt") + public void testGenericClass() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.kt"); + } + + @TestMetadata("nonGenericClass.kt") + public void testNonGenericClass() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.kt"); + } + + @TestMetadata("partiallySpecializedClass.kt") + public void testPartiallySpecializedClass() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.kt"); + } + } + } +} diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt index 90793676387..2b6882be803 100644 --- a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt +++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt @@ -437,6 +437,10 @@ fun main(args: Array) { model("compileKotlinAgainstKotlin", targetBackend = TargetBackend.JVM_IR) } + testClass { + model("codegen/bytecodeListing", targetBackend = TargetBackend.JVM_IR) + } + testClass { model("checkLocalVariablesTable", targetBackend = TargetBackend.JVM_IR) }