diff --git a/compiler/testData/codegen/bytecodeListing/annotations/noAnnotationsInSyntheticAccessors_ir.txt b/compiler/testData/codegen/bytecodeListing/annotations/noAnnotationsInSyntheticAccessors_ir.txt deleted file mode 100644 index 43e6a2a4066..00000000000 --- a/compiler/testData/codegen/bytecodeListing/annotations/noAnnotationsInSyntheticAccessors_ir.txt +++ /dev/null @@ -1,26 +0,0 @@ -@java.lang.annotation.Retention -@kotlin.Metadata -public annotation class Ann { - // source: 'noAnnotationsInSyntheticAccessors.kt' -} - -@kotlin.Metadata -public final class Foo$Companion { - // source: 'noAnnotationsInSyntheticAccessors.kt' - private method (): void - public synthetic method (p0: kotlin.jvm.internal.DefaultConstructorMarker): void - public final method foo(): void - public final inner class Foo$Companion -} - -@kotlin.Metadata -public final class Foo { - // source: 'noAnnotationsInSyntheticAccessors.kt' - public final static @org.jetbrains.annotations.NotNull field Companion: Foo$Companion - static method (): void - private @Ann method (@Ann p0: java.lang.String): void - public synthetic method (p0: java.lang.String, p1: kotlin.jvm.internal.DefaultConstructorMarker): void - public synthetic final static method access$foo(p0: Foo, p1: java.lang.String): void - private final @Ann method foo(@Ann p0: java.lang.String): void - public final inner class Foo$Companion -} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk_ir.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk_ir.txt deleted file mode 100644 index a025e6a9f1c..00000000000 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk_ir.txt +++ /dev/null @@ -1,195 +0,0 @@ -@kotlin.Metadata -public final class DGenericCollection { - // source: 'collectionByDelegationWithFullJdk.kt' - private synthetic final field $$delegate_0: java.util.Collection - public method (@org.jetbrains.annotations.NotNull p0: java.util.Collection): void - public method add(p0: java.lang.Object): boolean - public method addAll(p0: java.util.Collection): boolean - public method clear(): void - public method contains(p0: java.lang.Object): boolean - public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean - public method getSize(): int - public method isEmpty(): boolean - public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator - public method remove(p0: java.lang.Object): boolean - public method removeAll(p0: java.util.Collection): boolean - public method removeIf(p0: java.util.function.Predicate): boolean - public method retainAll(p0: java.util.Collection): boolean - public bridge final method size(): int - public method toArray(): java.lang.Object[] - public method toArray(p0: java.lang.Object[]): java.lang.Object[] -} - -@kotlin.Metadata -public final class DGenericCollectionByList { - // source: 'collectionByDelegationWithFullJdk.kt' - private synthetic final field $$delegate_0: java.util.List - public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void - public method add(p0: java.lang.Object): boolean - public method addAll(p0: java.util.Collection): boolean - public method clear(): void - public method contains(p0: java.lang.Object): boolean - public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean - public method getSize(): int - public method isEmpty(): boolean - public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator - public method remove(p0: java.lang.Object): boolean - public method removeAll(p0: java.util.Collection): boolean - public method removeIf(p0: java.util.function.Predicate): boolean - public method retainAll(p0: java.util.Collection): boolean - public bridge final method size(): int - public method toArray(): java.lang.Object[] - public method toArray(p0: java.lang.Object[]): java.lang.Object[] -} - -@kotlin.Metadata -public final class DGenericCollectionBySet { - // source: 'collectionByDelegationWithFullJdk.kt' - private synthetic final field $$delegate_0: java.util.Set - public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void - public method add(p0: java.lang.Object): boolean - public method addAll(p0: java.util.Collection): boolean - public method clear(): void - public method contains(p0: java.lang.Object): boolean - public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean - public method getSize(): int - public method isEmpty(): boolean - public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator - public method remove(p0: java.lang.Object): boolean - public method removeAll(p0: java.util.Collection): boolean - public method removeIf(p0: java.util.function.Predicate): boolean - public method retainAll(p0: java.util.Collection): boolean - public bridge final method size(): int - public method toArray(): java.lang.Object[] - public method toArray(p0: java.lang.Object[]): java.lang.Object[] -} - -@kotlin.Metadata -public final class DGenericIterable { - // source: 'collectionByDelegationWithFullJdk.kt' - private synthetic final field $$delegate_0: java.lang.Iterable - public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void - public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator -} - -@kotlin.Metadata -public final class DGenericIterator { - // source: 'collectionByDelegationWithFullJdk.kt' - private synthetic final field $$delegate_0: java.util.Iterator - public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void - public method hasNext(): boolean - public method next(): java.lang.Object - public method remove(): void -} - -@kotlin.Metadata -public final class DGenericList { - // source: 'collectionByDelegationWithFullJdk.kt' - private synthetic final field $$delegate_0: java.util.List - public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void - public method add(p0: int, p1: java.lang.Object): void - public method add(p0: java.lang.Object): boolean - public method addAll(p0: int, p1: java.util.Collection): boolean - public method addAll(p0: java.util.Collection): boolean - public method clear(): void - public method contains(p0: java.lang.Object): boolean - public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean - public method get(p0: int): java.lang.Object - public method getSize(): int - public method indexOf(p0: java.lang.Object): int - public method isEmpty(): boolean - public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator - public method lastIndexOf(p0: java.lang.Object): int - public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator - public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator - public method remove(p0: int): java.lang.Object - public method remove(p0: java.lang.Object): boolean - public method removeAll(p0: java.util.Collection): boolean - public method replaceAll(p0: java.util.function.UnaryOperator): void - public method retainAll(p0: java.util.Collection): boolean - public method set(p0: int, p1: java.lang.Object): java.lang.Object - public bridge final method size(): int - public method sort(p0: java.util.Comparator): void - public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List - public method toArray(): java.lang.Object[] - public method toArray(p0: java.lang.Object[]): java.lang.Object[] -} - -@kotlin.Metadata -public final class DGenericListIterator { - // source: 'collectionByDelegationWithFullJdk.kt' - private synthetic final field $$delegate_0: java.util.ListIterator - public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void - public method add(p0: java.lang.Object): void - public method hasNext(): boolean - public method hasPrevious(): boolean - public method next(): java.lang.Object - public method nextIndex(): int - public method previous(): java.lang.Object - public method previousIndex(): int - public method remove(): void - public method set(p0: java.lang.Object): void -} - -@kotlin.Metadata -public final class DGenericMap { - // source: 'collectionByDelegationWithFullJdk.kt' - private synthetic final field $$delegate_0: java.util.Map - public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void - public method clear(): void - public method compute(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object - public method computeIfAbsent(p0: java.lang.Object, p1: java.util.function.Function): java.lang.Object - public method computeIfPresent(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object - public method containsKey(p0: java.lang.Object): boolean - public method containsValue(p0: java.lang.Object): boolean - public bridge final method entrySet(): java.util.Set - public @org.jetbrains.annotations.Nullable method get(p0: java.lang.Object): java.lang.Object - public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set - public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set - public method getSize(): int - public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection - public method isEmpty(): boolean - public bridge final method keySet(): java.util.Set - public method merge(p0: java.lang.Object, p1: java.lang.Object, p2: java.util.function.BiFunction): java.lang.Object - public method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object - public method putAll(p0: java.util.Map): void - public method putIfAbsent(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object - public method remove(p0: java.lang.Object): java.lang.Object - public method remove(p0: java.lang.Object, p1: java.lang.Object): boolean - public method replace(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object - public method replace(p0: java.lang.Object, p1: java.lang.Object, p2: java.lang.Object): boolean - public method replaceAll(p0: java.util.function.BiFunction): void - public bridge final method size(): int - public bridge final method values(): java.util.Collection -} - -@kotlin.Metadata -public final class DGenericMapEntry { - // source: 'collectionByDelegationWithFullJdk.kt' - private synthetic final field $$delegate_0: java.util.Map$Entry - public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void - public method getKey(): java.lang.Object - public method getValue(): java.lang.Object - public method setValue(p0: java.lang.Object): java.lang.Object -} - -@kotlin.Metadata -public final class DGenericSet { - // source: 'collectionByDelegationWithFullJdk.kt' - private synthetic final field $$delegate_0: java.util.Set - public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void - public method add(p0: java.lang.Object): boolean - public method addAll(p0: java.util.Collection): boolean - public method clear(): void - public method contains(p0: java.lang.Object): boolean - public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean - public method getSize(): int - public method isEmpty(): boolean - public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator - public method remove(p0: java.lang.Object): boolean - public method removeAll(p0: java.util.Collection): boolean - public method retainAll(p0: java.util.Collection): boolean - public bridge final method size(): int - public method toArray(): java.lang.Object[] - public method toArray(p0: java.lang.Object[]): java.lang.Object[] -} diff --git a/compiler/testData/codegen/bytecodeListing/jvmStaticWithDefaultParameters_ir.txt b/compiler/testData/codegen/bytecodeListing/jvmStaticWithDefaultParameters_ir.txt deleted file mode 100644 index d158ea0b10f..00000000000 --- a/compiler/testData/codegen/bytecodeListing/jvmStaticWithDefaultParameters_ir.txt +++ /dev/null @@ -1,29 +0,0 @@ -@kotlin.Metadata -public final class AnObject { - // source: 'jvmStaticWithDefaultParameters.kt' - public final static @org.jetbrains.annotations.NotNull field INSTANCE: AnObject - static method (): void - private method (): void - public synthetic static method foo$default(p0: int, p1: int, p2: java.lang.Object): void - public final static @kotlin.jvm.JvmStatic method foo(p0: int): void -} - -@kotlin.Metadata -public final class WithCompanion$Companion { - // source: 'jvmStaticWithDefaultParameters.kt' - private method (): void - public synthetic method (p0: kotlin.jvm.internal.DefaultConstructorMarker): void - public synthetic static method foo$default(p0: WithCompanion$Companion, p1: int, p2: int, p3: java.lang.Object): void - public final @kotlin.jvm.JvmStatic method foo(p0: int): void - public final inner class WithCompanion$Companion -} - -@kotlin.Metadata -public final class WithCompanion { - // source: 'jvmStaticWithDefaultParameters.kt' - public final static @org.jetbrains.annotations.NotNull field Companion: WithCompanion$Companion - static method (): void - public method (): void - public final static @kotlin.jvm.JvmStatic method foo(p0: int): void - public final inner class WithCompanion$Companion -} diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass_ir.txt b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass_ir.txt deleted file mode 100644 index 3ba4d9e5aec..00000000000 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass_ir.txt +++ /dev/null @@ -1,53 +0,0 @@ -@kotlin.Metadata -public abstract class<Ljava/lang/Object;Ljava/util/Map;Lkotlin/jvm/internal/markers/KMutableMap;> AbstractStringMap { - // source: 'partiallySpecializedClass.kt' - public @org.jetbrains.annotations.NotNull <()Ljava/util/Collection;> method getValues(): java.util.Collection - public bridge final <()Ljava/util/Collection;> method values(): java.util.Collection - public @org.jetbrains.annotations.NotNull <()Ljava/util/Set;> method getKeys(): java.util.Set - public bridge final <()Ljava/util/Set;> method keySet(): java.util.Set - public bridge final <()Ljava/util/Set;>;> method entrySet(): java.util.Set - public @org.jetbrains.annotations.NotNull <()Ljava/util/Set;>;> method getEntries(): java.util.Set - public bridge final <(Ljava/lang/Object;)TV;> method get(p0: java.lang.Object): java.lang.Object - public bridge final <(Ljava/lang/Object;)TV;> method remove(p0: java.lang.Object): java.lang.Object - public @org.jetbrains.annotations.Nullable <(Ljava/lang/String;)TV;> method get(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.Object - public @org.jetbrains.annotations.Nullable <(Ljava/lang/String;)TV;> method remove(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.Object - public @org.jetbrains.annotations.Nullable <(Ljava/lang/String;TV;)TV;> method put(@org.jetbrains.annotations.NotNull p0: java.lang.String, p1: java.lang.Object): java.lang.Object - public <(Ljava/util/Map<+Ljava/lang/String;+TV;>;)V> method putAll(@org.jetbrains.annotations.NotNull p0: java.util.Map): void - public method (): void - public method clear(): void - public method containsKey(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean - public bridge final method containsKey(p0: java.lang.Object): boolean - public method containsValue(p0: java.lang.Object): boolean - public method getSize(): int - public method isEmpty(): boolean - public synthetic bridge method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object - public bridge final method size(): int - private synthetic final field ;> $$delegate_0: java.util.HashMap -} - -@kotlin.Metadata -public final class<Ljava/lang/Object;Ljava/util/Map;Lkotlin/jvm/internal/markers/KMutableMap;> StringMap { - // source: 'partiallySpecializedClass.kt' - public @org.jetbrains.annotations.NotNull <()Ljava/util/Collection;> method getValues(): java.util.Collection - public bridge final <()Ljava/util/Collection;> method values(): java.util.Collection - public @org.jetbrains.annotations.NotNull <()Ljava/util/Set;> method getKeys(): java.util.Set - public bridge final <()Ljava/util/Set;> method keySet(): java.util.Set - public bridge final <()Ljava/util/Set;>;> method entrySet(): java.util.Set - public @org.jetbrains.annotations.NotNull <()Ljava/util/Set;>;> method getEntries(): java.util.Set - public bridge final <(Ljava/lang/Object;)TV;> method get(p0: java.lang.Object): java.lang.Object - public bridge final <(Ljava/lang/Object;)TV;> method remove(p0: java.lang.Object): java.lang.Object - public @org.jetbrains.annotations.Nullable <(Ljava/lang/String;)TV;> method get(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.Object - public @org.jetbrains.annotations.Nullable <(Ljava/lang/String;)TV;> method remove(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.Object - public @org.jetbrains.annotations.Nullable <(Ljava/lang/String;TV;)TV;> method put(@org.jetbrains.annotations.NotNull p0: java.lang.String, p1: java.lang.Object): java.lang.Object - public <(Ljava/util/Map<+Ljava/lang/String;+TV;>;)V> method putAll(@org.jetbrains.annotations.NotNull p0: java.util.Map): void - public method (): void - public method clear(): void - public method containsKey(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean - public bridge final method containsKey(p0: java.lang.Object): boolean - public method containsValue(p0: java.lang.Object): boolean - public method getSize(): int - public method isEmpty(): boolean - public synthetic bridge method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object - public bridge final method size(): int - private synthetic final field ;> $$delegate_0: java.util.HashMap -} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBytecodeListingTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBytecodeListingTest.kt index 18fa355ca35..10d5d6ee3d0 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBytecodeListingTest.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBytecodeListingTest.kt @@ -35,6 +35,16 @@ abstract class AbstractBytecodeListingTest : CodegenTestCase() { .sure { "No testData file exists: ${wholeFile.nameWithoutExtension}.txt" } KotlinTestUtils.assertEqualsToFile(txtFile, actualTxt) + + if (backend.isIR) { + val jvmGoldenFile = File(wholeFile.parentFile, wholeFile.nameWithoutExtension + ".txt") + val jvmIrGoldenFile = File(wholeFile.parentFile, wholeFile.nameWithoutExtension + "_ir.txt") + if (jvmGoldenFile.exists() && jvmIrGoldenFile.exists()) { + if (jvmGoldenFile.readText() == jvmIrGoldenFile.readText()) { + fail("JVM and JVM_IR golden files are identical. Remove $jvmIrGoldenFile.") + } + } + } } private fun isWithSignatures(wholeFile: File): Boolean =