diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/bytecodes/JumpBytecodes.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/bytecodes/JumpBytecodes.java index 891cbc65d..b0e67e865 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/bytecodes/JumpBytecodes.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/bytecodes/JumpBytecodes.java @@ -173,7 +173,7 @@ public void executeCheck(final VirtualFrame frame) { public static AbstractUnconditionalJumpNode createUnconditionalShortJump(final CompiledCodeObject code, final AbstractBytecodeNode[] bytecodeNodes, final int index, final int bytecode) { final int offset = calculateShortOffset(bytecode); - if (needsCheck(bytecodeNodes, index, 1, offset)) { + if (needsCheck(code, bytecodeNodes, index, 1, offset)) { return new UnconditionalJumpWithCheckNode(code, index, 1, offset); } else { return new UnconditionalJumpWithoutCheckNode(code, index, 1, offset); @@ -183,7 +183,7 @@ public static AbstractUnconditionalJumpNode createUnconditionalShortJump(final C public static AbstractUnconditionalJumpNode createUnconditionalLongJump(final CompiledCodeObject code, final AbstractBytecodeNode[] bytecodeNodes, final int index, final int bytecode, final byte parameter) { final int offset = ((bytecode & 7) - 4 << 8) + Byte.toUnsignedInt(parameter); - if (needsCheck(bytecodeNodes, index, 2, offset)) { + if (needsCheck(code, bytecodeNodes, index, 2, offset)) { return new UnconditionalJumpWithCheckNode(code, index, 2, offset); } else { return new UnconditionalJumpWithoutCheckNode(code, index, 2, offset); @@ -193,14 +193,17 @@ public static AbstractUnconditionalJumpNode createUnconditionalLongJump(final Co public static AbstractUnconditionalJumpNode createUnconditionalLongExtendedJump(final CompiledCodeObject code, final AbstractBytecodeNode[] bytecodeNodes, final int index, final int numBytecodes, final byte bytecode, final int extB) { final int offset = calculateLongExtendedOffset(bytecode, extB); - if (needsCheck(bytecodeNodes, index, numBytecodes, offset)) { + if (needsCheck(code, bytecodeNodes, index, numBytecodes, offset)) { return new UnconditionalJumpWithCheckNode(code, index, numBytecodes, offset); } else { return new UnconditionalJumpWithoutCheckNode(code, index, numBytecodes, offset); } } - private static boolean needsCheck(final AbstractBytecodeNode[] bytecodeNodes, final int index, final int numBytecodes, final int offset) { + private static boolean needsCheck(final CompiledCodeObject code, final AbstractBytecodeNode[] bytecodeNodes, final int index, final int numBytecodes, final int offset) { + if (code.getSqueakClass().getImage().interruptHandlerDisabled()) { + return false; + } CompilerAsserts.neverPartOfCompilation(); if (offset < 0) { // back-jumps only final int backJumpIndex = index + numBytecodes + offset;