diff --git a/compiler/testData/ir/irText/classes/kt43217.sig.kt.txt b/compiler/testData/ir/irText/classes/kt43217.sig.kt.txt index cbdb71cc30c..6797cef5887 100644 --- a/compiler/testData/ir/irText/classes/kt43217.sig.kt.txt +++ b/compiler/testData/ir/irText/classes/kt43217.sig.kt.txt @@ -11,26 +11,36 @@ class A { // CHECK JVM_IR: // Mangled name (compatible mode: false): A{}b. // Mangled name (compatible mode: true): A.b. + // Mangled name for the signature (compatible mode: false): {}b + // Mangled name for the signature (compatible mode: true): local class : DoubleExpression { // CHECK: // Mangled name (compatible mode: false): A{}b.#(){} // Mangled name (compatible mode: true): A.b.#(){} + // Mangled name for the signature (compatible mode: false): {}b(){} + // Mangled name for the signature (compatible mode: true): (){} constructor() /* primary */ // CHECK: // Mangled name (compatible mode: false): A{}b.#isEqualTo(kotlin.Double){}kotlin.Any{EnhancedNullability} // Mangled name (compatible mode: true): A.b.#isEqualTo(kotlin.Double){}kotlin.Any{EnhancedNullability} + // Mangled name for the signature (compatible mode: false): {}bisEqualTo(kotlin.Double){}kotlin.Any{EnhancedNullability} + // Mangled name for the signature (compatible mode: true): isEqualTo(kotlin.Double){}kotlin.Any{EnhancedNullability} @Override /* fake */ override fun isEqualTo(value: Double): @EnhancedNullability Any // CHECK JVM_IR: // Mangled name (compatible mode: false): A{}b.#isEqualTo(kotlin.Double{EnhancedNullability}){}kotlin.Any{EnhancedNullability} // Mangled name (compatible mode: true): A.b.#isEqualTo(kotlin.Double{EnhancedNullability}){}kotlin.Any{EnhancedNullability} + // Mangled name for the signature (compatible mode: false): {}bisEqualTo(kotlin.Double{EnhancedNullability}){}kotlin.Any{EnhancedNullability} + // Mangled name for the signature (compatible mode: true): isEqualTo(kotlin.Double{EnhancedNullability}){}kotlin.Any{EnhancedNullability} /* fake */ override fun isEqualTo(value: @EnhancedNullability Double): @EnhancedNullability Any // CHECK JVM_IR: // Mangled name (compatible mode: false): A{}b.#get(){}kotlin.Double // Mangled name (compatible mode: true): A.b.#get(){}kotlin.Double + // Mangled name for the signature (compatible mode: false): {}bget(){}kotlin.Double + // Mangled name for the signature (compatible mode: true): get(){}kotlin.Double override fun get(): Double } @@ -38,6 +48,8 @@ class A { // CHECK JVM_IR: // Mangled name (compatible mode: false): A#(){}A{}b. // Mangled name (compatible mode: true): A#(){}A.b. + // Mangled name for the signature (compatible mode: false): (){}A{}b. + // Mangled name for the signature (compatible mode: true): (){}A.b. // Public signature: /A.b.|-6508357397455690228[0] // Public signature debug description: (){}A{}b. private get diff --git a/compiler/testData/ir/irText/classes/localClasses.sig.kt.txt b/compiler/testData/ir/irText/classes/localClasses.sig.kt.txt index 253342131e4..36706a62a13 100644 --- a/compiler/testData/ir/irText/classes/localClasses.sig.kt.txt +++ b/compiler/testData/ir/irText/classes/localClasses.sig.kt.txt @@ -5,13 +5,16 @@ fun outer(): Unit // CHECK: // Mangled name: #outer(){}.LocalClass + // Mangled name for the signature: outer(){} local class LocalClass { // CHECK: // Mangled name: #outer(){}.LocalClass#(){} + // Mangled name for the signature: outer(){}(){} constructor() /* primary */ // CHECK: // Mangled name: #outer(){}.LocalClass#foo(){} + // Mangled name for the signature: outer(){}foo(){} fun foo(): Unit } diff --git a/compiler/testData/ir/irText/classes/objectLiteralExpressions.sig.kt.txt b/compiler/testData/ir/irText/classes/objectLiteralExpressions.sig.kt.txt index bfd4d1b6f1a..5ebe9db244f 100644 --- a/compiler/testData/ir/irText/classes/objectLiteralExpressions.sig.kt.txt +++ b/compiler/testData/ir/irText/classes/objectLiteralExpressions.sig.kt.txt @@ -7,13 +7,19 @@ val test1: Any // CHECK JVM_IR: // Mangled name (compatible mode: false): {}test1. // Mangled name (compatible mode: true): test1. + // Mangled name for the signature (compatible mode: false): {}test1 + // Mangled name for the signature (compatible mode: true): // CHECK JS_IR NATIVE: // Mangled name (compatible mode: false): {}test1. // Mangled name (compatible mode: true): test1. + // Mangled name for the signature (compatible mode: false): {}test1 + // Mangled name for the signature (compatible mode: true): local class { // CHECK: // Mangled name (compatible mode: false): {}test1.#(){} // Mangled name (compatible mode: true): test1.#(){} + // Mangled name for the signature (compatible mode: false): {}test1(){} + // Mangled name for the signature (compatible mode: true): (){} constructor() /* primary */ } @@ -37,18 +43,26 @@ val test2: IFoo // CHECK JVM_IR: // Mangled name (compatible mode: false): {}test2. // Mangled name (compatible mode: true): test2. + // Mangled name for the signature (compatible mode: false): {}test2 + // Mangled name for the signature (compatible mode: true): // CHECK JS_IR NATIVE: // Mangled name (compatible mode: false): {}test2. // Mangled name (compatible mode: true): test2. + // Mangled name for the signature (compatible mode: false): {}test2 + // Mangled name for the signature (compatible mode: true): local class : IFoo { // CHECK: // Mangled name (compatible mode: false): {}test2.#(){} // Mangled name (compatible mode: true): test2.#(){} + // Mangled name for the signature (compatible mode: false): {}test2(){} + // Mangled name for the signature (compatible mode: true): (){} constructor() /* primary */ // CHECK: // Mangled name (compatible mode: false): {}test2.#foo(){} // Mangled name (compatible mode: true): test2.#foo(){} + // Mangled name for the signature (compatible mode: false): {}test2foo(){} + // Mangled name for the signature (compatible mode: true): foo(){} override fun foo(): Unit } @@ -102,19 +116,25 @@ class Outer { fun test3(): Inner // CHECK JVM_IR: // Mangled name: Outer#test3(){}Outer.Inner. + // Mangled name for the signature: test3(){}Outer.Inner // CHECK JS_IR NATIVE: // Mangled name: Outer#test3(){}. + // Mangled name for the signature: test3(){} local class : Inner { // CHECK JVM_IR: // Mangled name: Outer#test3(){}Outer.Inner.#(){} + // Mangled name for the signature: test3(){}Outer.Inner(){} // CHECK JS_IR NATIVE: // Mangled name: Outer#test3(){}.#(){} + // Mangled name for the signature: test3(){}(){} constructor() /* primary */ // CHECK JVM_IR: // Mangled name: Outer#test3(){}Outer.Inner.#foo(){} + // Mangled name for the signature: test3(){}Outer.Innerfoo(){} // CHECK JS_IR NATIVE: // Mangled name: Outer#test3(){}.#foo(){} + // Mangled name for the signature: test3(){}foo(){} override fun foo(): Unit } @@ -145,19 +165,25 @@ interface IFoo { fun Outer.test4(): Inner // CHECK JVM_IR: // Mangled name: #test4@Outer(){}Outer.Inner. + // Mangled name for the signature: test4@Outer(){}Outer.Inner // CHECK JS_IR NATIVE: // Mangled name: #test4@Outer(){}. + // Mangled name for the signature: test4@Outer(){} local class : Inner { // CHECK JVM_IR: // Mangled name: #test4@Outer(){}Outer.Inner.#(){} + // Mangled name for the signature: test4@Outer(){}Outer.Inner(){} // CHECK JS_IR NATIVE: // Mangled name: #test4@Outer(){}.#(){} + // Mangled name for the signature: test4@Outer(){}(){} constructor() /* primary */ // CHECK JVM_IR: // Mangled name: #test4@Outer(){}Outer.Inner.#foo(){} + // Mangled name for the signature: test4@Outer(){}Outer.Innerfoo(){} // CHECK JS_IR NATIVE: // Mangled name: #test4@Outer(){}.#foo(){} + // Mangled name for the signature: test4@Outer(){}foo(){} override fun foo(): Unit } diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.sig.kt.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.sig.kt.txt index 83f688364ec..763b365d2d0 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.sig.kt.txt @@ -7,9 +7,13 @@ val test1: Int /* by */ // CHECK JVM_IR: // Mangled name (compatible mode: false): {}test1##static(){}kotlin.Int // Mangled name (compatible mode: true): test1$delegate##static(){}kotlin.Int + // Mangled name for the signature (compatible mode: false): {}test1#static(){}kotlin.Int + // Mangled name for the signature (compatible mode: true): #static(){}kotlin.Int // CHECK JS_IR NATIVE: // Mangled name (compatible mode: false): {}test1##static(){} // Mangled name (compatible mode: true): test1$delegate##static(){} + // Mangled name for the signature (compatible mode: false): {}test1#static(){} + // Mangled name for the signature (compatible mode: true): #static(){} local fun (): Int // CHECK JVM_IR: diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/class.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/class.sig.kt.txt index d71c7a71201..53f15576d7c 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/class.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/class.sig.kt.txt @@ -8,11 +8,13 @@ class Inner { // Public signature debug description: !Outer(kotlin.Any){} constructor($context_receiver_0: Outer, arg: Any) /* primary */ // CHECK JVM_IR: - // Mangled name computed from Ir: Inner.contextReceiverField0 - // Mangled name computed from Descriptor: Inner{}contextReceiverField0#jf + // Mangled name: Inner.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf // CHECK JS_IR NATIVE: - // Mangled name computed from Ir: Inner.contextReceiverField0 - // Mangled name computed from Descriptor: Inner{}contextReceiverField0 + // Mangled name: Inner.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 private /* final field */ val contextReceiverField0: Outer // CHECK JVM_IR: @@ -62,7 +64,9 @@ class Outer { fun f(outer: Outer): Unit // CHECK JVM_IR: // Mangled name: #f(Outer){}##static@Outer(){}Inner + // Mangled name for the signature: f(Outer){}#static@Outer(){}Inner // CHECK JS_IR NATIVE: // Mangled name: #f(Outer){}##static@Outer(){} + // Mangled name for the signature: f(Outer){}#static@Outer(){} local fun Outer.(): Inner diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/contextReceiverMethod.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/contextReceiverMethod.sig.kt.txt index 1c7a9ada6b3..1e6e7ead0b2 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/contextReceiverMethod.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/contextReceiverMethod.sig.kt.txt @@ -30,11 +30,13 @@ class Test { // Public signature debug description: !Context(){} constructor($context_receiver_0: Context) /* primary */ // CHECK JVM_IR: - // Mangled name computed from Ir: Test.contextReceiverField0 - // Mangled name computed from Descriptor: Test{}contextReceiverField0#jf + // Mangled name: Test.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf // CHECK JS_IR NATIVE: - // Mangled name computed from Ir: Test.contextReceiverField0 - // Mangled name computed from Descriptor: Test{}contextReceiverField0 + // Mangled name: Test.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 private /* final field */ val contextReceiverField0: Context // CHECK: diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.sig.kt.txt index 50586059da3..04b6f95d76e 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/contextualPrimaryConstructorWithParams.sig.kt.txt @@ -68,11 +68,13 @@ class OK { // Public signature debug description: !O(kotlin.String){} constructor($context_receiver_0: O, k: String) /* primary */ // CHECK JVM_IR: - // Mangled name computed from Ir: OK.contextReceiverField0 - // Mangled name computed from Descriptor: OK{}contextReceiverField0#jf + // Mangled name: OK.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf // CHECK JS_IR NATIVE: - // Mangled name computed from Ir: OK.contextReceiverField0 - // Mangled name computed from Descriptor: OK{}contextReceiverField0 + // Mangled name: OK.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 private /* final field */ val contextReceiverField0: O } @@ -88,7 +90,9 @@ class OK { fun box(): String // CHECK JVM_IR: // Mangled name: #box(){}kotlin.String##static@O(){}kotlin.String + // Mangled name for the signature: box(){}kotlin.String#static@O(){}kotlin.String // CHECK JS_IR NATIVE: // Mangled name: #box(){}##static@O(){} + // Mangled name for the signature: box(){}#static@O(){} local fun O.(): String diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.sig.kt.txt index 24b56747c1f..ac46d1d5973 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.sig.kt.txt @@ -96,11 +96,13 @@ class Result { // Public signature debug description: !kotlin.Int(){} constructor($context_receiver_0: Int) /* primary */ // CHECK JVM_IR: - // Mangled name computed from Ir: Result.contextReceiverField0 - // Mangled name computed from Descriptor: Result{}contextReceiverField0#jf + // Mangled name: Result.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf // CHECK JS_IR NATIVE: - // Mangled name computed from Ir: Result.contextReceiverField0 - // Mangled name computed from Descriptor: Result{}contextReceiverField0 + // Mangled name: Result.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 private /* final field */ val contextReceiverField0: Int } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/function.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/function.sig.kt.txt index 1d75f7a3b6f..978afb5ef21 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/function.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/function.sig.kt.txt @@ -33,6 +33,7 @@ class C { fun bar(c: C): Unit // CHECK: // Mangled name: #bar(C){}##static@C(){} + // Mangled name for the signature: bar(C){}#static@C(){} local fun C.(): Unit // CHECK: diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.sig.kt.txt index 882f74758e2..db1adb298a4 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.sig.kt.txt @@ -8,11 +8,13 @@ class A { // Public signature debug description: !1:0(){} constructor($context_receiver_0: T) /* primary */ // CHECK JVM_IR: - // Mangled name computed from Ir: A.contextReceiverField0 - // Mangled name computed from Descriptor: A{}contextReceiverField0#jf + // Mangled name: A.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf // CHECK JS_IR NATIVE: - // Mangled name computed from Ir: A.contextReceiverField0 - // Mangled name computed from Descriptor: A{}contextReceiverField0 + // Mangled name: A.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 private /* final field */ val contextReceiverField0: T } @@ -27,11 +29,13 @@ class B

{ // Public signature debug description: !kotlin.collections.Collection<1:0>(){} constructor($context_receiver_0: Collection

) /* primary */ // CHECK JVM_IR: - // Mangled name computed from Ir: B.contextReceiverField0 - // Mangled name computed from Descriptor: B{}contextReceiverField0#jf + // Mangled name: B.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf // CHECK JS_IR NATIVE: - // Mangled name computed from Ir: B.contextReceiverField0 - // Mangled name computed from Descriptor: B{}contextReceiverField0 + // Mangled name: B.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 private /* final field */ val contextReceiverField0: Collection

} diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.sig.kt.txt index b54b4f916cb..8a287572a2d 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.sig.kt.txt @@ -180,11 +180,13 @@ class CounterIterator : Iterator { // Public signature debug description: !CounterConfig(Counter){} constructor($context_receiver_0: CounterConfig, counter: Counter) /* primary */ // CHECK JVM_IR: - // Mangled name computed from Ir: CounterIterator.contextReceiverField0 - // Mangled name computed from Descriptor: CounterIterator{}contextReceiverField0#jf + // Mangled name: CounterIterator.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf // CHECK JS_IR NATIVE: - // Mangled name computed from Ir: CounterIterator.contextReceiverField0 - // Mangled name computed from Descriptor: CounterIterator{}contextReceiverField0 + // Mangled name: CounterIterator.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 private /* final field */ val contextReceiverField0: CounterConfig // CHECK JVM_IR: diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/kt52791.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/kt52791.sig.kt.txt index 3d3a73d8b75..29096f1642c 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/kt52791.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/kt52791.sig.kt.txt @@ -8,18 +8,22 @@ class MyClass { // Public signature debug description: !kotlin.Unit!kotlin.Int(){} constructor($context_receiver_0: Unit, $context_receiver_1: Int) /* primary */ // CHECK JVM_IR: - // Mangled name computed from Ir: MyClass.contextReceiverField0 - // Mangled name computed from Descriptor: MyClass{}contextReceiverField0#jf + // Mangled name: MyClass.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf // CHECK JS_IR NATIVE: - // Mangled name computed from Ir: MyClass.contextReceiverField0 - // Mangled name computed from Descriptor: MyClass{}contextReceiverField0 + // Mangled name: MyClass.contextReceiverField0 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField0 private /* final field */ val contextReceiverField0: Unit // CHECK JVM_IR: - // Mangled name computed from Ir: MyClass.contextReceiverField1 - // Mangled name computed from Descriptor: MyClass{}contextReceiverField1#jf + // Mangled name: MyClass.contextReceiverField1 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField1#jf // CHECK JS_IR NATIVE: - // Mangled name computed from Ir: MyClass.contextReceiverField1 - // Mangled name computed from Descriptor: MyClass{}contextReceiverField1 + // Mangled name: MyClass.contextReceiverField1 + // Mangled name for the signature computed from Ir: + // Mangled name for the signature computed from Descriptor: {}contextReceiverField1 private /* final field */ val contextReceiverField1: Int } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/lazy.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/lazy.sig.kt.txt index af5a1e64118..a881f7f3f58 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/lazy.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/lazy.sig.kt.txt @@ -12,37 +12,47 @@ interface Lazy { fun f(lazy1: Lazy, lazy2: Lazy, lazyT: Lazy, lazyLazyT: Lazy>): Unit // CHECK: // Mangled name: #f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}##static@Lazy(){} + // Mangled name for the signature: f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}#static@Lazy(){} local fun Lazy.(): Unit // CHECK: // Mangled name: #f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}##static@Lazy(){}##static@Lazy(){} + // Mangled name for the signature: f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}#static@Lazy(){}#static@Lazy(){} local fun Lazy.(): Unit // CHECK: // Mangled name: #f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}##static@Lazy(){} + // Mangled name for the signature: f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}#static@Lazy(){} local fun Lazy.(): Unit // CHECK: // Mangled name: #f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}##static@Lazy(){}##static@Lazy(){} + // Mangled name for the signature: f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}#static@Lazy(){}#static@Lazy(){} local fun Lazy.(): Unit // CHECK: // Mangled name: #f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}##static@Lazy<1:0>(){} + // Mangled name for the signature: f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}#static@Lazy<1:0>(){} local fun Lazy.(): Unit // CHECK: // Mangled name: #f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}##static@Lazy<2:0>(){}##static@Lazy(){} + // Mangled name for the signature: f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}#static@Lazy<2:0>(){}#static@Lazy(){} local fun Lazy.(): Unit // CHECK: // Mangled name: #f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}##static@Lazy>(){} + // Mangled name for the signature: f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}#static@Lazy>(){} local fun Lazy>.(): Unit // CHECK: // Mangled name: #f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}##static@Lazy>(){}##static@Lazy(){} + // Mangled name for the signature: f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}#static@Lazy>(){}#static@Lazy(){} local fun Lazy.(): Unit // CHECK: // Mangled name: #f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}##static@Lazy(){} + // Mangled name for the signature: f(Lazy;Lazy;Lazy<1:0>;Lazy>){0§}#static@Lazy(){} local fun Lazy.(): Unit // CHECK: // Mangled name: #f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}##static@Lazy(){}##static@Lazy>(){} + // Mangled name for the signature: f(Lazy;Lazy;Lazy<2:0>;Lazy>){0§}#static@Lazy(){}#static@Lazy>(){} local fun Lazy>.(): Unit // CHECK: diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.sig.kt.txt index 4974c6d12de..e0b42bc98c8 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/overloadPriority.sig.kt.txt @@ -37,7 +37,9 @@ fun f(): Any fun test(): Unit // CHECK JVM_IR: // Mangled name: #test(){}##static@Context(){}kotlin.Int + // Mangled name for the signature: test(){}#static@Context(){}kotlin.Int // CHECK JS_IR NATIVE: // Mangled name: #test(){}##static@Context(){} + // Mangled name for the signature: test(){}#static@Context(){} local fun Context.(): Int diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/overloading.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/overloading.sig.kt.txt index d7f8382b231..0e2ce424c05 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/overloading.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/overloading.sig.kt.txt @@ -25,7 +25,9 @@ fun foo($context_receiver_0: Int, $context_receiver_1: String): Int fun test(): Unit // CHECK JVM_IR: // Mangled name: #test(){}##static@kotlin.Int(){}kotlin.Int + // Mangled name for the signature: test(){}#static@kotlin.Int(){}kotlin.Int // CHECK JS_IR NATIVE: // Mangled name: #test(){}##static@kotlin.Int(){} + // Mangled name for the signature: test(){}#static@kotlin.Int(){} local fun Int.(): Int diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.sig.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.sig.kt.txt index 194a635ded2..2cc410de9f7 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/typeParameterAsContextReceiver.sig.kt.txt @@ -5,9 +5,11 @@ fun test(): Unit // CHECK: // Mangled name: #test(){}##static@kotlin.Int(){} + // Mangled name for the signature: test(){}#static@kotlin.Int(){} local fun Int.(): Unit // CHECK: // Mangled name: #test(){}##static@kotlin.Int(){}##static(kotlin.Int){} + // Mangled name for the signature: test(){}#static@kotlin.Int(){}#static(kotlin.Int){} local fun (i: Int): Unit // CHECK: diff --git a/compiler/testData/ir/irText/declarations/defaultArguments.sig.kt.txt b/compiler/testData/ir/irText/declarations/defaultArguments.sig.kt.txt index 8f10c314405..c4a6596224b 100644 --- a/compiler/testData/ir/irText/declarations/defaultArguments.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/defaultArguments.sig.kt.txt @@ -5,5 +5,6 @@ fun test1(x: Int, y: Int, z: String): Unit // CHECK: // Mangled name: #test1(kotlin.Int;kotlin.Int;kotlin.String){}#local#static(kotlin.Int;kotlin.Int;kotlin.String){} + // Mangled name for the signature: test1(kotlin.Int;kotlin.Int;kotlin.String){}local#static(kotlin.Int;kotlin.Int;kotlin.String){} local fun local(xx: Int, yy: Int, zz: String): Unit diff --git a/compiler/testData/ir/irText/declarations/localClassWithOverrides.sig.kt.txt b/compiler/testData/ir/irText/declarations/localClassWithOverrides.sig.kt.txt index 3bbbb884804..f29f41c05fb 100644 --- a/compiler/testData/ir/irText/declarations/localClassWithOverrides.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/localClassWithOverrides.sig.kt.txt @@ -5,70 +5,90 @@ fun outer(): Unit // CHECK: // Mangled name: #outer(){}.ALocal + // Mangled name for the signature: outer(){} local abstract class ALocal { // CHECK: // Mangled name: #outer(){}.ALocal#(){} + // Mangled name for the signature: outer(){}(){} constructor() /* primary */ // CHECK: // Mangled name: #outer(){}.ALocal#afun(){} + // Mangled name for the signature: outer(){}afun(){} abstract fun afun(): Unit // CHECK: // Mangled name: #outer(){}.ALocal{}aval + // Mangled name for the signature: outer(){}{}aval abstract val aval: Int // CHECK JVM_IR: // Mangled name: #outer(){}.ALocal#(){}kotlin.Int + // Mangled name for the signature: outer(){}(){}kotlin.Int // CHECK JS_IR NATIVE: // Mangled name: #outer(){}.ALocal#(){} + // Mangled name for the signature: outer(){}(){} abstract get // CHECK: // Mangled name: #outer(){}.ALocal{}avar + // Mangled name for the signature: outer(){}{}avar abstract var avar: Int // CHECK JVM_IR: // Mangled name: #outer(){}.ALocal#(){}kotlin.Int + // Mangled name for the signature: outer(){}(){}kotlin.Int // CHECK JS_IR NATIVE: // Mangled name: #outer(){}.ALocal#(){} + // Mangled name for the signature: outer(){}(){} abstract get // CHECK: // Mangled name: #outer(){}.ALocal#(kotlin.Int){} + // Mangled name for the signature: outer(){}(kotlin.Int){} abstract set } // CHECK: // Mangled name: #outer(){}.Local + // Mangled name for the signature: outer(){} local class Local : ALocal { // CHECK: // Mangled name: #outer(){}.Local{}aval + // Mangled name for the signature: outer(){}{}aval override val aval: Int field // CHECK JVM_IR: // Mangled name: #outer(){}.Local#(){}kotlin.Int + // Mangled name for the signature: outer(){}(){}kotlin.Int // CHECK JS_IR NATIVE: // Mangled name: #outer(){}.Local#(){} + // Mangled name for the signature: outer(){}(){} override get // CHECK: // Mangled name: #outer(){}.Local{}avar + // Mangled name for the signature: outer(){}{}avar override var avar: Int field // CHECK JVM_IR: // Mangled name: #outer(){}.Local#(){}kotlin.Int + // Mangled name for the signature: outer(){}(){}kotlin.Int // CHECK JS_IR NATIVE: // Mangled name: #outer(){}.Local#(){} + // Mangled name for the signature: outer(){}(){} override get // CHECK: // Mangled name: #outer(){}.Local#(kotlin.Int){} + // Mangled name for the signature: outer(){}(kotlin.Int){} override set // CHECK: // Mangled name: #outer(){}.Local#(){} + // Mangled name for the signature: outer(){}(){} constructor() /* primary */ // CHECK: // Mangled name: #outer(){}.Local#afun(){} + // Mangled name for the signature: outer(){}afun(){} override fun afun(): Unit } diff --git a/compiler/testData/ir/irText/declarations/parameters/localFun.sig.kt.txt b/compiler/testData/ir/irText/declarations/parameters/localFun.sig.kt.txt index c77dc961102..d576a9f1aec 100644 --- a/compiler/testData/ir/irText/declarations/parameters/localFun.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/parameters/localFun.sig.kt.txt @@ -5,17 +5,21 @@ fun outer(): Unit // CHECK: // Mangled name: #outer(){0§}#test1#static(kotlin.Int;0:0){0§} + // Mangled name for the signature: outer(){0§}test1#static(kotlin.Int;0:0){0§} local fun test1(i: Int, j: T): Unit // CHECK: // Mangled name: #outer(){0§}#test2#static(kotlin.Int;kotlin.String){} + // Mangled name for the signature: outer(){0§}test2#static(kotlin.Int;kotlin.String){} local fun test2(i: Int, j: String): Unit // CHECK: // Mangled name: #outer(){0§}#test3#static(kotlin.Array...){} + // Mangled name for the signature: outer(){0§}test3#static(kotlin.Array...){} local fun test3(vararg args: String): Unit // CHECK: // Mangled name: #outer(){0§}#textExt1#static@kotlin.String(kotlin.Int;1:0){} + // Mangled name for the signature: outer(){0§}textExt1#static@kotlin.String(kotlin.Int;1:0){} local fun String.textExt1(i: Int, j: TT): Unit diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/local.sig.kt.txt b/compiler/testData/ir/irText/declarations/provideDelegate/local.sig.kt.txt index fb022514c60..3eecc4f7f3f 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/local.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/local.sig.kt.txt @@ -81,7 +81,9 @@ class DelegateProvider { fun foo(): Unit // CHECK JVM_IR: // Mangled name: #foo(){}##static(){}kotlin.String + // Mangled name for the signature: foo(){}#static(){}kotlin.String // CHECK JS_IR NATIVE: // Mangled name: #foo(){}##static(){} + // Mangled name for the signature: foo(){}#static(){} local fun (): String diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.sig.kt.txt b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.sig.kt.txt index ba29ff9099c..c759fe4faa7 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.sig.kt.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.sig.kt.txt @@ -37,14 +37,18 @@ class MyClass { fun box(): String // CHECK JVM_IR: // Mangled name: #box(){}kotlin.String##static(){}kotlin.String + // Mangled name for the signature: box(){}kotlin.String#static(){}kotlin.String // CHECK JS_IR NATIVE: // Mangled name: #box(){}##static(){} + // Mangled name for the signature: box(){}#static(){} local fun (): String // CHECK JVM_IR: // Mangled name: #box(){}kotlin.String##static(){}kotlin.String + // Mangled name for the signature: box(){}kotlin.String#static(){}kotlin.String // CHECK JS_IR NATIVE: // Mangled name: #box(){}##static(){} + // Mangled name for the signature: box(){}#static(){} local fun (): String // CHECK JVM_IR: diff --git a/compiler/testData/ir/irText/errors/unresolvedReference.sig.kt.txt b/compiler/testData/ir/irText/errors/unresolvedReference.sig.kt.txt index 4d70ca90750..fb1644ddfd8 100644 --- a/compiler/testData/ir/irText/errors/unresolvedReference.sig.kt.txt +++ b/compiler/testData/ir/irText/errors/unresolvedReference.sig.kt.txt @@ -4,8 +4,9 @@ // Public signature debug description: {}test1 val test1: ErrorType // CHECK JVM_IR: - // Mangled name computed from Ir: #(){} - // Mangled name computed from Descriptor: #(){} + // Mangled name: #(){} + // Mangled name for the signature computed from Ir: (){} + // Mangled name for the signature computed from Descriptor: (){} // Public signature: /test1.|-4817139884021780494[0] // Public signature debug description: (){} get @@ -16,8 +17,9 @@ val test1: ErrorType // Public signature debug description: {}test2 val test2: ErrorType // CHECK JVM_IR: - // Mangled name computed from Ir: #(){} - // Mangled name computed from Descriptor: #(){} + // Mangled name: #(){} + // Mangled name for the signature computed from Ir: (){} + // Mangled name for the signature computed from Descriptor: (){} // Public signature: /test2.|1859255286326922853[0] // Public signature debug description: (){} get @@ -28,8 +30,9 @@ val test2: ErrorType // Public signature debug description: {}test3 val test3: ErrorType // CHECK JVM_IR: - // Mangled name computed from Ir: #(){} - // Mangled name computed from Descriptor: #(){} + // Mangled name: #(){} + // Mangled name for the signature computed from Ir: (){} + // Mangled name for the signature computed from Descriptor: (){} // Public signature: /test3.|-2322568342617474229[0] // Public signature debug description: (){} get @@ -40,8 +43,9 @@ val test3: ErrorType // Public signature debug description: {}test4 val test4: ErrorType // CHECK JVM_IR: - // Mangled name computed from Ir: #(){} - // Mangled name computed from Descriptor: #(){} + // Mangled name: #(){} + // Mangled name for the signature computed from Ir: (){} + // Mangled name for the signature computed from Descriptor: (){} // Public signature: /test4.|-5181690683324812065[0] // Public signature debug description: (){} get diff --git a/compiler/testData/ir/irText/expressions/argumentMappedWithError.sig.kt.txt b/compiler/testData/ir/irText/expressions/argumentMappedWithError.sig.kt.txt index b253aa652a0..bd29eaf65cb 100644 --- a/compiler/testData/ir/irText/expressions/argumentMappedWithError.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/argumentMappedWithError.sig.kt.txt @@ -15,8 +15,9 @@ fun Number.convert(): R fun foo(arg: Number): Unit // CHECK JVM_IR: -// Mangled name computed from Ir: #main(kotlin.Array){} -// Mangled name computed from Descriptor: #main(kotlin.Array){}%argumentMappedWithError.kt +// Mangled name: #main(kotlin.Array){} +// Mangled name for the signature computed from Ir: main(kotlin.Array){} +// Mangled name for the signature computed from Descriptor: main(kotlin.Array){}%argumentMappedWithError.kt // Public signature: /main|5561668743171252170[0] // Public signature debug description: main(kotlin.Array){}%argumentMappedWithError.kt // CHECK JS_IR NATIVE: diff --git a/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.sig.kt.txt b/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.sig.kt.txt index b7afd69019c..cdab6979ee5 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.sig.kt.txt @@ -36,7 +36,9 @@ fun foo(f: Foo): String fun test(): String // CHECK JVM_IR: // Mangled name: #test(){}kotlin.String##static(){}kotlin.String + // Mangled name for the signature: test(){}kotlin.String#static(){}kotlin.String // CHECK JS_IR NATIVE: // Mangled name: #test(){}##static(){} + // Mangled name for the signature: test(){}#static(){} local fun (): String diff --git a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.sig.kt.txt b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.sig.kt.txt index 274b30a4af4..30601644fbd 100644 --- a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.sig.kt.txt @@ -6,6 +6,7 @@ operator fun J?.component1(): Int // CHECK JVM_IR: // Mangled name: #component2@J(){}kotlin.Int +// Mangled name for the signature: component2@J(){}kotlin.Int // Public signature: [ File 'implicitNotNullInDestructuringAssignment.kt' <- /component2|-623550756830644944[0] ] private operator fun J.component2(): Int diff --git a/compiler/testData/ir/irText/expressions/inlinedBreakContinue.sig.kt.txt b/compiler/testData/ir/irText/expressions/inlinedBreakContinue.sig.kt.txt index fc1ed0db12f..03a0be4e4e8 100644 --- a/compiler/testData/ir/irText/expressions/inlinedBreakContinue.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/inlinedBreakContinue.sig.kt.txt @@ -17,18 +17,22 @@ inline fun foo(block: Function0): Unit fun test1(): Unit // CHECK: // Mangled name: #test1(){}##static(){} + // Mangled name for the signature: test1(){}#static(){} local fun (): Unit // CHECK: // Mangled name: #test1(){}##static(){} + // Mangled name for the signature: test1(){}#static(){} local fun (): Unit // CHECK: // Mangled name: #test1(){}##static(){} + // Mangled name for the signature: test1(){}#static(){} local fun (): Unit // CHECK: // Mangled name: #test1(){}##static(){} + // Mangled name for the signature: test1(){}#static(){} local fun (): Unit // CHECK: @@ -38,33 +42,41 @@ fun test1(): Unit fun test2(): Unit // CHECK: // Mangled name: #test2(){}##static(){} + // Mangled name for the signature: test2(){}#static(){} local fun (): Unit // CHECK: // Mangled name: #test2(){}##static(){} + // Mangled name for the signature: test2(){}#static(){} local fun (): Unit // CHECK: // Mangled name: #test2(){}##static(){} + // Mangled name for the signature: test2(){}#static(){} local fun (): Unit // CHECK: // Mangled name: #test2(){}##static(){} + // Mangled name for the signature: test2(){}#static(){} local fun (): Unit // CHECK: // Mangled name: #test2(){}##static(){} + // Mangled name for the signature: test2(){}#static(){} local fun (): Unit // CHECK: // Mangled name: #test2(){}##static(){} + // Mangled name for the signature: test2(){}#static(){} local fun (): Unit // CHECK: // Mangled name: #test2(){}##static(){} + // Mangled name for the signature: test2(){}#static(){} local fun (): Unit // CHECK: // Mangled name: #test2(){}##static(){} + // Mangled name for the signature: test2(){}#static(){} local fun (): Unit diff --git a/compiler/testData/ir/irText/expressions/multipleThisReferences.sig.kt.txt b/compiler/testData/ir/irText/expressions/multipleThisReferences.sig.kt.txt index e2bf7f594f7..2566ba45af7 100644 --- a/compiler/testData/ir/irText/expressions/multipleThisReferences.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/multipleThisReferences.sig.kt.txt @@ -35,36 +35,48 @@ class Host { fun Outer.test(): Inner // CHECK JVM_IR: // Mangled name: Host#test@Outer(){}Outer.Inner. + // Mangled name for the signature: test@Outer(){}Outer.Inner // CHECK JS_IR NATIVE: // Mangled name: Host#test@Outer(){}. + // Mangled name for the signature: test@Outer(){} local class : Inner { // CHECK JVM_IR: // Mangled name: Host#test@Outer(){}Outer.Inner.{}xx + // Mangled name for the signature: test@Outer(){}Outer.Inner{}xx // CHECK JS_IR NATIVE: // Mangled name: Host#test@Outer(){}.{}xx + // Mangled name for the signature: test@Outer(){}{}xx val xx: Int field // CHECK JVM_IR: // Mangled name: Host#test@Outer(){}Outer.Inner.#(){}kotlin.Int + // Mangled name for the signature: test@Outer(){}Outer.Inner(){}kotlin.Int // CHECK JS_IR NATIVE: // Mangled name: Host#test@Outer(){}.#(){} + // Mangled name for the signature: test@Outer(){}(){} get // CHECK JVM_IR: // Mangled name: Host#test@Outer(){}Outer.Inner.#(){} + // Mangled name for the signature: test@Outer(){}Outer.Inner(){} // CHECK JS_IR NATIVE: // Mangled name: Host#test@Outer(){}.#(){} + // Mangled name for the signature: test@Outer(){}(){} constructor() /* primary */ // CHECK JVM_IR: // Mangled name: Host#test@Outer(){}Outer.Inner.{}x + // Mangled name for the signature: test@Outer(){}Outer.Inner{}x // CHECK JS_IR NATIVE: // Mangled name: Host#test@Outer(){}.{}x + // Mangled name for the signature: test@Outer(){}{}x /* fake */ override val x: Int // CHECK JVM_IR: // Mangled name: Host#test@Outer(){}Outer.Inner.#(){}kotlin.Int + // Mangled name for the signature: test@Outer(){}Outer.Inner(){}kotlin.Int // CHECK JS_IR NATIVE: // Mangled name: Host#test@Outer(){}.#(){} + // Mangled name for the signature: test@Outer(){}(){} /* fake */ override get(): Int } diff --git a/compiler/testData/ir/irText/expressions/objectByNameInsideObject.sig.kt.txt b/compiler/testData/ir/irText/expressions/objectByNameInsideObject.sig.kt.txt index 7171bb43415..84ddc96878f 100644 --- a/compiler/testData/ir/irText/expressions/objectByNameInsideObject.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/objectByNameInsideObject.sig.kt.txt @@ -37,8 +37,10 @@ object Thing : Base { private constructor() /* primary */ // CHECK JVM_IR: // Mangled name: Thing#(){}##static(){}kotlin.Any + // Mangled name for the signature: (){}#static(){}kotlin.Any // CHECK JS_IR NATIVE: // Mangled name: Thing#(){}##static(){} + // Mangled name for the signature: (){}#static(){} local fun (): Any // CHECK JVM_IR: diff --git a/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.sig.kt.txt b/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.sig.kt.txt index 8619ad6dbce..afcfd1b3e59 100644 --- a/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/suspendConversionForExtensionFunction.sig.kt.txt @@ -1,6 +1,7 @@ // CHECK JVM_IR: -// Mangled name computed from Ir: #main(){} -// Mangled name computed from Descriptor: #main(){}%suspendConversionForExtensionFunction.kt +// Mangled name: #main(){} +// Mangled name for the signature computed from Ir: main(){} +// Mangled name for the signature computed from Descriptor: main(){}%suspendConversionForExtensionFunction.kt // Public signature: /main|8952895695315889943[0] // Public signature debug description: main(){}%suspendConversionForExtensionFunction.kt // CHECK JS_IR NATIVE: diff --git a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.sig.kt.txt b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.sig.kt.txt index a435b97f856..084e0adf8df 100644 --- a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.sig.kt.txt +++ b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.sig.kt.txt @@ -39,18 +39,22 @@ open class WithCompanion { fun WithCompanion.test(): Unit // CHECK: // Mangled name: #test@WithCompanion(){}. + // Mangled name for the signature: test@WithCompanion(){} local class : WithCompanion { // CHECK: // Mangled name: #test@WithCompanion(){}.#(){} + // Mangled name for the signature: test@WithCompanion(){}(){} constructor() /* primary */ } // CHECK: // Mangled name: #test@WithCompanion(){}. + // Mangled name for the signature: test@WithCompanion(){} local class : WithCompanion { // CHECK: // Mangled name: #test@WithCompanion(){}.#(){} + // Mangled name for the signature: test@WithCompanion(){}(){} constructor() /* primary */ } diff --git a/compiler/testData/ir/irText/firProblems/AllCandidates.sig.kt.txt b/compiler/testData/ir/irText/firProblems/AllCandidates.sig.kt.txt index 2ab3e1a5025..60302a17d7a 100644 --- a/compiler/testData/ir/irText/firProblems/AllCandidates.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AllCandidates.sig.kt.txt @@ -35,6 +35,7 @@ class ResolvedCall { // CHECK JVM_IR: // Mangled name: #allCandidatesResult(kotlin.collections.Collection){0§}OverloadResolutionResultsImpl<0:0?>? +// Mangled name for the signature: allCandidatesResult(kotlin.collections.Collection){0§}OverloadResolutionResultsImpl<0:0?>? // Public signature: [ File 'AllCandidates.kt' <- /allCandidatesResult|-4417746287859138452[0] ] private fun allCandidatesResult(allCandidates: Collection): OverloadResolutionResultsImpl? diff --git a/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.sig.kt.txt b/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.sig.kt.txt index 361e60e9833..c93d70e1cea 100644 --- a/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AnonymousAsReturnOfGenericFunction.sig.kt.txt @@ -7,26 +7,34 @@ interface NestedGroupFragment { // CHECK JVM_IR: // Mangled name: #addMavenOptionsGroupFragment(){}#addOptionsGroup. +// Mangled name for the signature: addMavenOptionsGroupFragment(){}#addOptionsGroup. // Public signature: [ File 'AnonymousAsReturnOfGenericFunction.kt' <- /addMavenOptionsGroupFragment|1068646653174639665[0] ] // CHECK JS_IR NATIVE: // Mangled name: #addMavenOptionsGroupFragment(){} +// Mangled name for the signature: addMavenOptionsGroupFragment(){} private fun addMavenOptionsGroupFragment(): // CHECK JVM_IR: // Mangled name: #addOptionsGroup(){0§}#addOptionsGroup.<0:0> +// Mangled name for the signature: addOptionsGroup(){0§}#addOptionsGroup.<0:0> // Public signature: [ File 'AnonymousAsReturnOfGenericFunction.kt' <- /addOptionsGroup|1295014906395670038[0] ] // CHECK JS_IR NATIVE: // Mangled name: #addOptionsGroup(){0§} +// Mangled name for the signature: addOptionsGroup(){0§} private fun addOptionsGroup(): // CHECK JVM_IR: // Mangled name: #addOptionsGroup(){0§}#addOptionsGroup.<1:0>. + // Mangled name for the signature: addOptionsGroup(){0§}#addOptionsGroup.<1:0> // CHECK JS_IR NATIVE: // Mangled name: #addOptionsGroup(){0§}. + // Mangled name for the signature: addOptionsGroup(){0§} local class : NestedGroupFragment { // CHECK JVM_IR: // Mangled name: #addOptionsGroup(){0§}#addOptionsGroup.<2:0>.#(){} + // Mangled name for the signature: addOptionsGroup(){0§}#addOptionsGroup.<2:0>(){} // CHECK JS_IR NATIVE: // Mangled name: #addOptionsGroup(){0§}.#(){} + // Mangled name for the signature: addOptionsGroup(){0§}(){} constructor() /* primary */ } diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt index 1f7a38d6143..60074f42406 100644 --- a/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt @@ -90,8 +90,9 @@ object B { fun id(t: T): T // CHECK JVM_IR: -// Mangled name computed from Ir: foo#main(){} -// Mangled name computed from Descriptor: foo#main(){}%AssignmentOperator.kt +// Mangled name: foo#main(){} +// Mangled name for the signature computed from Ir: main(){} +// Mangled name for the signature computed from Descriptor: main(){}%AssignmentOperator.kt // Public signature: foo/main|7392120756922895329[0] // Public signature debug description: main(){}%AssignmentOperator.kt // CHECK JS_IR NATIVE: diff --git a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.sig.kt.txt b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.sig.kt.txt index ad806bd33b2..a16b32147fb 100644 --- a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.sig.kt.txt @@ -1,9 +1,11 @@ // CHECK: // Mangled name: {}registrationMap +// Mangled name for the signature: {}registrationMap // Public signature: [ File 'ClashResolutionDescriptor.kt' <- /registrationMap|8184441143918876435[0] ] private val registrationMap: HashMap // CHECK JVM_IR: // Mangled name: #(){}java.util.HashMap + // Mangled name for the signature: (){}java.util.HashMap // Public signature: [ File 'ClashResolutionDescriptor.kt' <- /registrationMap.|3119298927482099509[0] ] private get diff --git a/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.kt b/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.kt index 24a8e412adb..535e28b55c6 100644 --- a/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.kt +++ b/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.kt @@ -1,6 +1,6 @@ // DUMP_LOCAL_DECLARATION_SIGNATURES -// MUTE_SIGNATURE_COMPARISON_K2: ANY +// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR // ^ KT-57430 class Wrapper { diff --git a/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.sig.kt.txt b/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.sig.kt.txt index 116ca6986a5..f54a8284ad9 100644 --- a/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/FakeOverrideInAnonymousWithDelegation.sig.kt.txt @@ -11,25 +11,37 @@ class Wrapper { // CHECK JVM_IR: // Mangled name (compatible mode: false): Wrapper{}dummy. // Mangled name (compatible mode: true): Wrapper.dummy. + // Mangled name for the signature (compatible mode: false): {}dummy + // Mangled name for the signature (compatible mode: true): // CHECK JS_IR NATIVE: // Mangled name (compatible mode: false): Wrapper{}dummy. // Mangled name (compatible mode: true): Wrapper.dummy. + // Mangled name for the signature (compatible mode: false): {}dummy + // Mangled name for the signature (compatible mode: true): local class : Bar { // CHECK: // Mangled name (compatible mode: false): Wrapper{}dummy.#(){} // Mangled name (compatible mode: true): Wrapper.dummy.#(){} + // Mangled name for the signature (compatible mode: false): {}dummy(){} + // Mangled name for the signature (compatible mode: true): (){} constructor() /* primary */ // CHECK: // Mangled name (compatible mode: false): Wrapper{}dummy.{}foo // Mangled name (compatible mode: true): Wrapper.dummy.{}foo + // Mangled name for the signature (compatible mode: false): {}dummy{}foo + // Mangled name for the signature (compatible mode: true): {}foo /* fake */ override val foo: String // CHECK JVM_IR: // Mangled name (compatible mode: false): Wrapper{}dummy.#(){}kotlin.String // Mangled name (compatible mode: true): Wrapper.dummy.#(){}kotlin.String + // Mangled name for the signature (compatible mode: false): {}dummy(){}kotlin.String + // Mangled name for the signature (compatible mode: true): (){}kotlin.String // CHECK JS_IR NATIVE: // Mangled name (compatible mode: false): Wrapper{}dummy.#(){} // Mangled name (compatible mode: true): Wrapper.dummy.#(){} + // Mangled name for the signature (compatible mode: false): {}dummy(){} + // Mangled name for the signature (compatible mode: true): (){} /* fake */ override get(): String } @@ -37,6 +49,8 @@ class Wrapper { // CHECK JVM_IR: // Mangled name (compatible mode: false): Wrapper#(){}Wrapper{}dummy. // Mangled name (compatible mode: true): Wrapper#(){}Wrapper.dummy. + // Mangled name for the signature (compatible mode: false): (){}Wrapper{}dummy. + // Mangled name for the signature (compatible mode: true): (){}Wrapper.dummy. // Public signature: /Wrapper.dummy.|-1011589390871666922[0] // Public signature debug description: (){}Wrapper{}dummy. // CHECK JS_IR NATIVE: @@ -54,29 +68,43 @@ class Wrapper { // CHECK JVM_IR: // Mangled name (compatible mode: false): Wrapper{}bar. // Mangled name (compatible mode: true): Wrapper.bar. + // Mangled name for the signature (compatible mode: false): {}bar + // Mangled name for the signature (compatible mode: true): // CHECK JS_IR NATIVE: // Mangled name (compatible mode: false): Wrapper{}bar. // Mangled name (compatible mode: true): Wrapper.bar. + // Mangled name for the signature (compatible mode: false): {}bar + // Mangled name for the signature (compatible mode: true): local class : Bar { // CHECK: // Mangled name (compatible mode: false): Wrapper{}bar.#(){} // Mangled name (compatible mode: true): Wrapper.bar.#(){} + // Mangled name for the signature (compatible mode: false): {}bar(){} + // Mangled name for the signature (compatible mode: true): (){} constructor() /* primary */ // CHECK: // Mangled name (compatible mode: false): Wrapper{}bar..$$delegate_0 // Mangled name (compatible mode: true): Wrapper.bar..$$delegate_0 + // Mangled name for the signature (compatible mode: false): {}bar + // Mangled name for the signature (compatible mode: true): private /* final field */ val $$delegate_0: // CHECK: // Mangled name (compatible mode: false): Wrapper{}bar.{}foo // Mangled name (compatible mode: true): Wrapper.bar.{}foo + // Mangled name for the signature (compatible mode: false): {}bar{}foo + // Mangled name for the signature (compatible mode: true): {}foo override val foo: String // CHECK JVM_IR: // Mangled name (compatible mode: false): Wrapper{}bar.#(){}kotlin.String // Mangled name (compatible mode: true): Wrapper.bar.#(){}kotlin.String + // Mangled name for the signature (compatible mode: false): {}bar(){}kotlin.String + // Mangled name for the signature (compatible mode: true): (){}kotlin.String // CHECK JS_IR NATIVE: // Mangled name (compatible mode: false): Wrapper{}bar.#(){} // Mangled name (compatible mode: true): Wrapper.bar.#(){} + // Mangled name for the signature (compatible mode: false): {}bar(){} + // Mangled name for the signature (compatible mode: true): (){} override get(): String } @@ -84,6 +112,8 @@ class Wrapper { // CHECK JVM_IR: // Mangled name (compatible mode: false): Wrapper#(){}Wrapper{}bar. // Mangled name (compatible mode: true): Wrapper#(){}Wrapper.bar. + // Mangled name for the signature (compatible mode: false): (){}Wrapper{}bar. + // Mangled name for the signature (compatible mode: true): (){}Wrapper.bar. // Public signature: /Wrapper.bar.|-6775654681164748186[0] // Public signature debug description: (){}Wrapper{}bar. // CHECK JS_IR NATIVE: diff --git a/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.sig.kt.txt b/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.sig.kt.txt index 4270281f3ef..ed6ec8e9345 100644 --- a/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/FlushFromAnonymous.sig.kt.txt @@ -15,13 +15,16 @@ class Serializer { private fun createMessageCollector(): // CHECK: // Mangled name: Serializer#createMessageCollector(){}Serializer#createMessageCollector.. + // Mangled name for the signature: createMessageCollector(){}Serializer#createMessageCollector. local class : Collector { // CHECK: // Mangled name: Serializer#createMessageCollector(){}Serializer#createMessageCollector..#(){} + // Mangled name for the signature: createMessageCollector(){}Serializer#createMessageCollector.(){} constructor() /* primary */ // CHECK: // Mangled name: Serializer#createMessageCollector(){}Serializer#createMessageCollector..#flush(){} + // Mangled name for the signature: createMessageCollector(){}Serializer#createMessageCollector.flush(){} /* fake */ override fun flush(): Unit } diff --git a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.sig.kt.txt b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.sig.kt.txt index ecb1bcf287a..e041f28acf2 100644 --- a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.sig.kt.txt @@ -6,15 +6,18 @@ fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char): Unit // CHECK JVM_IR: // Mangled name: #nextChar@java.io.Reader(){}kotlin.Char? +// Mangled name for the signature: nextChar@java.io.Reader(){}kotlin.Char? // Public signature: [ File 'coercionToUnitForNestedWhen.kt' <- /nextChar|8697099457416866690[0] ] private fun Reader.nextChar(): Char? // CHECK: // Mangled name: {}BACKSLASH +// Mangled name for the signature: {}BACKSLASH // Public signature: [ File 'coercionToUnitForNestedWhen.kt' <- /BACKSLASH|9213821134505379379[0] ] private const val BACKSLASH: Char // CHECK JVM_IR: // Mangled name: #(){}kotlin.Char + // Mangled name for the signature: (){}kotlin.Char // Public signature: [ File 'coercionToUnitForNestedWhen.kt' <- /BACKSLASH.|7174062972088453102[0] ] private get diff --git a/compiler/testData/ir/irText/firProblems/kt55458.sig.kt.txt b/compiler/testData/ir/irText/firProblems/kt55458.sig.kt.txt index 21a699ebb0f..c69fd051bc9 100644 --- a/compiler/testData/ir/irText/firProblems/kt55458.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/kt55458.sig.kt.txt @@ -1,6 +1,7 @@ // CHECK JVM_IR: -// Mangled name computed from Ir: #main(){} -// Mangled name computed from Descriptor: #main(){}%kt55458.kt +// Mangled name: #main(){} +// Mangled name for the signature computed from Ir: main(){} +// Mangled name for the signature computed from Descriptor: main(){}%kt55458.kt // Public signature: /main|-1793468409000137506[0] // Public signature debug description: main(){}%kt55458.kt // CHECK JS_IR NATIVE: diff --git a/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.sig.kt.txt b/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.sig.kt.txt index ddab77a9f24..6dca37d20e3 100644 --- a/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.sig.kt.txt @@ -45,8 +45,9 @@ enum class ConfigurationParameter : Enum { // Public signature: /ConfigurationParameter.BASE_URL|null[0] BASE_URL // CHECK: - // Mangled name computed from Ir: ConfigurationParameter##static(kotlin.String;Wrapper){} - // Mangled name computed from Descriptor: ConfigurationParameter.BASE_URL#(){}##static(kotlin.String;Wrapper){} + // Mangled name: ConfigurationParameter##static(kotlin.String;Wrapper){} + // Mangled name for the signature computed from Ir: #static(kotlin.String;Wrapper){} + // Mangled name for the signature computed from Descriptor: (){}#static(kotlin.String;Wrapper){} local fun (value: String, nc: Wrapper): Unit // CHECK JVM_IR: diff --git a/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.sig.kt.txt b/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.sig.kt.txt index 7f74ede77f7..b008abcd4e7 100644 --- a/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/localClassUsedBeforeDeclaration.sig.kt.txt @@ -9,50 +9,66 @@ fun box(): String // CHECK JVM_IR: // Mangled name: #box(){}kotlin.String. + // Mangled name for the signature: box(){}kotlin.String // CHECK JS_IR NATIVE: // Mangled name: #box(){}. + // Mangled name for the signature: box(){} local class { // CHECK JVM_IR: // Mangled name: #box(){}kotlin.String.{}a + // Mangled name for the signature: box(){}kotlin.String{}a // CHECK JS_IR NATIVE: // Mangled name: #box(){}.{}a + // Mangled name for the signature: box(){}{}a val a: A field // CHECK JVM_IR: // Mangled name: #box(){}kotlin.String.#(){}#box..A + // Mangled name for the signature: box(){}kotlin.String(){}#box..A // CHECK JS_IR NATIVE: // Mangled name: #box(){}.#(){} + // Mangled name for the signature: box(){}(){} get // CHECK JVM_IR: // Mangled name: #box(){}kotlin.String..A + // Mangled name for the signature: box(){}kotlin.String // CHECK JS_IR NATIVE: // Mangled name: #box(){}..A + // Mangled name for the signature: box(){} local inner class A { // CHECK JVM_IR: // Mangled name: #box(){}kotlin.String..A{}ok + // Mangled name for the signature: box(){}kotlin.String{}ok // CHECK JS_IR NATIVE: // Mangled name: #box(){}..A{}ok + // Mangled name for the signature: box(){}{}ok val ok: String field // CHECK JVM_IR: // Mangled name: #box(){}kotlin.String..A#(){}kotlin.String + // Mangled name for the signature: box(){}kotlin.String(){}kotlin.String // CHECK JS_IR NATIVE: // Mangled name: #box(){}..A#(){} + // Mangled name for the signature: box(){}(){} get // CHECK JVM_IR: // Mangled name: #box(){}kotlin.String..A#(kotlin.String){} + // Mangled name for the signature: box(){}kotlin.String(kotlin.String){} // CHECK JS_IR NATIVE: // Mangled name: #box(){}..A#(kotlin.String){} + // Mangled name for the signature: box(){}(kotlin.String){} constructor(ok: String) /* primary */ } // CHECK JVM_IR: // Mangled name: #box(){}kotlin.String.#(){} + // Mangled name for the signature: box(){}kotlin.String(){} // CHECK JS_IR NATIVE: // Mangled name: #box(){}.#(){} + // Mangled name for the signature: box(){}(){} constructor() /* primary */ } diff --git a/compiler/testData/ir/irText/firProblems/localCompanion.sig.kt.txt b/compiler/testData/ir/irText/firProblems/localCompanion.sig.kt.txt index 2d031ebb6ff..01875ecafb3 100644 --- a/compiler/testData/ir/irText/firProblems/localCompanion.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/localCompanion.sig.kt.txt @@ -1,6 +1,7 @@ // CHECK JVM_IR: -// Mangled name computed from Ir: #main(){} -// Mangled name computed from Descriptor: #main(){}%localCompanion.kt +// Mangled name: #main(){} +// Mangled name for the signature computed from Ir: main(){} +// Mangled name for the signature computed from Descriptor: main(){}%localCompanion.kt // Public signature: /main|1798078925369608927[0] // Public signature debug description: main(){}%localCompanion.kt // CHECK JS_IR NATIVE: @@ -9,38 +10,48 @@ // Public signature debug description: main(){} fun main(): Unit // CHECK JVM_IR: - // Mangled name computed from Ir: #main(){}.Foo - // Mangled name computed from Descriptor: #main(){}%localCompanion.kt.Foo + // Mangled name: #main(){}.Foo + // Mangled name for the signature computed from Ir: main(){} + // Mangled name for the signature computed from Descriptor: main(){}%localCompanion.kt // CHECK JS_IR NATIVE: // Mangled name: #main(){}.Foo + // Mangled name for the signature: main(){} local class Foo { // CHECK JVM_IR: - // Mangled name computed from Ir: #main(){}.Foo.Companion - // Mangled name computed from Descriptor: #main(){}%localCompanion.kt.Foo.Companion + // Mangled name: #main(){}.Foo.Companion + // Mangled name for the signature computed from Ir: main(){} + // Mangled name for the signature computed from Descriptor: main(){}%localCompanion.kt // CHECK JS_IR NATIVE: // Mangled name: #main(){}.Foo.Companion + // Mangled name for the signature: main(){} local companion object Companion { // CHECK JVM_IR: - // Mangled name computed from Ir: #main(){}.Foo.Companion#(){} - // Mangled name computed from Descriptor: #main(){}%localCompanion.kt.Foo.Companion#(){} + // Mangled name: #main(){}.Foo.Companion#(){} + // Mangled name for the signature computed from Ir: main(){}(){} + // Mangled name for the signature computed from Descriptor: main(){}%localCompanion.kt(){} // CHECK JS_IR NATIVE: // Mangled name: #main(){}.Foo.Companion#(){} + // Mangled name for the signature: main(){}(){} private constructor() /* primary */ // CHECK JVM_IR: - // Mangled name computed from Ir: #main(){}.Foo.Companion#bar(){} - // Mangled name computed from Descriptor: #main(){}%localCompanion.kt.Foo.Companion#bar(){} + // Mangled name: #main(){}.Foo.Companion#bar(){} + // Mangled name for the signature computed from Ir: main(){}bar(){} + // Mangled name for the signature computed from Descriptor: main(){}%localCompanion.ktbar(){} // CHECK JS_IR NATIVE: // Mangled name: #main(){}.Foo.Companion#bar(){} + // Mangled name for the signature: main(){}bar(){} fun bar(): Unit } // CHECK JVM_IR: - // Mangled name computed from Ir: #main(){}.Foo#(){} - // Mangled name computed from Descriptor: #main(){}%localCompanion.kt.Foo#(){} + // Mangled name: #main(){}.Foo#(){} + // Mangled name for the signature computed from Ir: main(){}(){} + // Mangled name for the signature computed from Descriptor: main(){}%localCompanion.kt(){} // CHECK JS_IR NATIVE: // Mangled name: #main(){}.Foo#(){} + // Mangled name for the signature: main(){}(){} constructor() /* primary */ } diff --git a/compiler/testData/ir/irText/firProblems/readWriteProperty.sig.kt.txt b/compiler/testData/ir/irText/firProblems/readWriteProperty.sig.kt.txt index e4e175d7264..0d0272a899b 100644 --- a/compiler/testData/ir/irText/firProblems/readWriteProperty.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/readWriteProperty.sig.kt.txt @@ -40,25 +40,33 @@ class IdeWizard { private fun > setting(reference: SettingReference): // CHECK JVM_IR: // Mangled name: IdeWizard#setting(SettingReference<1:0,1:1>){0§;1§>}IdeWizard#setting.<1:0,1:1>. + // Mangled name for the signature: setting(SettingReference<1:0,1:1>){0§;1§>}IdeWizard#setting.<1:0,1:1> // CHECK JS_IR NATIVE: // Mangled name: IdeWizard#setting(SettingReference<1:0,1:1>){0§;1§>}. + // Mangled name for the signature: setting(SettingReference<1:0,1:1>){0§;1§>} local class : ReadWriteProperty { // CHECK JVM_IR: // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>.#(){} + // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>(){} // CHECK JS_IR NATIVE: // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}.#(){} + // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}(){} constructor() /* primary */ // CHECK JVM_IR: // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>.#getValue(kotlin.Any?;kotlin.reflect.KProperty<*>){}2:0? + // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>getValue(kotlin.Any?;kotlin.reflect.KProperty<*>){}2:0? // CHECK JS_IR NATIVE: // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}.#getValue(kotlin.Any?;kotlin.reflect.KProperty<*>){} + // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}getValue(kotlin.Any?;kotlin.reflect.KProperty<*>){} override operator fun getValue(thisRef: Any?, property: KProperty<*>): V? // CHECK JVM_IR: // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>.#setValue(kotlin.Any?;kotlin.reflect.KProperty<*>;2:0?){} + // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}IdeWizard#setting.<2:0,2:1>setValue(kotlin.Any?;kotlin.reflect.KProperty<*>;2:0?){} // CHECK JS_IR NATIVE: // Mangled name: IdeWizard#setting(SettingReference<2:0,2:1>){0§;1§>}.#setValue(kotlin.Any?;kotlin.reflect.KProperty<*>;2:0?){} + // Mangled name for the signature: setting(SettingReference<2:0,2:1>){0§;1§>}setValue(kotlin.Any?;kotlin.reflect.KProperty<*>;2:0?){} override operator fun setValue(thisRef: Any?, property: KProperty<*>, value: V?): Unit } diff --git a/compiler/testData/ir/irText/firProblems/timesInBuilder.sig.kt.txt b/compiler/testData/ir/irText/firProblems/timesInBuilder.sig.kt.txt index e07cc8c36a5..f5fbd0c9abe 100644 --- a/compiler/testData/ir/irText/firProblems/timesInBuilder.sig.kt.txt +++ b/compiler/testData/ir/irText/firProblems/timesInBuilder.sig.kt.txt @@ -72,9 +72,11 @@ class Expression { // CHECK JVM_IR: // Mangled name: #countIssues(kotlin.Function1){} +// Mangled name for the signature: countIssues(kotlin.Function1){} // Public signature: [ File 'timesInBuilder.kt' <- /countIssues|-3006686104129982000[0] ] // CHECK JS_IR NATIVE: // Mangled name: #countIssues(kotlin.Function1){} +// Mangled name for the signature: countIssues(kotlin.Function1){} private fun countIssues(restrictionsBuilder: @ExtensionFunctionType Function1): Unit // CHECK JVM_IR: @@ -119,8 +121,10 @@ fun > Column.select(t: T, r: T): Expression // CHECK JVM_IR: // Mangled name: #test(kotlin.Long){} +// Mangled name for the signature: test(kotlin.Long){} // Public signature: [ File 'timesInBuilder.kt' <- /test|-2956403500052581138[0] ] // CHECK JS_IR NATIVE: // Mangled name: #test(kotlin.Long){} +// Mangled name for the signature: test(kotlin.Long){} private fun test(x: Long): Unit diff --git a/compiler/testData/ir/irText/lambdas/anonymousFunction.sig.kt.txt b/compiler/testData/ir/irText/lambdas/anonymousFunction.sig.kt.txt index 2684611874e..05d721d36d2 100644 --- a/compiler/testData/ir/irText/lambdas/anonymousFunction.sig.kt.txt +++ b/compiler/testData/ir/irText/lambdas/anonymousFunction.sig.kt.txt @@ -7,9 +7,13 @@ val anonymous: Function0 // CHECK JVM_IR: // Mangled name (compatible mode: false): {}anonymous##static(){} // Mangled name (compatible mode: true): anonymous##static(){} + // Mangled name for the signature (compatible mode: false): {}anonymous#static(){} + // Mangled name for the signature (compatible mode: true): #static(){} // CHECK JS_IR NATIVE: // Mangled name (compatible mode: false): {}anonymous##static(){} // Mangled name (compatible mode: true): anonymous##static(){} + // Mangled name for the signature (compatible mode: false): {}anonymous#static(){} + // Mangled name for the signature (compatible mode: true): #static(){} local fun (): Unit // CHECK JVM_IR: diff --git a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.sig.kt.txt b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.sig.kt.txt index ef05c6f67dd..1442451000c 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.sig.kt.txt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.sig.kt.txt @@ -132,16 +132,20 @@ interface SendChannel { // CHECK JVM_IR: // Mangled name: #asChannel@CoroutineScope(Flow<*>){}ReceiveChannel +// Mangled name for the signature: asChannel@CoroutineScope(Flow<*>){}ReceiveChannel // Public signature: [ File 'castsInsideCoroutineInference.kt' <- /asChannel|-3549601571428075944[0] ] // CHECK JS_IR NATIVE: // Mangled name: #asChannel@CoroutineScope(Flow<*>){} +// Mangled name for the signature: asChannel@CoroutineScope(Flow<*>){} private fun CoroutineScope.asChannel(flow: Flow<*>): ReceiveChannel // CHECK JVM_IR: // Mangled name: #asFairChannel@CoroutineScope(Flow<*>){}ReceiveChannel +// Mangled name for the signature: asFairChannel@CoroutineScope(Flow<*>){}ReceiveChannel // Public signature: [ File 'castsInsideCoroutineInference.kt' <- /asFairChannel|-8739457176543595950[0] ] // CHECK JS_IR NATIVE: // Mangled name: #asFairChannel@CoroutineScope(Flow<*>){} +// Mangled name for the signature: asFairChannel@CoroutineScope(Flow<*>){} private fun CoroutineScope.asFairChannel(flow: Flow<*>): ReceiveChannel // CHECK: diff --git a/compiler/testData/ir/irText/types/definitelyNonNull.sig.kt.txt b/compiler/testData/ir/irText/types/definitelyNonNull.sig.kt.txt index f1466585457..e3627a0dfff 100644 --- a/compiler/testData/ir/irText/types/definitelyNonNull.sig.kt.txt +++ b/compiler/testData/ir/irText/types/definitelyNonNull.sig.kt.txt @@ -9,8 +9,9 @@ fun elvisLike(x: T, y: (T & Any)): (T & Any) // CHECK JVM_IR: -// Mangled name computed from Ir: #main(){} -// Mangled name computed from Descriptor: #main(){}%definitelyNonNull.kt +// Mangled name: #main(){} +// Mangled name for the signature computed from Ir: main(){} +// Mangled name for the signature computed from Descriptor: main(){}%definitelyNonNull.kt // Public signature: /main|536315142565162436[0] // Public signature debug description: main(){}%definitelyNonNull.kt // CHECK JS_IR NATIVE: diff --git a/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.sig.kt.txt b/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.sig.kt.txt index 56fecb54d1d..522c59077a3 100644 --- a/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.sig.kt.txt +++ b/compiler/testData/ir/irText/types/definitelyNotNullAsReceiver.sig.kt.txt @@ -5,6 +5,7 @@ fun box(): Unit // CHECK: // Mangled name: #box(){}##static(kotlin.String){} + // Mangled name for the signature: box(){}#static(kotlin.String){} local fun (it: String): Unit // CHECK: diff --git a/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.sig.kt.txt b/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.sig.kt.txt index 0cbdad90d72..c43a24a1162 100644 --- a/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.sig.kt.txt +++ b/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.sig.kt.txt @@ -41,8 +41,9 @@ class Foo { fun foo(x: MutableList): Foo // CHECK JVM_IR: -// Mangled name computed from Ir: #main(){} -// Mangled name computed from Descriptor: #main(){}%dontLeaveStubTypesInSetter.kt +// Mangled name: #main(){} +// Mangled name for the signature computed from Ir: main(){} +// Mangled name for the signature computed from Descriptor: main(){}%dontLeaveStubTypesInSetter.kt // Public signature: /main|-2535684763027974809[0] // Public signature debug description: main(){}%dontLeaveStubTypesInSetter.kt // CHECK JS_IR NATIVE: diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.sig.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.sig.kt.txt index 057ca6c1287..6fe90180ef3 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.sig.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult/nnStringVsTConstrained.sig.kt.txt @@ -5,6 +5,7 @@ fun testWithNullCheck(xs: Array): Unit // CHECK JVM_IR: // Mangled name: #testWithNullCheck(kotlin.Array){}##static(){}kotlin.String + // Mangled name for the signature: testWithNullCheck(kotlin.Array){}#static(){}kotlin.String local fun (): String // CHECK JVM_IR: diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt index 60e7190629e..a6a4e65b790 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrMangledNameAndSignatureDumpHandler.kt @@ -11,13 +11,12 @@ import org.jetbrains.kotlin.backend.jvm.JvmSymbols import org.jetbrains.kotlin.backend.jvm.ir.hasPlatformDependent import org.jetbrains.kotlin.builtins.StandardNames import org.jetbrains.kotlin.descriptors.DescriptorVisibilities -import org.jetbrains.kotlin.fir.backend.FirMangler import org.jetbrains.kotlin.descriptors.PropertyDescriptor +import org.jetbrains.kotlin.fir.backend.FirMangler import org.jetbrains.kotlin.fir.backend.FirMetadataSource import org.jetbrains.kotlin.ir.IrBuiltIns import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.backend.js.utils.isEqualsInheritedFromAny import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.interpreter.intrinsicConstEvaluationAnnotation @@ -71,9 +70,11 @@ private const val CHECK_MARKER = "// CHECK" * // CHECK JVM_IR: * // Mangled name: #test(){}kotlin.Int * // Public signature: /test|4216975235718029399[0] + * // Public signature debug description: test(){}kotlin.Int * // CHECK JS_IR NATIVE: * // Mangled name: #test(){} * // Public signature: /test|6620506149988718649[0] + * // Public signature debug description: test(){} * fun test(): Int * ``` * @@ -206,13 +207,15 @@ class IrMangledNameAndSignatureDumpHandler( val symbol = declaration.symbol - val computedMangledNames = mutableListOf() + val fullMangledNames = mutableListOf() + val signatureMangledNames = mutableListOf() - irMangler.addMangledNameTo(computedMangledNames, declaration) - descriptorMangler.addMangledNameTo(computedMangledNames, symbol.descriptor) + irMangler.addFullMangledNameTo(fullMangledNames, declaration) + irMangler.addSignatureMangledNameTo(signatureMangledNames, declaration) + descriptorMangler.addSignatureMangledNameTo(signatureMangledNames, symbol.descriptor) ((declaration as? IrMetadataSourceOwner)?.metadata as? FirMetadataSource)?.fir?.let { - firMangler?.addMangledNameTo( - computedMangledNames, + firMangler?.addSignatureMangledNameTo( + signatureMangledNames, it ) } @@ -229,7 +232,14 @@ class IrMangledNameAndSignatureDumpHandler( } fun printActualMangledNamesAndSignatures() { - printMangledNames(computedMangledNames) + printMangledNames(fullMangledNames, prefix = "Mangled name") + + // Signature mangled names computed from descriptors, IR and FIR must be all equal to the signature description, which + // we already print (see the IdSignature.print function above). + // If this is not the case, print them separately. + if (signatureMangledNames.any { it.value != symbol.signature?.asPublic()?.description.orEmpty() }) { + printMangledNames(signatureMangledNames, prefix = "Mangled name for the signature") + } symbol.signature?.print("Public signature") symbol.privateSignature?.print("Private signature") @@ -371,13 +381,13 @@ private inline fun Iterable.printAligned(printer: Printer, map { prefix(it) to it.value }.aligned().forEach(printer::println) } -private fun Printer.printMangledNames(computedMangledNames: List) { +private fun Printer.printMangledNames(computedMangledNames: List, prefix: String) { val distinctNames = computedMangledNames.distinctBy { it.value } // If mangled names computed from all three representations (descriptors, IR, FIR) and modes match, // print just one mangled name. distinctNames.singleOrNull()?.let { - println("// Mangled name: ${it.value}") + println("// $prefix: ${it.value}") return } @@ -386,17 +396,17 @@ private fun Printer.printMangledNames(computedMangledNames: List) { printlnWithNoIndent(":") } -private fun > Mangler.addMangledNameTo( +private fun addMangledNameTo( collector: MutableList, - declaration: Declaration + manglerName: String, + declaration: Declaration, + mangle: Declaration.(Boolean) -> String, ) { listOf(false, true).mapTo(collector) { compatibleMode -> val mangledName = try { - declaration.mangleString(compatibleMode) + declaration.mangle(compatibleMode) } catch (e: Throwable) { // Kotlin-like IR renderer suppresses exceptions thrown during rendering, which leads to missing renders that are hard to debug. // Because this routine is executed during rendering, we print the exception description instead of a proper mangled name. @@ -435,6 +447,20 @@ private fun > Mangler.addMangl } } +private fun > Mangler.addSignatureMangledNameTo( + collector: MutableList, + declaration: Declaration +) { + addMangledNameTo(collector, manglerName, declaration) { signatureString(it) } +} + +private fun KotlinMangler.IrMangler.addFullMangledNameTo( + collector: MutableList, + declaration: IrDeclaration, +) { + addMangledNameTo(collector, manglerName, declaration) { mangleString(it) } +} + /** * Represents a single `// CHECK` block. * @@ -492,9 +518,8 @@ private val whitespaceRegex = "\\s+".toRegex() * // CHECK JS_IR NATIVE: * // Mangled name: #test(){} * // Public signature: /test|6620506149988718649[0] - * fun test(): Int { - * return 42 - * } + * // Public signature debug description: test(){} + * fun test(): Int * ``` * will be parsed into: * ```kotlin @@ -502,7 +527,8 @@ private val whitespaceRegex = "\\s+".toRegex() * backends = listOf(TargetBackend.JS_IR, TargetBackend.NATIVE), * expectations = listOf( * "// Mangled name: #test(){}", - * "// Public signature: /test|6620506149988718649[0]" + * "// Public signature: /test|6620506149988718649[0]", + * "// Public signature debug description: test(){}", * ) * ) * ```