Generate meaningful bytecode names for extension receivers in INDY lambdas

This commit is contained in:
Pavel Mikhailovskii
2022-11-14 17:15:36 +01:00
committed by teamcity
parent 2953e600ff
commit 4436ce22b0
4 changed files with 41 additions and 1 deletions
@@ -0,0 +1,28 @@
// LANGUAGE: +LightweightLambdas
// TARGET_BACKEND: JVM_IR
fun <T> block(t: T, f: T.() -> Unit) {
f.invoke(t)
}
fun test() {
block("first") place1@ {
block("second") place2@ {
// Breakpoint here
this@place1
this@place2
}
}
}
// JVM_IR_TEMPLATES
// 2 INVOKEDYNAMIC
// 0 receiver
// 5 LOCALVARIABLE
// 1 LOCALVARIABLE \$this\$place1
// 1 LOCALVARIABLE \$this\$place2
// 1 LOCALVARIABLE t
// 1 LOCALVARIABLE f
// 1 LOCALVARIABLE \$this_place1
// 1 LDC "\$this\$place1"
// 1 LDC "\$this\$place2"