Debugger: Fix breakpoints on if/loops with constant conditions (KT-14421)
This commit is contained in:
@@ -51,12 +51,14 @@ open class BranchedValue(
|
||||
|
||||
val TRUE: BranchedValue = object : BranchedValue(StackValue.none()/*not used*/, null, Type.BOOLEAN_TYPE, IFEQ) {
|
||||
override fun condJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {
|
||||
v.nop()
|
||||
if (!jumpIfFalse) {
|
||||
v.goTo(jumpLabel)
|
||||
}
|
||||
}
|
||||
|
||||
override fun loopJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {
|
||||
v.nop()
|
||||
if (!jumpIfFalse) {
|
||||
v.fakeAlwaysTrueIfeq(jumpLabel)
|
||||
} else {
|
||||
@@ -72,12 +74,14 @@ open class BranchedValue(
|
||||
|
||||
val FALSE: BranchedValue = object : BranchedValue(StackValue.none()/*not used*/, null, Type.BOOLEAN_TYPE, IFEQ) {
|
||||
override fun condJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {
|
||||
v.nop()
|
||||
if (jumpIfFalse) {
|
||||
v.goTo(jumpLabel)
|
||||
}
|
||||
}
|
||||
|
||||
override fun loopJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {
|
||||
v.nop()
|
||||
if (jumpIfFalse) {
|
||||
v.fakeAlwaysTrueIfeq(jumpLabel)
|
||||
} else {
|
||||
|
||||
@@ -10,4 +10,4 @@ fun testSome(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
// 2 +3 4 2 7 10
|
||||
// 2 3 4 2 7 10
|
||||
Reference in New Issue
Block a user