Do not evaluate label instructions and such
This commit is contained in:
@@ -67,7 +67,8 @@ fun interpreterLoop(
|
|||||||
// skip to the next instruction
|
// skip to the next instruction
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> when (insnOpcode) {
|
else -> {
|
||||||
|
when (insnOpcode) {
|
||||||
GOTO -> {
|
GOTO -> {
|
||||||
goto((currentInsn as JumpInsnNode).label)
|
goto((currentInsn as JumpInsnNode).label)
|
||||||
continue
|
continue
|
||||||
@@ -106,7 +107,9 @@ fun interpreterLoop(
|
|||||||
if (handled != null) return handled
|
if (handled != null) return handled
|
||||||
return ExceptionThrown(exceptionValue)
|
return ExceptionThrown(exceptionValue)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// Workaround for a bug in Kotlin: NoPatterMatched exception is thrown otherwise!
|
||||||
|
else -> {}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -118,6 +121,8 @@ fun interpreterLoop(
|
|||||||
if (handled != null) return handled
|
if (handled != null) return handled
|
||||||
return ExceptionThrown(e.exception)
|
return ExceptionThrown(e.exception)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val handled = handler.instructionProcessed(currentInsn)
|
val handled = handler.instructionProcessed(currentInsn)
|
||||||
if (handled != null) return handled
|
if (handled != null) return handled
|
||||||
|
|||||||
Reference in New Issue
Block a user