From 70c2f2b86f6ea6121ecc61ba9d0747d51fc83f9a Mon Sep 17 00:00:00 2001 From: "vladislav.grechko" Date: Tue, 18 Oct 2022 20:58:04 +0200 Subject: [PATCH] Support specifying different bytecode listings for FIR and old frontend --- .../explicitBackingFieldsInJava.fir.txt | 13 +++++++++++++ .../codegen/box/callableReference/kt49526.kt | 2 ++ .../coroutines/bridges/lambdaWithLongReceiver.kt | 1 + .../bridges/lambdaWithMultipleParameters.kt | 1 + .../suspendConversion/onInlineArgument.kt | 1 + .../coroutines/tailCallOptimizations/crossinline.kt | 1 + .../inlineWithoutStateMachine.kt | 1 + .../innerObjectRetransformation.kt | 1 + .../tailCallOptimizations/unit/override5.kt | 1 + .../testData/codegen/box/dataClasses/kt49715.kt | 1 + .../codegen/box/dataObjects/serialization.kt | 1 + .../delegateToConst/delegateToConst.kt | 1 + .../delegateToConst/delegateToConstProperty.kt | 1 + .../delegateToConst/delegateToNull.kt | 1 + .../delegateToFinalProperty/chain.kt | 1 + .../delegateToFinalInstanceProperty.kt | 1 + .../delegateToFinalObjectProperty.kt | 1 + .../delegateToFinalProperty.kt | 1 + .../finalPropertyInAnotherFile.kt | 1 + .../memberExtensionPropertyAndImportFromObject.kt | 1 + ...berExtensionPropertyAndLocalDelegatedProperty.kt | 1 + .../delegateToFinalProperty/multimodule.kt | 1 + .../delegateToSingleton/delegateToEnum.kt | 1 + .../delegateToSingleton/delegateToEnumInAClass.kt | 1 + .../delegateToSingleton/delegateToSingleton.kt | 1 + .../noInitializationOfOuterClass.kt | 1 + .../delegateToSingleton/withSideEffects.kt | 1 + .../withSideEffectsFromFileClass.kt | 1 + .../delegateToSingleton/withSideEffectsToEnum.kt | 1 + .../delegateToThis/delegateToOuterThis.kt | 1 + .../delegateToThis/delegateToThis.kt | 1 + .../delegateToThis/delegateToThisByExtension.kt | 1 + .../callableReferences/let/intNGeneric2.kt | 1 + .../inlineClasses/genericUnderlyingValue/array.kt | 1 + .../inlineClasses/genericUnderlyingValue/arrayIC.kt | 1 + .../genericUnderlyingValue/primitive.kt | 1 + .../inlineClasses/genericUnderlyingValue/simple.kt | 1 + .../inlineClasses/genericUnderlyingValue/simple2.kt | 1 + .../genericUnderlyingValue/upperBound.kt | 1 + .../invokedynamic/lambdas/genericLambdaSignature.kt | 1 + .../box/invokedynamic/sam/genericLambdaSignature.kt | 1 + .../allCompatibility/localDelegatedProperties.kt | 1 + .../allCompatibility/privateFunWithDefaultArg.kt | 1 + .../allCompatibility/privateFunWithDefaultArg2.kt | 1 + .../box/jvm8/defaults/allCompatibility/superCall.kt | 1 + .../noDefaultImpls/localDelegatedProperties.kt | 1 + .../noDefaultImpls/privateFunWithDefaultArg.kt | 1 + .../noDefaultImpls/withCompatibility/defaultArgs.kt | 1 + .../withCompatibility/differentCases.kt | 1 + .../withCompatibility/javaInheritance.kt | 1 + .../withCompatibility/propertyAnnotation.kt | 1 + .../noDefaultImpls/withCompatibility/suspend.kt | 1 + .../nonDefaultInheritance/specialization.kt | 1 + .../defaults/nonDefaultInheritance/superCall.kt | 1 + .../codegen/box/syntheticAccessors/kt49316a.kt | 1 + .../codegen/box/valueClasses/classFlattening.kt | 1 + .../testData/codegen/box/valueClasses/complex.kt | 1 + .../box/valueClasses/conditionalExpressions.kt | 1 + .../testData/codegen/box/valueClasses/equality.kt | 1 + .../valueClasses/mfvcFieldInitializationOrder.kt | 1 + .../testData/codegen/box/valueClasses/overrides.kt | 1 + .../box/valueClasses/overrides_inlineClass.kt | 1 + .../box/valueClasses/overrides_typeParameters.kt | 1 + .../box/valueClasses/throwingMFVCReassignments.kt | 1 + .../codegen/box/valueClasses/tryExpressions.kt | 1 + .../testData/codegen/box/valueClasses/visibility.kt | 1 + .../lambdaTransformation/regeneratedLambdaName2.kt | 1 + .../boxInline/reified/nonCapturingObjectInLambda.kt | 1 + .../codegen/boxInline/reified/singletonLambda.kt | 1 + .../valueClasses/conditionalExpressions.kt | 1 + .../bytecodeText/valueClasses/equalsBoxTest.kt | 1 + .../bytecodeText/valueClasses/mfvcDeclaration.kt | 1 + .../bytecodeText/valueClasses/mfvcReassignments.kt | 1 + .../valueClasses/passingMFVC2Functions.kt | 1 + .../valueClasses/regularClassWithMFVC.kt | 1 + .../bytecodeText/valueClasses/tryExpressions.kt | 1 + .../test/backend/handlers/BytecodeListingHandler.kt | 8 ++++++-- 77 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties/backingField/explicitBackingFieldsInJava.fir.txt diff --git a/compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties/backingField/explicitBackingFieldsInJava.fir.txt b/compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties/backingField/explicitBackingFieldsInJava.fir.txt new file mode 100644 index 00000000000..e26c962c97d --- /dev/null +++ b/compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties/backingField/explicitBackingFieldsInJava.fir.txt @@ -0,0 +1,13 @@ +@kotlin.Metadata +public final class AC { + // source: 'AC.kt' + private final field number: int + public method (): void + public final @org.jetbrains.annotations.NotNull method getNumber(): java.lang.Number +} + +@kotlin.Metadata +public interface AI { + // source: 'AI.kt' + public abstract @org.jetbrains.annotations.NotNull method getNumber(): java.lang.Number +} diff --git a/compiler/testData/codegen/box/callableReference/kt49526.kt b/compiler/testData/codegen/box/callableReference/kt49526.kt index dc3d94790e4..b470dd59701 100644 --- a/compiler/testData/codegen/box/callableReference/kt49526.kt +++ b/compiler/testData/codegen/box/callableReference/kt49526.kt @@ -1,5 +1,7 @@ // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL +// FIR_IDENTICAL inline fun useRef(value: T, f: (T) -> Boolean) = f(value) diff --git a/compiler/testData/codegen/box/coroutines/bridges/lambdaWithLongReceiver.kt b/compiler/testData/codegen/box/coroutines/bridges/lambdaWithLongReceiver.kt index 93e0734b61a..8494e01e41e 100644 --- a/compiler/testData/codegen/box/coroutines/bridges/lambdaWithLongReceiver.kt +++ b/compiler/testData/codegen/box/coroutines/bridges/lambdaWithLongReceiver.kt @@ -1,6 +1,7 @@ // WITH_STDLIB // WITH_COROUTINES // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL import helpers.* import kotlin.coroutines.* diff --git a/compiler/testData/codegen/box/coroutines/bridges/lambdaWithMultipleParameters.kt b/compiler/testData/codegen/box/coroutines/bridges/lambdaWithMultipleParameters.kt index 3266db9a79b..cbe19c2c68e 100644 --- a/compiler/testData/codegen/box/coroutines/bridges/lambdaWithMultipleParameters.kt +++ b/compiler/testData/codegen/box/coroutines/bridges/lambdaWithMultipleParameters.kt @@ -1,6 +1,7 @@ // WITH_STDLIB // WITH_COROUTINES // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL import helpers.* import kotlin.coroutines.* diff --git a/compiler/testData/codegen/box/coroutines/suspendConversion/onInlineArgument.kt b/compiler/testData/codegen/box/coroutines/suspendConversion/onInlineArgument.kt index 53b268fe374..f6abd0dab9d 100644 --- a/compiler/testData/codegen/box/coroutines/suspendConversion/onInlineArgument.kt +++ b/compiler/testData/codegen/box/coroutines/suspendConversion/onInlineArgument.kt @@ -6,6 +6,7 @@ // `lambda` should not be wrapped in yet another object (so no OnInlineArgumentKt$box$1$1). // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL import helpers.* import kotlin.coroutines.* diff --git a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt index 9751a96cb7f..bc9569d7622 100644 --- a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt +++ b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt @@ -3,6 +3,7 @@ // WITH_STDLIB // WITH_COROUTINES // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL import helpers.* import kotlin.coroutines.* import kotlin.coroutines.intrinsics.* diff --git a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt index 9ab77b139a2..c35fea7624f 100644 --- a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt +++ b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt @@ -1,6 +1,7 @@ // WITH_STDLIB // WITH_COROUTINES // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // CHECK_NEW_COUNT: function=suspendHere count=0 // FIXME: Coroutine inlining // CHECK_NEW_COUNT: function=complexSuspend count=0 TARGET_BACKENDS=JS diff --git a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt index 66c23cac9eb..2df8fb0d14d 100644 --- a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt +++ b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt @@ -3,6 +3,7 @@ // WITH_STDLIB // WITH_COROUTINES // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // In this test the following transformation are occuring: // flow$1 -> flowWith$$inlined$flow$1 diff --git a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit/override5.kt b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit/override5.kt index 45520135302..bd72a1637df 100644 --- a/compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit/override5.kt +++ b/compiler/testData/codegen/box/coroutines/tailCallOptimizations/unit/override5.kt @@ -5,6 +5,7 @@ // WITH_STDLIB // WITH_COROUTINES // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL import helpers.* import kotlin.coroutines.* diff --git a/compiler/testData/codegen/box/dataClasses/kt49715.kt b/compiler/testData/codegen/box/dataClasses/kt49715.kt index 9f2bf6f9ad7..6a771d608c4 100644 --- a/compiler/testData/codegen/box/dataClasses/kt49715.kt +++ b/compiler/testData/codegen/box/dataClasses/kt49715.kt @@ -1,6 +1,7 @@ // IGNORE_BACKEND_FIR: JVM_IR // FIR status: [IR VALIDATION] Duplicate IR node: FUN GENERATED_DATA_CLASS_MEMBER name:toString // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB import kotlin.test.* diff --git a/compiler/testData/codegen/box/dataObjects/serialization.kt b/compiler/testData/codegen/box/dataObjects/serialization.kt index 62eb0d0495b..53266ee60fc 100644 --- a/compiler/testData/codegen/box/dataObjects/serialization.kt +++ b/compiler/testData/codegen/box/dataObjects/serialization.kt @@ -3,6 +3,7 @@ // TARGET_BACKEND: JVM_IR // FULL_JDK // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL import java.io.* diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToConst.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToConst.kt index 7789b469111..08441f4ce88 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToConst.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToConst.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL operator fun Any?.getValue(thisRef: Any?, property: Any?) = if (this == 1 && thisRef == null) "OK" else "Failed" diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToConstProperty.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToConstProperty.kt index 659b14e7208..ae87491064e 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToConstProperty.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToConstProperty.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL operator fun Any?.getValue(thisRef: Any?, property: Any?) = if (this == a && thisRef == null) "OK" else "Failed" diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToNull.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToNull.kt index 91c7e0cea07..6fc14beb6d5 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToNull.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToConst/delegateToNull.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL operator fun Any?.getValue(thisRef: Any?, property: Any?) = if (this == null && thisRef == null) "OK" else "Failed" diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/chain.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/chain.kt index 1ab9f27b889..810294f3f7a 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/chain.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/chain.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL class A { val b = B() diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalInstanceProperty.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalInstanceProperty.kt index 007dcea2b4b..92d31cbec8b 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalInstanceProperty.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalInstanceProperty.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL class C { diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalObjectProperty.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalObjectProperty.kt index cf37c57989c..4bae0b61345 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalObjectProperty.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalObjectProperty.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL object O { val impl = 123 diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalProperty.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalProperty.kt index 82998179fae..e09e9b11e89 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalProperty.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/delegateToFinalProperty.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL val impl = 123 diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/finalPropertyInAnotherFile.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/finalPropertyInAnotherFile.kt index cec69c5a74e..15f6df0d440 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/finalPropertyInAnotherFile.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/finalPropertyInAnotherFile.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL //FILE file1.kt val impl = 123 diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.kt index 28cb40cfe03..91ad9569b3a 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndImportFromObject.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL import O.d diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.kt index da75dca67f1..07456a1ac94 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/memberExtensionPropertyAndLocalDelegatedProperty.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL enum class E { X } diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/multimodule.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/multimodule.kt index e67b1631e7a..df40f74eab1 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/multimodule.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToFinalProperty/multimodule.kt @@ -1,5 +1,6 @@ // TARGET_BACKEND: JVM // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // MODULE: lib // FILE: file1.kt diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToEnum.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToEnum.kt index 80c8716809d..27fdfb23b50 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToEnum.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToEnum.kt @@ -1,5 +1,6 @@ // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL enum class E { OK, NOT_OK diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToEnumInAClass.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToEnumInAClass.kt index 68c7a1d9714..1c12fa2d850 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToEnumInAClass.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToEnumInAClass.kt @@ -1,5 +1,6 @@ // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL enum class E { OK, NOT_OK diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToSingleton.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToSingleton.kt index 444205e8294..a444ae8ff22 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToSingleton.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/delegateToSingleton.kt @@ -1,5 +1,6 @@ // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // IGNORE_BACKEND: JS_IR import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/noInitializationOfOuterClass.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/noInitializationOfOuterClass.kt index e9ce0913148..f69c7f37da4 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/noInitializationOfOuterClass.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/noInitializationOfOuterClass.kt @@ -1,5 +1,6 @@ // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL object O { object P diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffects.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffects.kt index b63dc74b51b..5c6a18edb06 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffects.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffects.kt @@ -1,5 +1,6 @@ // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL var initialized = false diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffectsFromFileClass.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffectsFromFileClass.kt index 6999763b247..9a61277be20 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffectsFromFileClass.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffectsFromFileClass.kt @@ -1,5 +1,6 @@ // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL var initialized = false diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffectsToEnum.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffectsToEnum.kt index 7c53ad061b8..14b7fb0063c 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffectsToEnum.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToSingleton/withSideEffectsToEnum.kt @@ -1,5 +1,6 @@ // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL var initialized = false diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToOuterThis.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToOuterThis.kt index 6860ec2eb4c..01da98e5c3d 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToOuterThis.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToOuterThis.kt @@ -1,5 +1,6 @@ // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL class O { operator fun getValue(thisRef: Any?, property: Any?) = diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToThis.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToThis.kt index 24dfa08a8f3..3dde3a4050b 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToThis.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToThis.kt @@ -1,5 +1,6 @@ // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL class C { operator fun getValue(thisRef: Any?, property: Any?) = diff --git a/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToThisByExtension.kt b/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToThisByExtension.kt index a4616542b77..05bbbdae716 100644 --- a/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToThisByExtension.kt +++ b/compiler/testData/codegen/box/delegatedProperty/delegateToThis/delegateToThisByExtension.kt @@ -1,5 +1,6 @@ // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL class C { val s: String by this diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt index c9da16340c3..7ea641eeb54 100644 --- a/compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt @@ -1,6 +1,7 @@ // WITH_STDLIB // WORKS_WHEN_VALUE_CLASS // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // LANGUAGE: +ValueClasses, +GenericInlineClassParameter OPTIONAL_JVM_INLINE_ANNOTATION diff --git a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/array.kt b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/array.kt index d634929888d..d938683844f 100644 --- a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/array.kt +++ b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/array.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // LANGUAGE: -JvmInlineValueClasses, +GenericInlineClassParameter inline class ICIntArray(val value: Array) diff --git a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/arrayIC.kt b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/arrayIC.kt index d457fea77c7..afe8c2bce60 100644 --- a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/arrayIC.kt +++ b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/arrayIC.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // LANGUAGE: -JvmInlineValueClasses, +GenericInlineClassParameter // IGNORE_BACKEND: JVM diff --git a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/primitive.kt b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/primitive.kt index 16e63eba4d2..7b4c9519295 100644 --- a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/primitive.kt +++ b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/primitive.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // LANGUAGE: -JvmInlineValueClasses, +GenericInlineClassParameter // IGNORE_BACKEND: JVM diff --git a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt index d8a3b8582c9..cf17bb2b37e 100644 --- a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt +++ b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // LANGUAGE: -JvmInlineValueClasses, +GenericInlineClassParameter // IGNORE_BACKED: JVM diff --git a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt index a5eecf310bd..26f42b9b213 100644 --- a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt +++ b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // LANGUAGE: -JvmInlineValueClasses, +GenericInlineClassParameter // IGNORE_BACKED: JVM diff --git a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/upperBound.kt b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/upperBound.kt index 2ec47965f7f..4cdf0507bb8 100644 --- a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/upperBound.kt +++ b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/upperBound.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // LANGUAGE: -JvmInlineValueClasses, +GenericInlineClassParameter inline class ICString(val value: T) diff --git a/compiler/testData/codegen/box/invokedynamic/lambdas/genericLambdaSignature.kt b/compiler/testData/codegen/box/invokedynamic/lambdas/genericLambdaSignature.kt index b77d57cc59c..90f51a433e0 100644 --- a/compiler/testData/codegen/box/invokedynamic/lambdas/genericLambdaSignature.kt +++ b/compiler/testData/codegen/box/invokedynamic/lambdas/genericLambdaSignature.kt @@ -4,6 +4,7 @@ // LAMBDAS: INDY // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_SIGNATURES // CHECK_BYTECODE_TEXT diff --git a/compiler/testData/codegen/box/invokedynamic/sam/genericLambdaSignature.kt b/compiler/testData/codegen/box/invokedynamic/sam/genericLambdaSignature.kt index f4c317740f4..b3e2ce6dfa5 100644 --- a/compiler/testData/codegen/box/invokedynamic/sam/genericLambdaSignature.kt +++ b/compiler/testData/codegen/box/invokedynamic/sam/genericLambdaSignature.kt @@ -3,6 +3,7 @@ // JVM_TARGET: 1.8 // SAM_CONVERSIONS: INDY // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_SIGNATURES // CHECK_BYTECODE_TEXT diff --git a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/localDelegatedProperties.kt b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/localDelegatedProperties.kt index a9353e834c2..6193905bf34 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/localDelegatedProperties.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/localDelegatedProperties.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // !JVM_DEFAULT_MODE: all-compatibility // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 diff --git a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/privateFunWithDefaultArg.kt b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/privateFunWithDefaultArg.kt index 6927faa699f..0a2e04d6111 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/privateFunWithDefaultArg.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/privateFunWithDefaultArg.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // !JVM_DEFAULT_MODE: all-compatibility // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 diff --git a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/privateFunWithDefaultArg2.kt b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/privateFunWithDefaultArg2.kt index e59e8b049c2..ae7af61f901 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/privateFunWithDefaultArg2.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/privateFunWithDefaultArg2.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // !JVM_DEFAULT_MODE: all-compatibility // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 diff --git a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/superCall.kt b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/superCall.kt index c6d6abc82b1..8e9079320f5 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/superCall.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/superCall.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // IGNORE_BACKEND_FIR: JVM_IR // FIR status: questionable bytecode listing difference (open/final methods in final class) // !JVM_DEFAULT_MODE: all-compatibility diff --git a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/localDelegatedProperties.kt b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/localDelegatedProperties.kt index 743c56371c7..d441c63bb1f 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/localDelegatedProperties.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/localDelegatedProperties.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // !JVM_DEFAULT_MODE: all // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 diff --git a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/privateFunWithDefaultArg.kt b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/privateFunWithDefaultArg.kt index b5bf4ce8578..cad946d20fa 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/privateFunWithDefaultArg.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/privateFunWithDefaultArg.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // !JVM_DEFAULT_MODE: all // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 diff --git a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/defaultArgs.kt b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/defaultArgs.kt index 923dec0c3a7..807d3924dbe 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/defaultArgs.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/defaultArgs.kt @@ -3,6 +3,7 @@ // JVM_TARGET: 1.8 // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL @JvmDefaultWithCompatibility interface Test { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/differentCases.kt b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/differentCases.kt index 4328ea507d7..c7aeb89fdf7 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/differentCases.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/differentCases.kt @@ -3,6 +3,7 @@ // JVM_TARGET: 1.8 // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL @JvmDefaultWithCompatibility interface Test { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/javaInheritance.kt b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/javaInheritance.kt index 5ecdcf8363b..04f0f10bce0 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/javaInheritance.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/javaInheritance.kt @@ -3,6 +3,7 @@ // JVM_TARGET: 1.8 // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // FILE: KBase.kt public interface KBase { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/propertyAnnotation.kt b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/propertyAnnotation.kt index f7885f4deb6..d1415ea1b35 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/propertyAnnotation.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/propertyAnnotation.kt @@ -3,6 +3,7 @@ // JVM_TARGET: 1.8 // WITH_STDLIB // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL annotation class MyAnn diff --git a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/suspend.kt b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/suspend.kt index 8ab64481993..ca3a28da5d3 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/suspend.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/withCompatibility/suspend.kt @@ -3,6 +3,7 @@ // IGNORE_BACKEND: JVM // JVM_TARGET: 1.8 // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_COROUTINES // WITH_STDLIB import helpers.* diff --git a/compiler/testData/codegen/box/jvm8/defaults/nonDefaultInheritance/specialization.kt b/compiler/testData/codegen/box/jvm8/defaults/nonDefaultInheritance/specialization.kt index 4c1ea3d4963..4275b643e8c 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/nonDefaultInheritance/specialization.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/nonDefaultInheritance/specialization.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB diff --git a/compiler/testData/codegen/box/jvm8/defaults/nonDefaultInheritance/superCall.kt b/compiler/testData/codegen/box/jvm8/defaults/nonDefaultInheritance/superCall.kt index 44a9cd83ad6..68d8b1e221f 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/nonDefaultInheritance/superCall.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/nonDefaultInheritance/superCall.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // TARGET_BACKEND: JVM // IGNORE_BACKEND_FIR: JVM_IR // FIR status: NCDFE: Foo$DefaultImpls diff --git a/compiler/testData/codegen/box/syntheticAccessors/kt49316a.kt b/compiler/testData/codegen/box/syntheticAccessors/kt49316a.kt index 338a688fe66..8ce9edfad75 100644 --- a/compiler/testData/codegen/box/syntheticAccessors/kt49316a.kt +++ b/compiler/testData/codegen/box/syntheticAccessors/kt49316a.kt @@ -11,6 +11,7 @@ fun test(foo: Foo): String { } // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // - there should be no synthetic accessor generated in 'Foo' class Foo(val s: String) diff --git a/compiler/testData/codegen/box/valueClasses/classFlattening.kt b/compiler/testData/codegen/box/valueClasses/classFlattening.kt index 4d7a6aa0d15..614a9fdcdae 100644 --- a/compiler/testData/codegen/box/valueClasses/classFlattening.kt +++ b/compiler/testData/codegen/box/valueClasses/classFlattening.kt @@ -4,6 +4,7 @@ // WORKS_WHEN_VALUE_CLASS // LANGUAGE: +ValueClasses +ContextReceivers // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL @JvmInline value class IC(val x: UInt) diff --git a/compiler/testData/codegen/box/valueClasses/complex.kt b/compiler/testData/codegen/box/valueClasses/complex.kt index aeee82468a7..dfa495c948d 100644 --- a/compiler/testData/codegen/box/valueClasses/complex.kt +++ b/compiler/testData/codegen/box/valueClasses/complex.kt @@ -1,6 +1,7 @@ // IGNORE_BACKEND_FIR: JVM_IR // https://youtrack.jetbrains.com/issue/KT-52236/Different-modality-in-psi-and-fir // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB // TARGET_BACKEND: JVM_IR // IGNORE_BACKEND: ANDROID, ANDROID_IR diff --git a/compiler/testData/codegen/box/valueClasses/conditionalExpressions.kt b/compiler/testData/codegen/box/valueClasses/conditionalExpressions.kt index 23a8dda02bf..e3cc2964886 100644 --- a/compiler/testData/codegen/box/valueClasses/conditionalExpressions.kt +++ b/compiler/testData/codegen/box/valueClasses/conditionalExpressions.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB // TARGET_BACKEND: JVM_IR // WORKS_WHEN_VALUE_CLASS diff --git a/compiler/testData/codegen/box/valueClasses/equality.kt b/compiler/testData/codegen/box/valueClasses/equality.kt index 220a66ec0e1..62a3849a871 100644 --- a/compiler/testData/codegen/box/valueClasses/equality.kt +++ b/compiler/testData/codegen/box/valueClasses/equality.kt @@ -5,6 +5,7 @@ // WORKS_WHEN_VALUE_CLASS // LANGUAGE: +ValueClasses // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL OPTIONAL_JVM_INLINE_ANNOTATION value class F1(val x: Int) diff --git a/compiler/testData/codegen/box/valueClasses/mfvcFieldInitializationOrder.kt b/compiler/testData/codegen/box/valueClasses/mfvcFieldInitializationOrder.kt index 21a92ef38ea..af487390b9e 100644 --- a/compiler/testData/codegen/box/valueClasses/mfvcFieldInitializationOrder.kt +++ b/compiler/testData/codegen/box/valueClasses/mfvcFieldInitializationOrder.kt @@ -3,6 +3,7 @@ // WORKS_WHEN_VALUE_CLASS // LANGUAGE: +ValueClasses // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL @JvmInline value class DPoint(val x: Double, val y: Double) diff --git a/compiler/testData/codegen/box/valueClasses/overrides.kt b/compiler/testData/codegen/box/valueClasses/overrides.kt index 828a385921d..901462b7b42 100644 --- a/compiler/testData/codegen/box/valueClasses/overrides.kt +++ b/compiler/testData/codegen/box/valueClasses/overrides.kt @@ -5,6 +5,7 @@ // WORKS_WHEN_VALUE_CLASS // LANGUAGE: +ValueClasses // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL interface AbstractPoint { val x: T diff --git a/compiler/testData/codegen/box/valueClasses/overrides_inlineClass.kt b/compiler/testData/codegen/box/valueClasses/overrides_inlineClass.kt index 90c73961f86..9abe0346f15 100644 --- a/compiler/testData/codegen/box/valueClasses/overrides_inlineClass.kt +++ b/compiler/testData/codegen/box/valueClasses/overrides_inlineClass.kt @@ -5,6 +5,7 @@ // WORKS_WHEN_VALUE_CLASS // LANGUAGE: +ValueClasses // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL interface AbstractPoint { val x: T diff --git a/compiler/testData/codegen/box/valueClasses/overrides_typeParameters.kt b/compiler/testData/codegen/box/valueClasses/overrides_typeParameters.kt index ecb515cdfbd..58e5e0285fc 100644 --- a/compiler/testData/codegen/box/valueClasses/overrides_typeParameters.kt +++ b/compiler/testData/codegen/box/valueClasses/overrides_typeParameters.kt @@ -6,6 +6,7 @@ // LANGUAGE: +ValueClasses // LANGUAGE: +GenericInlineClassParameter // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL interface AbstractPoint { val x: T diff --git a/compiler/testData/codegen/box/valueClasses/throwingMFVCReassignments.kt b/compiler/testData/codegen/box/valueClasses/throwingMFVCReassignments.kt index 0e2f8992ceb..7c26792ab85 100644 --- a/compiler/testData/codegen/box/valueClasses/throwingMFVCReassignments.kt +++ b/compiler/testData/codegen/box/valueClasses/throwingMFVCReassignments.kt @@ -3,6 +3,7 @@ // WORKS_WHEN_VALUE_CLASS // LANGUAGE: +ValueClasses // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL @JvmInline value class DPoint(val x: Double, val y: Double) diff --git a/compiler/testData/codegen/box/valueClasses/tryExpressions.kt b/compiler/testData/codegen/box/valueClasses/tryExpressions.kt index 7447986239a..1046e654b28 100644 --- a/compiler/testData/codegen/box/valueClasses/tryExpressions.kt +++ b/compiler/testData/codegen/box/valueClasses/tryExpressions.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB // TARGET_BACKEND: JVM_IR // WORKS_WHEN_VALUE_CLASS diff --git a/compiler/testData/codegen/box/valueClasses/visibility.kt b/compiler/testData/codegen/box/valueClasses/visibility.kt index 14272fd1063..7114daa6b19 100644 --- a/compiler/testData/codegen/box/valueClasses/visibility.kt +++ b/compiler/testData/codegen/box/valueClasses/visibility.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB // TARGET_BACKEND: JVM_IR // WORKS_WHEN_VALUE_CLASS diff --git a/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt b/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt index 45d572758ef..d1e1165720d 100644 --- a/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt +++ b/compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName2.kt @@ -1,5 +1,6 @@ // NO_CHECK_LAMBDA_INLINING // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/reified/nonCapturingObjectInLambda.kt b/compiler/testData/codegen/boxInline/reified/nonCapturingObjectInLambda.kt index 4114e549557..b76ad7811c5 100644 --- a/compiler/testData/codegen/boxInline/reified/nonCapturingObjectInLambda.kt +++ b/compiler/testData/codegen/boxInline/reified/nonCapturingObjectInLambda.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/reified/singletonLambda.kt b/compiler/testData/codegen/boxInline/reified/singletonLambda.kt index 9bf3b6b4edf..4582b90ad41 100644 --- a/compiler/testData/codegen/boxInline/reified/singletonLambda.kt +++ b/compiler/testData/codegen/boxInline/reified/singletonLambda.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // FILE: 1.kt package test diff --git a/compiler/testData/codegen/bytecodeText/valueClasses/conditionalExpressions.kt b/compiler/testData/codegen/bytecodeText/valueClasses/conditionalExpressions.kt index 8cadc8dbba8..03f521eb0fa 100644 --- a/compiler/testData/codegen/bytecodeText/valueClasses/conditionalExpressions.kt +++ b/compiler/testData/codegen/bytecodeText/valueClasses/conditionalExpressions.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB // TARGET_BACKEND: JVM_IR // WORKS_WHEN_VALUE_CLASS diff --git a/compiler/testData/codegen/bytecodeText/valueClasses/equalsBoxTest.kt b/compiler/testData/codegen/bytecodeText/valueClasses/equalsBoxTest.kt index 939d65ebd3b..8f361db4277 100644 --- a/compiler/testData/codegen/bytecodeText/valueClasses/equalsBoxTest.kt +++ b/compiler/testData/codegen/bytecodeText/valueClasses/equalsBoxTest.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB // TARGET_BACKEND: JVM_IR // WORKS_WHEN_VALUE_CLASS diff --git a/compiler/testData/codegen/bytecodeText/valueClasses/mfvcDeclaration.kt b/compiler/testData/codegen/bytecodeText/valueClasses/mfvcDeclaration.kt index dbb658f8223..8d975ca3f7b 100644 --- a/compiler/testData/codegen/bytecodeText/valueClasses/mfvcDeclaration.kt +++ b/compiler/testData/codegen/bytecodeText/valueClasses/mfvcDeclaration.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB // TARGET_BACKEND: JVM_IR // WORKS_WHEN_VALUE_CLASS diff --git a/compiler/testData/codegen/bytecodeText/valueClasses/mfvcReassignments.kt b/compiler/testData/codegen/bytecodeText/valueClasses/mfvcReassignments.kt index 13430de8ad9..176db91c10f 100644 --- a/compiler/testData/codegen/bytecodeText/valueClasses/mfvcReassignments.kt +++ b/compiler/testData/codegen/bytecodeText/valueClasses/mfvcReassignments.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB // TARGET_BACKEND: JVM_IR // WORKS_WHEN_VALUE_CLASS diff --git a/compiler/testData/codegen/bytecodeText/valueClasses/passingMFVC2Functions.kt b/compiler/testData/codegen/bytecodeText/valueClasses/passingMFVC2Functions.kt index 1bb0077f41b..065bd793e93 100644 --- a/compiler/testData/codegen/bytecodeText/valueClasses/passingMFVC2Functions.kt +++ b/compiler/testData/codegen/bytecodeText/valueClasses/passingMFVC2Functions.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB // TARGET_BACKEND: JVM_IR // WORKS_WHEN_VALUE_CLASS diff --git a/compiler/testData/codegen/bytecodeText/valueClasses/regularClassWithMFVC.kt b/compiler/testData/codegen/bytecodeText/valueClasses/regularClassWithMFVC.kt index 548ecf738bb..2de8fe6a486 100644 --- a/compiler/testData/codegen/bytecodeText/valueClasses/regularClassWithMFVC.kt +++ b/compiler/testData/codegen/bytecodeText/valueClasses/regularClassWithMFVC.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB // TARGET_BACKEND: JVM_IR // WORKS_WHEN_VALUE_CLASS diff --git a/compiler/testData/codegen/bytecodeText/valueClasses/tryExpressions.kt b/compiler/testData/codegen/bytecodeText/valueClasses/tryExpressions.kt index dca322fc7a7..b1367a2249e 100644 --- a/compiler/testData/codegen/bytecodeText/valueClasses/tryExpressions.kt +++ b/compiler/testData/codegen/bytecodeText/valueClasses/tryExpressions.kt @@ -1,4 +1,5 @@ // CHECK_BYTECODE_LISTING +// FIR_IDENTICAL // WITH_STDLIB // TARGET_BACKEND: JVM_IR // WORKS_WHEN_VALUE_CLASS diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/BytecodeListingHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/BytecodeListingHandler.kt index fe7774d4044..54bc6b0baaf 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/BytecodeListingHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/BytecodeListingHandler.kt @@ -10,8 +10,10 @@ import org.jetbrains.kotlin.test.directives.CodegenTestDirectives import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.CHECK_BYTECODE_LISTING import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.IGNORE_ANNOTATIONS import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.WITH_SIGNATURES +import org.jetbrains.kotlin.test.directives.FirDiagnosticsDirectives.FIR_IDENTICAL import org.jetbrains.kotlin.test.directives.model.DirectivesContainer import org.jetbrains.kotlin.test.model.BinaryArtifacts +import org.jetbrains.kotlin.test.model.FrontendKinds import org.jetbrains.kotlin.test.model.TestModule import org.jetbrains.kotlin.test.services.TestServices import org.jetbrains.kotlin.test.services.defaultsProvider @@ -42,10 +44,12 @@ class BytecodeListingHandler(testServices: TestServices) : JvmBinaryArtifactHand if (multiModuleInfoDumper.isEmpty()) return val sourceFile = testServices.moduleStructure.originalTestDataFiles.first() - val defaultTxtFile = sourceFile.withExtension(".txt") + val extension = + if (testServices.defaultsProvider.defaultFrontend == FrontendKinds.FIR && FIR_IDENTICAL !in testServices.moduleStructure.allDirectives) ".fir.txt" else ".txt" + val defaultTxtFile = sourceFile.withExtension(extension) val isIr = testServices.defaultsProvider.defaultTargetBackend?.isIR == true val txtFile = - if (isIr) sourceFile.withSuffixAndExtension("_ir", ".txt").takeIf(File::exists) ?: defaultTxtFile + if (isIr) sourceFile.withSuffixAndExtension("_ir", extension).takeIf(File::exists) ?: defaultTxtFile else defaultTxtFile assertions.assertEqualsToFile(txtFile, multiModuleInfoDumper.generateResultingDump())