[IR] Dump IdSignatures and mangled names in irText tests
The reason #1 for this feature is that we want to test IdSignatures generated for declarations. Currently, there is no (easy) way to ensure that a change in the signature building logic doesn't cause any breaking changes wrt klibs. Now, most IdSignatures include hashed mangled names in them, so even if we catch a regression where the included hash changes, there would be no way of knowing immediately what caused it, unless we'd also have mangled names in the expectations. The reason #2 is to test the manglers themselves. Currently, there are no tests for them. They heavily duplicate each other, this is already causing issues (see KT-57427) that would be very hard to catch without these tests. ^KT-58238 Fixed
This commit is contained in:
committed by
Space Team
parent
bccf69910d
commit
6e8283a6fe
@@ -0,0 +1,178 @@
|
||||
// CHECK:
|
||||
// Mangled name: {}p
|
||||
// Public signature: /p|6715504260787941082[0]
|
||||
var p: Int
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: #<get-p>(){}kotlin.Int
|
||||
// Public signature: /p.<get-p>|5329635969197638839[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: #<get-p>(){}
|
||||
// Public signature: /p.<get-p>|-1162552463316289847[0]
|
||||
get
|
||||
// CHECK:
|
||||
// Mangled name: #<set-p>(kotlin.Int){}
|
||||
// Public signature: /p.<set-p>|-6346582004572228570[0]
|
||||
set
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: {}arr
|
||||
// Public signature: /arr|3895543167155351037[0]
|
||||
val arr: IntArray
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: #<get-arr>(){}kotlin.IntArray
|
||||
// Public signature: /arr.<get-arr>|-3280308842233711836[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: #<get-arr>(){}
|
||||
// Public signature: /arr.<get-arr>|-3478894267993371734[0]
|
||||
get
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: C
|
||||
// Public signature: /C|null[0]
|
||||
class C {
|
||||
// CHECK:
|
||||
// Mangled name: C{}p
|
||||
// Public signature: /C.p|6715504260787941082[0]
|
||||
var p: Int
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: C#<get-p>(){}kotlin.Int
|
||||
// Public signature: /C.p.<get-p>|5329635969197638839[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: C#<get-p>(){}
|
||||
// Public signature: /C.p.<get-p>|-1162552463316289847[0]
|
||||
get
|
||||
// CHECK:
|
||||
// Mangled name: C#<set-p>(kotlin.Int){}
|
||||
// Public signature: /C.p.<set-p>|-6346582004572228570[0]
|
||||
set
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: C#<init>(){}
|
||||
// Public signature: /C.<init>|-5645683436151566731[0]
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: C#get(kotlin.Int){}kotlin.Int
|
||||
// Public signature: /C.get|3217555545696752959[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: C#get(kotlin.Int){}
|
||||
// Public signature: /C.get|-1406503945102116889[0]
|
||||
operator fun get(i: Int): Int
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: C#set(kotlin.Int;kotlin.Int){}
|
||||
// Public signature: /C.set|-213984015376347786[0]
|
||||
operator fun set(i: Int, value: Int): Unit
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: O
|
||||
// Public signature: /O|null[0]
|
||||
object O {
|
||||
// CHECK:
|
||||
// Mangled name: O{}p
|
||||
// Public signature: /O.p|6715504260787941082[0]
|
||||
var p: Int
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: O#<get-p>(){}kotlin.Int
|
||||
// Public signature: /O.p.<get-p>|5329635969197638839[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: O#<get-p>(){}
|
||||
// Public signature: /O.p.<get-p>|-1162552463316289847[0]
|
||||
get
|
||||
// CHECK:
|
||||
// Mangled name: O#<set-p>(kotlin.Int){}
|
||||
// Public signature: /O.p.<set-p>|-6346582004572228570[0]
|
||||
set
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: O#<init>(){}
|
||||
// Public signature: /O.<init>|-5645683436151566731[0]
|
||||
private constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: O#get(kotlin.Int){}kotlin.Int
|
||||
// Public signature: /O.get|3217555545696752959[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name: O#get(kotlin.Int){}
|
||||
// Public signature: /O.get|-1406503945102116889[0]
|
||||
operator fun get(i: Int): Int
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: O#set(kotlin.Int;kotlin.Int){}
|
||||
// Public signature: /O.set|-213984015376347786[0]
|
||||
operator fun set(i: Int, value: Int): Unit
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testArrayPostfix(){}
|
||||
// Public signature: /testArrayPostfix|-5183940712820420583[0]
|
||||
fun testArrayPostfix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testArrayPrefix(){}
|
||||
// Public signature: /testArrayPrefix|3229135807367985846[0]
|
||||
fun testArrayPrefix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testClassOperatorPostfix(){}
|
||||
// Public signature: /testClassOperatorPostfix|2906708313202825150[0]
|
||||
fun testClassOperatorPostfix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testClassOperatorPrefix(){}
|
||||
// Public signature: /testClassOperatorPrefix|6915419153076323743[0]
|
||||
fun testClassOperatorPrefix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testClassPropPostfix(){}
|
||||
// Public signature: /testClassPropPostfix|-4203305206320166261[0]
|
||||
fun testClassPropPostfix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testClassPropPrefix(){}
|
||||
// Public signature: /testClassPropPrefix|1087589743797908334[0]
|
||||
fun testClassPropPrefix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testObjectOperatorPostfix(){}
|
||||
// Public signature: /testObjectOperatorPostfix|3636050613187164383[0]
|
||||
fun testObjectOperatorPostfix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testObjectOperatorPrefix(){}
|
||||
// Public signature: /testObjectOperatorPrefix|-3519675779257775428[0]
|
||||
fun testObjectOperatorPrefix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testObjectPropPostfix(){}
|
||||
// Public signature: /testObjectPropPostfix|2876726747893752873[0]
|
||||
fun testObjectPropPostfix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testObjectPropPrefix(){}
|
||||
// Public signature: /testObjectPropPrefix|428265185993627760[0]
|
||||
fun testObjectPropPrefix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testPropPostfix(){}
|
||||
// Public signature: /testPropPostfix|-2249245688892536772[0]
|
||||
fun testPropPostfix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testPropPrefix(){}
|
||||
// Public signature: /testPropPrefix|-2042336393408932139[0]
|
||||
fun testPropPrefix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testVarPostfix(){}
|
||||
// Public signature: /testVarPostfix|-5300999320944368230[0]
|
||||
fun testVarPostfix(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #testVarPrefix(){}
|
||||
// Public signature: /testVarPrefix|-4413709736918376229[0]
|
||||
fun testVarPrefix(): Unit
|
||||
|
||||
Reference in New Issue
Block a user