[JVM IR] Support target templates in

AbstractCheckLocalVariablesTableTest and fix
`checkLocalVariablesTable/localFun.kt` for JVM IR.

Also improved diagnosability of CheckLocalVariablesTableTest failures.
This commit is contained in:
Mark Punzalan
2020-01-07 22:50:51 -08:00
committed by Alexander Udalov
parent 152d88e747
commit 70b304e6e4
3 changed files with 85 additions and 58 deletions
+11 -1
View File
@@ -1,8 +1,18 @@
// IGNORE_BACKEND: JVM_IR
fun foo() {
val x = 1
fun bar() {
val y = x
}
}
// Local function bodies are in a separate class (implementing FunctionN) for non-IR, and are static methods in the enclosing class for IR.
// JVM_TEMPLATES
// METHOD : LocalFunKt$foo$1.invoke()V
// VARIABLE : NAME=y TYPE=I INDEX=1
// VARIABLE : NAME=this TYPE=LLocalFunKt$foo$1; INDEX=0
// JVM_IR_TEMPLATES
// METHOD : LocalFunKt.foo$bar(I)V
// VARIABLE : NAME=y TYPE=I INDEX=1
// VARIABLE : NAME=$x TYPE=I INDEX=0