Skip to content

Commit 0978c46

Browse files
Fix statement index handling with wide bytecodes
1 parent 2440911 commit 0978c46

File tree

1 file changed

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

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,6 +1463,13 @@ private Object executeBodyFromBCI(VirtualFrame frame, int startBCI, int startTop
14631463
livenessAnalysis.performPostBCI(frame, curBCI, skipLivenessActions);
14641464
int targetBCI = bs.nextBCI(curBCI);
14651465
livenessAnalysis.performOnEdge(frame, curBCI, targetBCI, skipLivenessActions);
1466+
if (instrument != null) {
1467+
int nextStatementIndex = instrument.getNextStatementIndex(statementIndex, targetBCI);
1468+
if (nextStatementIndex != statementIndex) {
1469+
instrument.notifyStatementChange(frame, statementIndex, nextStatementIndex, targetBCI);
1470+
statementIndex = nextStatementIndex;
1471+
}
1472+
}
14661473
top += Bytecodes.stackEffectOf(wideOpcode);
14671474
curBCI = targetBCI;
14681475
continue loop;

0 commit comments

Comments
 (0)