Exception handling fixed for the case of inner classes
This commit is contained in:
@@ -70,9 +70,9 @@ fun interpreterLoop(
|
|||||||
fun exceptionCaught(exceptionValue: Value): Boolean {
|
fun exceptionCaught(exceptionValue: Value): Boolean {
|
||||||
val catchBlocks = handlers[m.instructions.indexOf(currentInsn)] ?: listOf()
|
val catchBlocks = handlers[m.instructions.indexOf(currentInsn)] ?: listOf()
|
||||||
for (catch in catchBlocks) {
|
for (catch in catchBlocks) {
|
||||||
val exceptionTypeDesc = catch.`type`
|
val exceptionTypeInternalName = catch.`type`
|
||||||
if (exceptionTypeDesc != null) {
|
if (exceptionTypeInternalName != null) {
|
||||||
val exceptionType = Type.getType(exceptionTypeDesc)
|
val exceptionType = Type.getObjectType(exceptionTypeInternalName)
|
||||||
if (eval.isInstanceOf(exceptionValue, exceptionType)) {
|
if (eval.isInstanceOf(exceptionValue, exceptionType)) {
|
||||||
frame.clearStack()
|
frame.clearStack()
|
||||||
frame.push(exceptionValue)
|
frame.push(exceptionValue)
|
||||||
|
|||||||
Reference in New Issue
Block a user