Skip to content

Commit d6b4a57

Browse files
committed
Make GlobalVariableReader#getValue neverPartOfCompilation() and remove the TruffleBoundary to make that clearer
1 parent 62cebfd commit d6b4a57

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/org/truffleruby/RubyContext.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ public TruffleLogger getLogger() {
678678
return logger;
679679
}
680680

681+
@TruffleBoundary
681682
public ConsoleHolder getConsoleHolder() {
682683
if (consoleHolder == null) {
683684
synchronized (this) {

src/main/java/org/truffleruby/language/globals/GlobalVariableReader.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
package org.truffleruby.language.globals;
1111

1212
import com.oracle.truffle.api.Assumption;
13-
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
13+
import com.oracle.truffle.api.CompilerAsserts;
1414
import org.truffleruby.RubyLanguage;
1515
import org.truffleruby.collections.SharedIndicesMap.ContextArray;
1616

@@ -31,8 +31,9 @@ public final class GlobalVariableReader {
3131
this.unaliasedStorage = globalVariablesArray.get(index);
3232
}
3333

34-
@TruffleBoundary
3534
public Object getValue() {
35+
CompilerAsserts.neverPartOfCompilation("Only behind @TruffleBoundary");
36+
3637
if (globalVariableAliasedAssumption.isValid()) {
3738
return unaliasedStorage.getValue();
3839
} else {

0 commit comments

Comments
 (0)