Skip to content

Commit 6784422

Browse files
Avoid using hookBCIToNodeIndex directly to avoid NPE
It can be null for methods with no line number tables
1 parent c80bc34 commit 6784422

File tree

1 file changed

+1
-1
lines changed
  • espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/nodes

1 file changed

+1
-1
lines changed

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/nodes/BytecodeNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ public Object resumeContinuation(VirtualFrame frame, int bci, int top) {
599599

600600
// set up local state.
601601
InstrumentationSupport instrument = instrumentation;
602-
int statementIndex = instrument == null ? 0 : instrument.hookBCIToNodeIndex.lookup(0, 0, bs.endBCI());
602+
int statementIndex = instrument == null ? 0 : instrument.getStatementIndexAfterJump(0, 0, bs.endBCI());
603603
assert bs.opcode(bci) == QUICK && nodes[bs.readCPI2(bci)] instanceof InvokeContinuableNode;
604604

605605
return executeBodyFromBCI(frame, bci, top, statementIndex, true, true);

0 commit comments

Comments
 (0)