Skip to content

Commit b222da2

Browse files
committed
Add explicit transfer after Assumption#isValid() check
1 parent 2953280 commit b222da2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/truffleruby/language/SafepointManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ private static void poll(RubyLanguage language, Node currentNode, boolean fromBl
106106
final Assumption safepointAssumption = language.getSafepointAssumption();
107107
CompilerAsserts.partialEvaluationConstant(safepointAssumption);
108108
if (!safepointAssumption.isValid()) {
109+
// For the TruffleCheckNeverPartOfCompilation check, isValid() deopts anyway
110+
CompilerDirectives.transferToInterpreterAndInvalidate();
109111
final SafepointManager safepointManager = RubyLanguage.getCurrentContext().getSafepointManager();
110112
if (safepointManager.active) {
111113
CompilerDirectives.transferToInterpreterAndInvalidate();

0 commit comments

Comments
 (0)