[IR] Fix KT-59346, KT-55993

#KT-59346
#KT-55993
This commit is contained in:
Evgeniy.Zhelenskiy
2023-06-15 19:12:49 +02:00
committed by Space Team
parent e802ee05a7
commit 2d920df507
19 changed files with 212 additions and 6 deletions
+15
View File
@@ -0,0 +1,15 @@
// CHECK_BYTECODE_TEXT
fun test(boolean: Boolean) {
if (boolean) { // Breakpoint
throw IllegalArgumentException()
}
val x: Int
}
fun box(): String {
test(false)
return "OK"
}
// 1 LINENUMBER 7 L1\n +ICONST_0\n +ISTORE 1
+15
View File
@@ -0,0 +1,15 @@
// CHECK_BYTECODE_TEXT
fun test(boolean: Boolean) {
val x: Int // Breakpoint
if (boolean) {
throw IllegalArgumentException()
}
}
fun box(): String {
test(false)
return "OK"
}
// 1 LINENUMBER 4
@@ -11,16 +11,15 @@ fun box() {
}
}
// The JVM IR backend does not generate line number information for the
// declaration of local variables without initializer. Stepping through
// those does not seem useful. This is consistent with javac behavior
// as well. The JVM backend does generate these line numbers.
// The JVM IR backend does generate line number information for the
// declaration of local variables without initializer.
// Stepping through those is useful for breakpoinnts.
// The JVM backend does generate these line numbers as well.
// EXPECTATIONS JVM
// EXPECTATIONS JVM JVM_IR
// test.kt:4 box
// test.kt:5 box
// test.kt:6 box
// EXPECTATIONS JVM JVM_IR
// test.kt:7 box
// test.kt:8 box
// test.kt:9 box