Skip to content

Commit

Permalink
Make GlobalVariableReader#getValue neverPartOfCompilation() and remov…
Browse files Browse the repository at this point in the history
…e the TruffleBoundary to make that clearer
  • Loading branch information
andrykonchin committed Apr 23, 2024
1 parent 2989ab3 commit fa3c8e7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package org.truffleruby.language.globals;

import com.oracle.truffle.api.Assumption;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.CompilerAsserts;
import org.truffleruby.RubyLanguage;
import org.truffleruby.collections.SharedIndicesMap.ContextArray;

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

@TruffleBoundary
public Object getValue() {
CompilerAsserts.neverPartOfCompilation("Only behind @TruffleBoundary");

if (globalVariableAliasedAssumption.isValid()) {
return unaliasedStorage.getValue();
} else {
Expand Down

0 comments on commit fa3c8e7

Please sign in to comment.