[JVM IR] Ensure an instruction for the line number for a break.
This ensures that the debugger always has a bytecode offset for the line number of a break/continue so that you step there and so that you can set breakpoints there. The `nop` instruction is optimized out if it has no line number information. ^KT-46450 Fixed
This commit is contained in:
committed by
Alexander Udalov
parent
894a446585
commit
d33b70af1a
+2
-1
@@ -9,7 +9,7 @@ fun box(): String {
|
||||
} catch (e: Exception) {
|
||||
val y = "y"
|
||||
val z = "z"
|
||||
continue // TODO: why does the continue not have a line number so we stop here?
|
||||
continue
|
||||
} finally {
|
||||
throw RuntimeException("$i")
|
||||
}
|
||||
@@ -32,5 +32,6 @@ fun box(): String {
|
||||
// test.kt:9 box: i:int=0:int
|
||||
// test.kt:10 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException
|
||||
// test.kt:11 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException, y:java.lang.String="y":java.lang.String
|
||||
// test.kt:12 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException, y:java.lang.String="y":java.lang.String, z:java.lang.String="z":java.lang.String
|
||||
// test.kt:14 box: i:int=0:int
|
||||
// test.kt:18 box:
|
||||
|
||||
Reference in New Issue
Block a user