Skip to content

Commit 8e93662

Browse files
committed
Migrate Espresso to new batch polling API.
1 parent 4fc41a6 commit 8e93662

File tree

1 file changed

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

1 file changed

+17
-17
lines changed

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,24 +2026,24 @@ private int beforeJumpChecks(VirtualFrame frame, int curBCI, int targetBCI, int
20262026
TruffleSafepoint.poll(this);
20272027
if (CompilerDirectives.hasNextTier() && ++loopCount.value >= REPORT_LOOP_STRIDE) {
20282028
LoopNode.reportLoopCount(this, REPORT_LOOP_STRIDE);
2029-
loopCount.value = 0;
2030-
}
2031-
if (CompilerDirectives.inInterpreter() && BytecodeOSRNode.pollOSRBackEdge(this)) {
2032-
livenessAnalysis.catchUpOSR(frame, targetBCI, skipLivenessActions);
2033-
Object osrResult;
2034-
StoredWrapperNode storedWrapperNode = null;
2035-
try {
2036-
storedWrapperNode = storeWrapperNodeIfSet(frame, instrument);
2037-
osrResult = BytecodeOSRNode.tryOSR(this, targetBCI, new EspressoOSRInterpreterState(top, nextStatementIndex), null, frame);
2038-
} catch (Throwable any) {
2039-
// Has already been guest-handled in OSR. Shortcut out of the method.
2040-
throw new EspressoOSRReturnException(any);
2041-
} finally {
2042-
restoreWrapperNode(frame, storedWrapperNode, instrument);
2043-
}
2044-
if (osrResult != null) {
2045-
throw new EspressoOSRReturnException(osrResult);
2029+
if (CompilerDirectives.inInterpreter() && BytecodeOSRNode.pollOSRBackEdge(this, REPORT_LOOP_STRIDE)) {
2030+
livenessAnalysis.catchUpOSR(frame, targetBCI, skipLivenessActions);
2031+
Object osrResult;
2032+
StoredWrapperNode storedWrapperNode = null;
2033+
try {
2034+
storedWrapperNode = storeWrapperNodeIfSet(frame, instrument);
2035+
osrResult = BytecodeOSRNode.tryOSR(this, targetBCI, new EspressoOSRInterpreterState(top, nextStatementIndex), null, frame);
2036+
} catch (Throwable any) {
2037+
// Has already been guest-handled in OSR. Shortcut out of the method.
2038+
throw new EspressoOSRReturnException(any);
2039+
} finally {
2040+
restoreWrapperNode(frame, storedWrapperNode, instrument);
2041+
}
2042+
if (osrResult != null) {
2043+
throw new EspressoOSRReturnException(osrResult);
2044+
}
20462045
}
2046+
loopCount.value = 0;
20472047
}
20482048
}
20492049
livenessAnalysis.performOnEdge(frame, curBCI, targetBCI, skipLivenessActions);

0 commit comments

Comments
 (0)