diff --git a/compiler/testData/codegen/bytecodeListing/annotations/kt9320.txt b/compiler/testData/codegen/bytecodeListing/annotations/kt9320.txt index 8b6baf83273..bd44a8d4558 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/kt9320.txt +++ b/compiler/testData/codegen/bytecodeListing/annotations/kt9320.txt @@ -23,7 +23,7 @@ final class Kt9320Kt$foo$w$1 { static method (): void method (): void public final @Ann method invoke(@org.jetbrains.annotations.NotNull p0: My): int - public synthetic method invoke(p0: java.lang.Object): java.lang.Object + public synthetic bridge method invoke(p0: java.lang.Object): java.lang.Object } @kotlin.Metadata diff --git a/compiler/testData/codegen/bytecodeListing/annotations/literals.txt b/compiler/testData/codegen/bytecodeListing/annotations/literals.txt index 41d5f954c26..395dfe7f0dc 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/literals.txt +++ b/compiler/testData/codegen/bytecodeListing/annotations/literals.txt @@ -23,7 +23,7 @@ final class LiteralsKt$foo$1 { inner class LiteralsKt$foo$1 method (p0: int): void public final @FunAnn method invoke(): int - public synthetic method invoke(): java.lang.Object + public synthetic bridge method invoke(): java.lang.Object } @kotlin.Metadata @@ -32,7 +32,7 @@ final class LiteralsKt$foo$2 { inner class LiteralsKt$foo$2 method (p0: int): void public final method invoke(): int - public synthetic method invoke(): java.lang.Object + public synthetic bridge method invoke(): java.lang.Object } @ClsAnn @@ -48,7 +48,7 @@ final class LiteralsKt$foo$x$1 { inner class LiteralsKt$foo$x$1 method (p0: int): void public final @FunAnn method invoke(): int - public synthetic method invoke(): java.lang.Object + public synthetic bridge method invoke(): java.lang.Object } @kotlin.Metadata diff --git a/compiler/testData/codegen/bytecodeListing/annotations/onReceiver.txt b/compiler/testData/codegen/bytecodeListing/annotations/onReceiver.txt index 6fa04c5c449..e9f988450e0 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/onReceiver.txt +++ b/compiler/testData/codegen/bytecodeListing/annotations/onReceiver.txt @@ -13,4 +13,4 @@ public annotation class Ann public final class OnReceiverKt { public final static @org.jetbrains.annotations.NotNull method getTopLevelP(@Ann @org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String public final static @org.jetbrains.annotations.NotNull method topLevelF(@Ann @org.jetbrains.annotations.Nullable p0: java.lang.String): java.lang.String -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.txt b/compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.txt index f82d272c817..d2e9988c7f3 100644 --- a/compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.txt +++ b/compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.txt @@ -5,4 +5,4 @@ public final class A { public final @org.jetbrains.annotations.NotNull method b(): java.lang.String public final @org.jetbrains.annotations.NotNull method getA(): java.lang.String public final method test(): void -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.txt index e845fe24ba8..85bc39b9923 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.txt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.txt @@ -12,7 +12,7 @@ public class test/A { 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 final method size(): int + 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/collectionStubs/stubsFromSuperclass.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.txt index d2de540b9bf..a7e7a42a58e 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.txt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.txt @@ -12,7 +12,7 @@ public class A { 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 final method size(): int + 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/collectionStubs/stubsFromSuperclassNoBridges.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.txt index 4aa8e2d93ef..d1f18784024 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.txt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.txt @@ -12,7 +12,7 @@ public class A { 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 final method size(): int + public bridge final method size(): int public method toArray(): java.lang.Object[] public method toArray(p0: java.lang.Object[]): java.lang.Object[] } @@ -20,8 +20,8 @@ public class A { @kotlin.Metadata public class B { public method (): void - public method contains(p0: java.lang.CharSequence): boolean - public final method contains(p0: java.lang.Object): boolean + public bridge method contains(p0: java.lang.CharSequence): boolean + public bridge final method contains(p0: java.lang.Object): boolean } @kotlin.Metadata @@ -31,11 +31,11 @@ public final class C { public synthetic method add(p0: int, p1: java.lang.Object): void public method addAll(p0: int, p1: java.util.Collection): boolean public @org.jetbrains.annotations.NotNull method get(p0: int): java.lang.CharSequence - public synthetic method get(p0: int): java.lang.Object + public synthetic bridge method get(p0: int): java.lang.Object public method indexOf(@org.jetbrains.annotations.NotNull p0: java.lang.CharSequence): int - public final method indexOf(p0: java.lang.Object): int + public bridge final method indexOf(p0: java.lang.Object): int public method lastIndexOf(@org.jetbrains.annotations.NotNull p0: java.lang.CharSequence): int - public final method lastIndexOf(p0: java.lang.Object): int + public bridge final 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.CharSequence diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.txt b/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.txt index 7735bc1426b..842f47a97b2 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.txt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.txt @@ -30,7 +30,7 @@ public final class helpers/CoroutineUtilKt$handleExceptionContinuation$1 { private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.experimental.EmptyCoroutineContext inner class helpers/CoroutineUtilKt$handleExceptionContinuation$1 method (p0: kotlin.jvm.functions.Function1): void - public synthetic method getContext(): kotlin.coroutines.experimental.CoroutineContext + public synthetic bridge method getContext(): kotlin.coroutines.experimental.CoroutineContext public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.experimental.EmptyCoroutineContext public method resume(@org.jetbrains.annotations.Nullable p0: java.lang.Object): void public method resumeWithException(@org.jetbrains.annotations.NotNull p0: java.lang.Throwable): void @@ -42,7 +42,7 @@ public final class helpers/CoroutineUtilKt$handleResultContinuation$1 { private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.experimental.EmptyCoroutineContext inner class helpers/CoroutineUtilKt$handleResultContinuation$1 method (p0: kotlin.jvm.functions.Function1): void - public synthetic method getContext(): kotlin.coroutines.experimental.CoroutineContext + public synthetic bridge method getContext(): kotlin.coroutines.experimental.CoroutineContext public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.experimental.EmptyCoroutineContext public method resume(p0: java.lang.Object): void public method resumeWithException(@org.jetbrains.annotations.NotNull p0: java.lang.Throwable): void diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit_1_3.txt b/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit_1_3.txt index 36e035a3926..48162e278bd 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit_1_3.txt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit_1_3.txt @@ -32,7 +32,7 @@ public final class helpers/CoroutineUtilKt$handleExceptionContinuation$1 { private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.EmptyCoroutineContext inner class helpers/CoroutineUtilKt$handleExceptionContinuation$1 method (p0: kotlin.jvm.functions.Function1): void - public synthetic method getContext(): kotlin.coroutines.CoroutineContext + public synthetic bridge method getContext(): kotlin.coroutines.CoroutineContext public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.EmptyCoroutineContext public method resumeWith(@org.jetbrains.annotations.NotNull p0: java.lang.Object): void } @@ -43,7 +43,7 @@ public final class helpers/CoroutineUtilKt$handleResultContinuation$1 { private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.EmptyCoroutineContext inner class helpers/CoroutineUtilKt$handleResultContinuation$1 method (p0: kotlin.jvm.functions.Function1): void - public synthetic method getContext(): kotlin.coroutines.CoroutineContext + public synthetic bridge method getContext(): kotlin.coroutines.CoroutineContext public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.EmptyCoroutineContext public method resumeWith(@org.jetbrains.annotations.NotNull p0: java.lang.Object): void } diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.txt b/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.txt index e2f785015fc..87451c2c4b1 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.txt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.txt @@ -350,7 +350,7 @@ public final class helpers/CoroutineUtilKt$handleExceptionContinuation$1 { private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.experimental.EmptyCoroutineContext inner class helpers/CoroutineUtilKt$handleExceptionContinuation$1 method (p0: kotlin.jvm.functions.Function1): void - public synthetic method getContext(): kotlin.coroutines.experimental.CoroutineContext + public synthetic bridge method getContext(): kotlin.coroutines.experimental.CoroutineContext public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.experimental.EmptyCoroutineContext public method resume(@org.jetbrains.annotations.Nullable p0: java.lang.Object): void public method resumeWithException(@org.jetbrains.annotations.NotNull p0: java.lang.Throwable): void @@ -362,7 +362,7 @@ public final class helpers/CoroutineUtilKt$handleResultContinuation$1 { private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.experimental.EmptyCoroutineContext inner class helpers/CoroutineUtilKt$handleResultContinuation$1 method (p0: kotlin.jvm.functions.Function1): void - public synthetic method getContext(): kotlin.coroutines.experimental.CoroutineContext + public synthetic bridge method getContext(): kotlin.coroutines.experimental.CoroutineContext public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.experimental.EmptyCoroutineContext public method resume(p0: java.lang.Object): void public method resumeWithException(@org.jetbrains.annotations.NotNull p0: java.lang.Throwable): void diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation_1_3.txt b/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation_1_3.txt index 6cdcce6d59f..ba824c4fe01 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation_1_3.txt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation_1_3.txt @@ -329,7 +329,7 @@ public final class helpers/CoroutineUtilKt$handleExceptionContinuation$1 { private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.EmptyCoroutineContext inner class helpers/CoroutineUtilKt$handleExceptionContinuation$1 method (p0: kotlin.jvm.functions.Function1): void - public synthetic method getContext(): kotlin.coroutines.CoroutineContext + public synthetic bridge method getContext(): kotlin.coroutines.CoroutineContext public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.EmptyCoroutineContext public method resumeWith(@org.jetbrains.annotations.NotNull p0: java.lang.Object): void } @@ -340,7 +340,7 @@ public final class helpers/CoroutineUtilKt$handleResultContinuation$1 { private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.EmptyCoroutineContext inner class helpers/CoroutineUtilKt$handleResultContinuation$1 method (p0: kotlin.jvm.functions.Function1): void - public synthetic method getContext(): kotlin.coroutines.CoroutineContext + public synthetic bridge method getContext(): kotlin.coroutines.CoroutineContext public @org.jetbrains.annotations.NotNull method getContext(): kotlin.coroutines.EmptyCoroutineContext public method resumeWith(@org.jetbrains.annotations.NotNull p0: java.lang.Object): void } diff --git a/compiler/testData/codegen/bytecodeListing/defaultImpls.txt b/compiler/testData/codegen/bytecodeListing/defaultImpls.txt index f85adc2f99a..dcb5aa7deb5 100644 --- a/compiler/testData/codegen/bytecodeListing/defaultImpls.txt +++ b/compiler/testData/codegen/bytecodeListing/defaultImpls.txt @@ -32,4 +32,4 @@ public final class E$InsideE { @kotlin.Metadata public interface E { inner class E$InsideE -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.txt b/compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.txt index 96d030eeca5..c670098173f 100644 --- a/compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.txt +++ b/compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.txt @@ -4,4 +4,4 @@ public final class test/Foo @kotlin.Metadata synthetic final class test/Foo__EmptyMultifileFacadeKt { private final static method privateOnly$Foo__EmptyMultifileFacadeKt(): void -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/bytecodeListing/immutableCollection.kt b/compiler/testData/codegen/bytecodeListing/immutableCollection.kt index 3dec72a3bb4..c83250effbb 100644 --- a/compiler/testData/codegen/bytecodeListing/immutableCollection.kt +++ b/compiler/testData/codegen/bytecodeListing/immutableCollection.kt @@ -10,19 +10,19 @@ class ImmutableCollectionmpl : ImmutableCollection { get() = throw UnsupportedOperationException() override fun contains(element: E): Boolean { - throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") } override fun containsAll(elements: Collection): Boolean { - throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") } override fun isEmpty(): Boolean { - throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") } override fun iterator(): Iterator { - throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. + throw UnsupportedOperationException("not implemented") } override fun add(element: E): ImmutableCollection = this diff --git a/compiler/testData/codegen/bytecodeListing/immutableCollection.txt b/compiler/testData/codegen/bytecodeListing/immutableCollection.txt index 77245a40867..13ed6770880 100644 --- a/compiler/testData/codegen/bytecodeListing/immutableCollection.txt +++ b/compiler/testData/codegen/bytecodeListing/immutableCollection.txt @@ -22,7 +22,7 @@ public final class ImmutableCollectionmpl { 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 final method size(): int + 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/inlineClasses/inlineClassTypeParametersInConstructor.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.txt index bdf99817fb4..5ae64b57a2e 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.txt @@ -23,7 +23,7 @@ public class TestBasic { @kotlin.Metadata public final enum class TestEnum { private synthetic final static field $VALUES: TestEnum[] - public final static field ANSWER: TestEnum + public final enum static field ANSWER: TestEnum private final field z: int static method (): void private method (p0: java.lang.String, p1: int, p2: int): void diff --git a/compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.txt b/compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.txt index d496dfe579b..3c67c30d1f6 100644 --- a/compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.txt +++ b/compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.txt @@ -12,7 +12,7 @@ public final class Foo { public method equals(p0: java.lang.Object): boolean public static method equals-impl(p0: long, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean public final static method equals-impl0(p0: long, p1: long): boolean - public synthetic method foo(p0: java.lang.Object): void + public synthetic bridge method foo(p0: java.lang.Object): void public method foo-GWb7d6U(p0: long): void public static method foo-GWb7d6U(p0: long, p1: long): void public final method getX(): long diff --git a/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.txt b/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.txt index 804d7697387..190f60c6443 100644 --- a/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.txt +++ b/compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.txt @@ -27,7 +27,7 @@ synthetic final class NoReceiverInCallableReferenceClassesKt$A_foo$1 { public final method getOwner(): kotlin.reflect.KDeclarationContainer public final method getSignature(): java.lang.String public final method invoke(@org.jetbrains.annotations.NotNull p0: A): void - public synthetic method invoke(p0: java.lang.Object): java.lang.Object + public synthetic bridge method invoke(p0: java.lang.Object): java.lang.Object } @kotlin.Metadata @@ -46,7 +46,7 @@ synthetic final class NoReceiverInCallableReferenceClassesKt$aFoo$1 { public final method getName(): java.lang.String public final method getOwner(): kotlin.reflect.KDeclarationContainer public final method getSignature(): java.lang.String - public synthetic method invoke(): java.lang.Object + public synthetic bridge method invoke(): java.lang.Object public final method invoke(): void } @@ -63,4 +63,4 @@ public final class NoReceiverInCallableReferenceClassesKt { public final static @org.jetbrains.annotations.NotNull method getAFoo(): kotlin.reflect.KFunction public final static @org.jetbrains.annotations.NotNull method getA_bar(): kotlin.reflect.KProperty1 public final static @org.jetbrains.annotations.NotNull method getA_foo(): kotlin.reflect.KFunction -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.txt b/compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.txt index 2345607eafa..879d2b81df7 100644 --- a/compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.txt +++ b/compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.txt @@ -17,7 +17,7 @@ public abstract class A { public method removeAll(p0: java.util.Collection): boolean public method retainAll(p0: java.util.Collection): boolean public method set(p0: int, p1: java.lang.Object): java.lang.Object - public final method size(): int + public bridge final method size(): int public 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[] @@ -34,12 +34,12 @@ public abstract class B { public method addAll(p0: java.util.Collection): boolean public method clear(): void public abstract method contains(p0: int): boolean - public final method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public abstract method getSize(): int public abstract method indexOf(p0: int): int - public final method indexOf(p0: java.lang.Object): int + public bridge final method indexOf(p0: java.lang.Object): int public abstract method lastIndexOf(p0: int): int - public final method lastIndexOf(p0: java.lang.Object): int + public bridge final method lastIndexOf(p0: java.lang.Object): int public method listIterator(): java.util.ListIterator public method listIterator(p0: int): java.util.ListIterator public method remove(p0: int): int @@ -49,7 +49,7 @@ public abstract class B { public method retainAll(p0: java.util.Collection): boolean public method set(p0: int, p1: int): java.lang.Integer public synthetic method set(p0: int, p1: java.lang.Object): java.lang.Object - public final method size(): int + public bridge final method size(): int public 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[] diff --git a/compiler/testData/codegen/bytecodeListing/noToArrayInJava.txt b/compiler/testData/codegen/bytecodeListing/noToArrayInJava.txt index 373322520bf..723cbe309ac 100644 --- a/compiler/testData/codegen/bytecodeListing/noToArrayInJava.txt +++ b/compiler/testData/codegen/bytecodeListing/noToArrayInJava.txt @@ -13,7 +13,7 @@ public abstract class test/B { 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 final method size(): int + 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/specialBridges/contains.txt b/compiler/testData/codegen/bytecodeListing/specialBridges/contains.txt index 6005e468d1e..6b90b8d8fc1 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/contains.txt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/contains.txt @@ -5,7 +5,7 @@ public abstract class A1 { public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean public abstract method getSize(): int public abstract method remove(p0: java.lang.Object): boolean - public final method size(): int + public bridge final method size(): int public method toArray(): java.lang.Object[] public method toArray(p0: java.lang.Object[]): java.lang.Object[] } @@ -14,12 +14,12 @@ public abstract class A1 { public abstract class A2 { public method (): void public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean - public final method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean public abstract method getSize(): int - public final method remove(p0: java.lang.Object): boolean + public bridge final method remove(p0: java.lang.Object): boolean public abstract method remove(p0: java.lang.String): boolean - public final method size(): int + public bridge final method size(): int public method toArray(): java.lang.Object[] public method toArray(p0: java.lang.Object[]): java.lang.Object[] } @@ -28,9 +28,9 @@ public abstract class A2 { public abstract class A3 { public method (): void public abstract method getSize(): int - public final method remove(p0: int): java.lang.Object - public method removeAt(p0: int): java.lang.Object - public final method size(): int + public bridge final method remove(p0: int): java.lang.Object + public bridge method removeAt(p0: int): java.lang.Object + public bridge final method size(): int } @kotlin.Metadata @@ -39,55 +39,55 @@ public abstract class A4 { public method contains(p0: java.lang.Object): boolean public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean public abstract method getSize(): int - public final method remove(p0: int): java.lang.Object - public method removeAt(p0: int): java.lang.Object - public final method size(): int + public bridge final method remove(p0: int): java.lang.Object + public bridge method removeAt(p0: int): java.lang.Object + public bridge final method size(): int } @kotlin.Metadata public abstract class A5 { public method (): void - public final method contains(p0: java.lang.Object): boolean - public method contains(p0: java.lang.String): boolean + public bridge final method contains(p0: java.lang.Object): boolean + public bridge method contains(p0: java.lang.String): boolean public abstract method getSize(): int - public final method indexOf(p0: java.lang.Object): int - public method indexOf(p0: java.lang.String): int - public final method lastIndexOf(p0: java.lang.Object): int - public method lastIndexOf(p0: java.lang.String): int - public final method remove(p0: int): java.lang.String - public final method remove(p0: java.lang.Object): boolean - public method remove(p0: java.lang.String): boolean - public method removeAt(p0: int): java.lang.String - public final method size(): int + public bridge final method indexOf(p0: java.lang.Object): int + public bridge method indexOf(p0: java.lang.String): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public bridge method lastIndexOf(p0: java.lang.String): int + public bridge final method remove(p0: int): java.lang.String + public bridge final method remove(p0: java.lang.Object): boolean + public bridge method remove(p0: java.lang.String): boolean + public bridge method removeAt(p0: int): java.lang.String + public bridge final method size(): int } @kotlin.Metadata public abstract class A6 { public method (): void public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean - public final method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean public abstract method getSize(): int - public final method indexOf(p0: java.lang.Object): int - public method indexOf(p0: java.lang.String): int - public final method lastIndexOf(p0: java.lang.Object): int - public method lastIndexOf(p0: java.lang.String): int - public final method remove(p0: int): java.lang.String - public final method remove(p0: java.lang.Object): boolean - public method remove(p0: java.lang.String): boolean - public method removeAt(p0: int): java.lang.String - public final method size(): int + public bridge final method indexOf(p0: java.lang.Object): int + public bridge method indexOf(p0: java.lang.String): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public bridge method lastIndexOf(p0: java.lang.String): int + public bridge final method remove(p0: int): java.lang.String + public bridge final method remove(p0: java.lang.Object): boolean + public bridge method remove(p0: java.lang.String): boolean + public bridge method removeAt(p0: int): java.lang.String + public bridge final method size(): int } @kotlin.Metadata public abstract class A7 { public method (): void public method contains(p0: int): boolean - public final method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public abstract method getSize(): int public abstract method remove(p0: java.lang.Integer): boolean - public final method remove(p0: java.lang.Object): boolean - public final method size(): int + public bridge final method remove(p0: java.lang.Object): boolean + public bridge final method size(): int public method toArray(): java.lang.Object[] public method toArray(p0: java.lang.Object[]): java.lang.Object[] } @@ -98,7 +98,7 @@ public abstract class A8 { public method contains(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean public abstract method getSize(): int public abstract method remove(p0: java.lang.Object): boolean - public final method size(): int + 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/specialBridges/noSpecialBridgeIfPresentInSuperClass.txt b/compiler/testData/codegen/bytecodeListing/specialBridges/noSpecialBridgeIfPresentInSuperClass.txt index 894d6dd2f31..bc09d4ac56a 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/noSpecialBridgeIfPresentInSuperClass.txt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/noSpecialBridgeIfPresentInSuperClass.txt @@ -17,7 +17,7 @@ public abstract class A { public method removeAll(p0: java.util.Collection): boolean public method retainAll(p0: java.util.Collection): boolean public method set(p0: int, p1: java.lang.Object): java.lang.Object - public final method size(): int + public bridge final method size(): int public 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[] diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.txt b/compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.txt index 4deacf3dc41..a800452eece 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.txt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.txt @@ -13,14 +13,14 @@ public final class A2 { public method addAll(p0: java.util.Collection): boolean public method clear(): void public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean - public final method contains(p0: java.lang.Object): boolean + public bridge final method contains(p0: java.lang.Object): boolean public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean 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 final method size(): int + 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/specialBridges/removeAtTwoSpecialBridges.txt b/compiler/testData/codegen/bytecodeListing/specialBridges/removeAtTwoSpecialBridges.txt index 095fdd5764d..c6f61a0b6b3 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/removeAtTwoSpecialBridges.txt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/removeAtTwoSpecialBridges.txt @@ -16,13 +16,13 @@ public class A0 { 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 final method remove(p0: int): java.lang.Object + public bridge final method remove(p0: int): java.lang.Object public method remove(p0: java.lang.Object): boolean public method removeAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean public method removeAt(p0: int): java.lang.Object public method retainAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean public method set(p0: int, p1: java.lang.Object): java.lang.Object - public final method size(): int + public bridge final method size(): int 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[] @@ -31,30 +31,30 @@ public class A0 { @kotlin.Metadata public final class A1 { public method (): void - public final method contains(p0: java.lang.Object): boolean - public method contains(p0: java.lang.String): boolean - public final method indexOf(p0: java.lang.Object): int - public method indexOf(p0: java.lang.String): int - public final method lastIndexOf(p0: java.lang.Object): int - public method lastIndexOf(p0: java.lang.String): int - public final method remove(p0: int): java.lang.String - public final method remove(p0: java.lang.Object): boolean - public method remove(p0: java.lang.String): boolean - public synthetic method removeAt(p0: int): java.lang.Object + public bridge final method contains(p0: java.lang.Object): boolean + public bridge method contains(p0: java.lang.String): boolean + public bridge final method indexOf(p0: java.lang.Object): int + public bridge method indexOf(p0: java.lang.String): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public bridge method lastIndexOf(p0: java.lang.String): int + public bridge final method remove(p0: int): java.lang.String + public bridge final method remove(p0: java.lang.Object): boolean + public bridge method remove(p0: java.lang.String): boolean + public synthetic bridge method removeAt(p0: int): java.lang.Object public @org.jetbrains.annotations.NotNull method removeAt(p0: int): java.lang.String } @kotlin.Metadata public final class A2 { public method (): void - public final method contains(p0: java.lang.Object): boolean - public method contains(p0: java.lang.String): boolean - public final method indexOf(p0: java.lang.Object): int - public method indexOf(p0: java.lang.String): int - public final method lastIndexOf(p0: java.lang.Object): int - public method lastIndexOf(p0: java.lang.String): int - public final method remove(p0: int): java.lang.String - public final method remove(p0: java.lang.Object): boolean - public method remove(p0: java.lang.String): boolean - public method removeAt(p0: int): java.lang.String + public bridge final method contains(p0: java.lang.Object): boolean + public bridge method contains(p0: java.lang.String): boolean + public bridge final method indexOf(p0: java.lang.Object): int + public bridge method indexOf(p0: java.lang.String): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public bridge method lastIndexOf(p0: java.lang.String): int + public bridge final method remove(p0: int): java.lang.String + public bridge final method remove(p0: java.lang.Object): boolean + public bridge method remove(p0: java.lang.String): boolean + public bridge method removeAt(p0: int): java.lang.String } diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.txt b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.txt index a225db878da..bba8ff41170 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.txt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.txt @@ -1,11 +1,11 @@ @kotlin.Metadata public abstract class<Ljava/lang/Object;Ljava/util/Map;Lkotlin/jvm/internal/markers/KMutableMap;> AbstractGenericMap { public @org.jetbrains.annotations.NotNull <()Ljava/util/Collection;> method getValues(): java.util.Collection - public final <()Ljava/util/Collection;> method values(): java.util.Collection - public final <()Ljava/util/Set;>;> method entrySet(): java.util.Set + public bridge final <()Ljava/util/Collection;> method values(): java.util.Collection + 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 @org.jetbrains.annotations.NotNull <()Ljava/util/Set;> method getKeys(): java.util.Set - public final <()Ljava/util/Set;> method keySet(): java.util.Set + public bridge final <()Ljava/util/Set;> method keySet(): java.util.Set public @org.jetbrains.annotations.Nullable <(Ljava/lang/Object;)TV;> method get(p0: java.lang.Object): java.lang.Object public @org.jetbrains.annotations.Nullable <(Ljava/lang/Object;)TV;> method remove(p0: java.lang.Object): java.lang.Object public <(Ljava/util/Map<+TK;+TV;>;)V> method putAll(@org.jetbrains.annotations.NotNull p0: java.util.Map): void @@ -16,18 +16,18 @@ public abstract class<Ljava/lang/Objec public method containsValue(p0: java.lang.Object): boolean public method getSize(): int public method isEmpty(): boolean - public final method size(): int + 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;> GenericMap { public @org.jetbrains.annotations.NotNull <()Ljava/util/Collection;> method getValues(): java.util.Collection - public final <()Ljava/util/Collection;> method values(): java.util.Collection - public final <()Ljava/util/Set;>;> method entrySet(): java.util.Set + public bridge final <()Ljava/util/Collection;> method values(): java.util.Collection + 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 @org.jetbrains.annotations.NotNull <()Ljava/util/Set;> method getKeys(): java.util.Set - public final <()Ljava/util/Set;> method keySet(): java.util.Set + public bridge final <()Ljava/util/Set;> method keySet(): java.util.Set public @org.jetbrains.annotations.Nullable <(Ljava/lang/Object;)TV;> method get(p0: java.lang.Object): java.lang.Object public @org.jetbrains.annotations.Nullable <(Ljava/lang/Object;)TV;> method remove(p0: java.lang.Object): java.lang.Object public <(Ljava/util/Map<+TK;+TV;>;)V> method putAll(@org.jetbrains.annotations.NotNull p0: java.util.Map): void @@ -38,6 +38,6 @@ public final class<Ljava/lang/Object;L public method containsValue(p0: java.lang.Object): boolean public method getSize(): int public method isEmpty(): boolean - public final method size(): int + public bridge final method size(): int private synthetic final field $$delegate_0: java.util.HashMap } diff --git a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.txt b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.txt index f33c4ce18c6..1b62812417f 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.txt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.txt @@ -1,53 +1,53 @@ @kotlin.Metadata public abstract class;Lkotlin/jvm/internal/markers/KMutableMap;> AbstractStringStringMap { public @org.jetbrains.annotations.NotNull <()Ljava/util/Collection;> method getValues(): java.util.Collection - public final <()Ljava/util/Collection;> method values(): 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 final <()Ljava/util/Set;> method keySet(): java.util.Set - public final <()Ljava/util/Set;>;> method entrySet(): 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 <(Ljava/util/Map<+Ljava/lang/String;+Ljava/lang/String;>;)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 final method containsKey(p0: java.lang.Object): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean public method containsValue(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean - public final method containsValue(p0: java.lang.Object): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean public @org.jetbrains.annotations.Nullable method get(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String - public final method get(p0: java.lang.Object): java.lang.Object + public bridge final method get(p0: java.lang.Object): java.lang.Object public method getSize(): int public method isEmpty(): boolean public @org.jetbrains.annotations.Nullable method put(@org.jetbrains.annotations.NotNull p0: java.lang.String, @org.jetbrains.annotations.NotNull p1: java.lang.String): java.lang.String - public synthetic method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public synthetic bridge method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object public @org.jetbrains.annotations.Nullable method remove(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String - public final method remove(p0: java.lang.Object): java.lang.Object - public final method size(): int + public bridge final method remove(p0: 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;Lkotlin/jvm/internal/markers/KMutableMap;> StringStringMap { public @org.jetbrains.annotations.NotNull <()Ljava/util/Collection;> method getValues(): java.util.Collection - public final <()Ljava/util/Collection;> method values(): 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 final <()Ljava/util/Set;> method keySet(): java.util.Set - public final <()Ljava/util/Set;>;> method entrySet(): 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 <(Ljava/util/Map<+Ljava/lang/String;+Ljava/lang/String;>;)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 final method containsKey(p0: java.lang.Object): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean public method containsValue(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean - public final method containsValue(p0: java.lang.Object): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean public @org.jetbrains.annotations.Nullable method get(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String - public final method get(p0: java.lang.Object): java.lang.Object + public bridge final method get(p0: java.lang.Object): java.lang.Object public method getSize(): int public method isEmpty(): boolean public @org.jetbrains.annotations.Nullable method put(@org.jetbrains.annotations.NotNull p0: java.lang.String, @org.jetbrains.annotations.NotNull p1: java.lang.String): java.lang.String - public synthetic method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public synthetic bridge method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object public @org.jetbrains.annotations.Nullable method remove(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String - public final method remove(p0: java.lang.Object): java.lang.Object - public final method size(): int + public bridge final method remove(p0: 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/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.txt b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.txt index 894ac270ff4..57e07289184 100644 --- a/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.txt +++ b/compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.txt @@ -1,13 +1,13 @@ @kotlin.Metadata public abstract class<Ljava/lang/Object;Ljava/util/Map;Lkotlin/jvm/internal/markers/KMutableMap;> AbstractStringMap { public @org.jetbrains.annotations.NotNull <()Ljava/util/Collection;> method getValues(): java.util.Collection - public final <()Ljava/util/Collection;> method values(): 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 final <()Ljava/util/Set;> method keySet(): java.util.Set - public final <()Ljava/util/Set;>;> method entrySet(): 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 final <(Ljava/lang/Object;)TV;> method get(p0: java.lang.Object): java.lang.Object - public final <(Ljava/lang/Object;)TV;> method remove(p0: java.lang.Object): java.lang.Object + 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 @@ -15,25 +15,25 @@ public abstract class<Ljava/lang/Object;Ljava/util/Map method (): void public method clear(): void public method containsKey(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean - public final method containsKey(p0: java.lang.Object): 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 method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object - public final method size(): int + 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 { public @org.jetbrains.annotations.NotNull <()Ljava/util/Collection;> method getValues(): java.util.Collection - public final <()Ljava/util/Collection;> method values(): 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 final <()Ljava/util/Set;> method keySet(): java.util.Set - public final <()Ljava/util/Set;>;> method entrySet(): 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 final <(Ljava/lang/Object;)TV;> method get(p0: java.lang.Object): java.lang.Object - public final <(Ljava/lang/Object;)TV;> method remove(p0: java.lang.Object): java.lang.Object + 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 @@ -41,11 +41,11 @@ public final class<Ljava/lang/Object;Ljava/util/Map method (): void public method clear(): void public method containsKey(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean - public final method containsKey(p0: java.lang.Object): 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 method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object - public final method size(): int + 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 c7ddc76e3a3..95151b9e120 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBytecodeListingTest.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/AbstractBytecodeListingTest.kt @@ -56,6 +56,33 @@ class BytecodeListingTextCollectingVisitor(val filter: Filter, val withSignature if (!filter.shouldWriteClass(cr.access, cr.className)) null else visitor.text }.joinToString("\n\n", postfix = "\n") + + private val CLASS_OR_FIELD_OR_METHOD = setOf(ModifierTarget.CLASS, ModifierTarget.FIELD, ModifierTarget.METHOD) + private val CLASS_OR_METHOD = setOf(ModifierTarget.CLASS, ModifierTarget.METHOD) + private val FIELD_ONLY = setOf(ModifierTarget.FIELD) + private val METHOD_ONLY = setOf(ModifierTarget.METHOD) + private val FIELD_OR_METHOD = setOf(ModifierTarget.FIELD, ModifierTarget.METHOD) + + // TODO ACC_MANDATED - requires reading Parameters attribute, which we don't generate by default + internal val MODIFIERS = + arrayOf( + Modifier("public", ACC_PUBLIC, CLASS_OR_FIELD_OR_METHOD), + Modifier("protected", ACC_PROTECTED, CLASS_OR_FIELD_OR_METHOD), + Modifier("private", ACC_PRIVATE, CLASS_OR_FIELD_OR_METHOD), + Modifier("synthetic", ACC_SYNTHETIC, CLASS_OR_FIELD_OR_METHOD), + Modifier("bridge", ACC_BRIDGE, METHOD_ONLY), + Modifier("volatile", ACC_VOLATILE, FIELD_ONLY), + Modifier("synchronized", ACC_SYNCHRONIZED, METHOD_ONLY), + Modifier("varargs", ACC_VARARGS, METHOD_ONLY), + Modifier("transient", ACC_TRANSIENT, FIELD_ONLY), + Modifier("native", ACC_NATIVE, METHOD_ONLY), + Modifier("deprecated", ACC_DEPRECATED, CLASS_OR_FIELD_OR_METHOD), + Modifier("final", ACC_FINAL, CLASS_OR_FIELD_OR_METHOD), + Modifier("strict", ACC_STRICT, METHOD_ONLY), + Modifier("enum", ACC_ENUM, FIELD_ONLY), // ACC_ENUM modifier on class is handled in 'classOrInterface' + Modifier("abstract", ACC_ABSTRACT, CLASS_OR_METHOD, excludedMask = ACC_INTERFACE), + Modifier("static", ACC_STATIC, FIELD_OR_METHOD) + ) } interface Filter { @@ -89,16 +116,32 @@ class BytecodeListingTextCollectingVisitor(val filter: Filter, val withSignature list.add("$text ") } - private fun handleModifiers(access: Int, list: MutableList = declarationsInsideClass.last().annotations) { - if (access and ACC_PUBLIC != 0) addModifier("public", list) - if (access and ACC_PROTECTED != 0) addModifier("protected", list) - if (access and ACC_PRIVATE != 0) addModifier("private", list) + internal enum class ModifierTarget { + CLASS, FIELD, METHOD + } - if (access and ACC_SYNTHETIC != 0) addModifier("synthetic", list) - if (access and ACC_DEPRECATED != 0) addModifier("deprecated", list) - if (access and ACC_FINAL != 0) addModifier("final", list) - if (access and ACC_ABSTRACT != 0 && access and ACC_INTERFACE == 0) addModifier("abstract", list) - if (access and ACC_STATIC != 0) addModifier("static", list) + internal class Modifier( + val text: String, + private val mask: Int, + private val applicableTo: Set, + private val excludedMask: Int = 0 + ) { + fun hasModifier(access: Int, target: ModifierTarget) = + access and mask != 0 && + access and excludedMask == 0 && + applicableTo.contains(target) + } + + private fun handleModifiers( + target: ModifierTarget, + access: Int, + list: MutableList = declarationsInsideClass.last().annotations + ) { + for (modifier in MODIFIERS) { + if (modifier.hasModifier(access, target)) { + addModifier(modifier.text, list) + } + } } private fun classOrInterface(access: Int): String { @@ -115,7 +158,7 @@ class BytecodeListingTextCollectingVisitor(val filter: Filter, val withSignature if (classAnnotations.isNotEmpty()) { append(classAnnotations.joinToString("\n", postfix = "\n")) } - arrayListOf().apply { handleModifiers(classAccess, this) }.forEach { append(it) } + arrayListOf().apply { handleModifiers(ModifierTarget.CLASS, classAccess, this) }.forEach { append(it) } append(classOrInterface(classAccess)) if (withSignatures) { append("<$classSignature> ") @@ -141,7 +184,7 @@ class BytecodeListingTextCollectingVisitor(val filter: Filter, val withSignature val methodAnnotations = arrayListOf() val parameterAnnotations = hashMapOf>() - handleModifiers(access, methodAnnotations) + handleModifiers(ModifierTarget.METHOD, access, methodAnnotations) val methodParamCount = Type.getArgumentTypes(desc).size return object : MethodVisitor(API_VERSION) { @@ -194,7 +237,7 @@ class BytecodeListingTextCollectingVisitor(val filter: Filter, val withSignature val fieldSignature = if (withSignatures) "<$signature> " else "" val fieldDeclaration = Declaration("field $fieldSignature$name: $type") declarationsInsideClass.add(fieldDeclaration) - handleModifiers(access) + handleModifiers(ModifierTarget.FIELD, access) if (access and ACC_VOLATILE != 0) addModifier("volatile", fieldDeclaration.annotations) return object : FieldVisitor(API_VERSION) {