[IR] In irText tests, test full mangled names only computed from IR
We plan to disable computing full mangled names of declarations in all manglers except the IR mangler (see the subsequent commits). From now on, in irText tests we dump only the following mangled names: - Full mangled names computed using the IR mangler - Signature mangled names computed using the Descriptor mangler - Signature mangled names computed using the IR mangler - Signature mangled names computed using the FIR mangler Here by a full mangled name we mean the mangled name of a declaration computed using the `MangleMode.FULL` mode. Those mangled names include the mangled names of the declaration'a parents. By a signature mangled name we mean the mangled name of a declaration computed using the `MangleMode.SIGNATURE` mode. These mangled names are used to compute an `IdSignature` for the declaration, hence the name.
This commit is contained in:
committed by
Space Team
parent
9ccce52915
commit
69aeddcba8
@@ -15,8 +15,9 @@ fun <R : Number> Number.convert(): R
|
||||
fun foo(arg: Number): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #main(kotlin.Array<kotlin.String>){}
|
||||
// Mangled name computed from Descriptor: #main(kotlin.Array<kotlin.String>){}%argumentMappedWithError.kt
|
||||
// Mangled name: #main(kotlin.Array<kotlin.String>){}
|
||||
// Mangled name for the signature computed from Ir: main(kotlin.Array<kotlin.String>){}
|
||||
// Mangled name for the signature computed from Descriptor: main(kotlin.Array<kotlin.String>){}%argumentMappedWithError.kt
|
||||
// Public signature: /main|5561668743171252170[0]
|
||||
// Public signature debug description: main(kotlin.Array<kotlin.String>){}%argumentMappedWithError.kt
|
||||
// CHECK JS_IR NATIVE:
|
||||
|
||||
Vendored
+2
@@ -36,7 +36,9 @@ fun foo(f: Foo): String
|
||||
fun test(): String
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: #test(){}kotlin.String#<anonymous>#static(){}kotlin.String
|
||||
// Mangled name for the signature: test(){}kotlin.String<anonymous>#static(){}kotlin.String
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: #test(){}#<anonymous>#static(){}
|
||||
// Mangled name for the signature: test(){}<anonymous>#static(){}
|
||||
local fun <anonymous>(): String
|
||||
|
||||
|
||||
Vendored
+1
@@ -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
|
||||
|
||||
|
||||
@@ -17,18 +17,22 @@ inline fun foo(block: Function0<Unit>): Unit
|
||||
fun test1(): Unit
|
||||
// CHECK:
|
||||
// Mangled name: #test1(){}#<anonymous>#static(){}
|
||||
// Mangled name for the signature: test1(){}<anonymous>#static(){}
|
||||
local fun <anonymous>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test1(){}#<anonymous>#static(){}
|
||||
// Mangled name for the signature: test1(){}<anonymous>#static(){}
|
||||
local fun <anonymous>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test1(){}#<no name provided>#static(){}
|
||||
// Mangled name for the signature: test1(){}<no name provided>#static(){}
|
||||
local fun <no name provided>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test1(){}#<no name provided>#static(){}
|
||||
// Mangled name for the signature: test1(){}<no name provided>#static(){}
|
||||
local fun <no name provided>(): Unit
|
||||
|
||||
// CHECK:
|
||||
@@ -38,33 +42,41 @@ fun test1(): Unit
|
||||
fun test2(): Unit
|
||||
// CHECK:
|
||||
// Mangled name: #test2(){}#<anonymous>#static(){}
|
||||
// Mangled name for the signature: test2(){}<anonymous>#static(){}
|
||||
local fun <anonymous>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test2(){}#<anonymous>#static(){}
|
||||
// Mangled name for the signature: test2(){}<anonymous>#static(){}
|
||||
local fun <anonymous>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test2(){}#<anonymous>#static(){}
|
||||
// Mangled name for the signature: test2(){}<anonymous>#static(){}
|
||||
local fun <anonymous>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test2(){}#<anonymous>#static(){}
|
||||
// Mangled name for the signature: test2(){}<anonymous>#static(){}
|
||||
local fun <anonymous>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test2(){}#<no name provided>#static(){}
|
||||
// Mangled name for the signature: test2(){}<no name provided>#static(){}
|
||||
local fun <no name provided>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test2(){}#<no name provided>#static(){}
|
||||
// Mangled name for the signature: test2(){}<no name provided>#static(){}
|
||||
local fun <no name provided>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test2(){}#<no name provided>#static(){}
|
||||
// Mangled name for the signature: test2(){}<no name provided>#static(){}
|
||||
local fun <no name provided>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test2(){}#<no name provided>#static(){}
|
||||
// Mangled name for the signature: test2(){}<no name provided>#static(){}
|
||||
local fun <no name provided>(): Unit
|
||||
|
||||
|
||||
@@ -35,36 +35,48 @@ class Host {
|
||||
fun Outer.test(): Inner
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Host#test@Outer(){}Outer.Inner.<no name provided>
|
||||
// Mangled name for the signature: test@Outer(){}Outer.Inner
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Host#test@Outer(){}.<no name provided>
|
||||
// Mangled name for the signature: test@Outer(){}
|
||||
local class <no name provided> : Inner {
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Host#test@Outer(){}Outer.Inner.<no name provided>{}xx
|
||||
// Mangled name for the signature: test@Outer(){}Outer.Inner{}xx
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Host#test@Outer(){}.<no name provided>{}xx
|
||||
// Mangled name for the signature: test@Outer(){}{}xx
|
||||
val xx: Int
|
||||
field
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Host#test@Outer(){}Outer.Inner.<no name provided>#<get-xx>(){}kotlin.Int
|
||||
// Mangled name for the signature: test@Outer(){}Outer.Inner<get-xx>(){}kotlin.Int
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Host#test@Outer(){}.<no name provided>#<get-xx>(){}
|
||||
// Mangled name for the signature: test@Outer(){}<get-xx>(){}
|
||||
get
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Host#test@Outer(){}Outer.Inner.<no name provided>#<init>(){}
|
||||
// Mangled name for the signature: test@Outer(){}Outer.Inner<init>(){}
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Host#test@Outer(){}.<no name provided>#<init>(){}
|
||||
// Mangled name for the signature: test@Outer(){}<init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Host#test@Outer(){}Outer.Inner.<no name provided>{}x
|
||||
// Mangled name for the signature: test@Outer(){}Outer.Inner{}x
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Host#test@Outer(){}.<no name provided>{}x
|
||||
// Mangled name for the signature: test@Outer(){}{}x
|
||||
/* fake */ override val x: Int
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Host#test@Outer(){}Outer.Inner.<no name provided>#<get-x>(){}kotlin.Int
|
||||
// Mangled name for the signature: test@Outer(){}Outer.Inner<get-x>(){}kotlin.Int
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Host#test@Outer(){}.<no name provided>#<get-x>(){}
|
||||
// Mangled name for the signature: test@Outer(){}<get-x>(){}
|
||||
/* fake */ override get(): Int
|
||||
|
||||
}
|
||||
|
||||
@@ -37,8 +37,10 @@ object Thing : Base {
|
||||
private constructor() /* primary */
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Thing#<init>(){}#<anonymous>#static(){}kotlin.Any
|
||||
// Mangled name for the signature: <init>(){}<anonymous>#static(){}kotlin.Any
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: Thing#<init>(){}#<anonymous>#static(){}
|
||||
// Mangled name for the signature: <init>(){}<anonymous>#static(){}
|
||||
local fun <anonymous>(): Any
|
||||
|
||||
// CHECK JVM_IR:
|
||||
|
||||
+3
-2
@@ -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:
|
||||
|
||||
+4
@@ -39,18 +39,22 @@ open class WithCompanion {
|
||||
fun WithCompanion.test(): Unit
|
||||
// CHECK:
|
||||
// Mangled name: #test@WithCompanion(){}.<no name provided>
|
||||
// Mangled name for the signature: test@WithCompanion(){}
|
||||
local class <no name provided> : WithCompanion {
|
||||
// CHECK:
|
||||
// Mangled name: #test@WithCompanion(){}.<no name provided>#<init>(){}
|
||||
// Mangled name for the signature: test@WithCompanion(){}<init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test@WithCompanion(){}.<no name provided>
|
||||
// Mangled name for the signature: test@WithCompanion(){}
|
||||
local class <no name provided> : WithCompanion {
|
||||
// CHECK:
|
||||
// Mangled name: #test@WithCompanion(){}.<no name provided>#<init>(){}
|
||||
// Mangled name for the signature: test@WithCompanion(){}<init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user