Skip to content

Commit 4d044c5

Browse files
committed
Address deprecations of AlwaysValidAssumption & NeverValidAssumption
1 parent 57bff14 commit 4d044c5

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/java/org/truffleruby/core/module/ModuleOperations.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import com.oracle.truffle.api.Assumption;
3737
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
3838
import com.oracle.truffle.api.nodes.Node;
39-
import com.oracle.truffle.api.utilities.NeverValidAssumption;
4039

4140
public abstract class ModuleOperations {
4241

@@ -127,7 +126,7 @@ private static boolean constantExists(RubyConstant constant, ArrayList<Assumptio
127126
if (constant.isAutoload() && constant.getAutoloadConstant().isAutoloading()) {
128127
if (assumptions != null) {
129128
// Cannot cache the lookup of an autoloading constant as the result depends on the calling thread
130-
assumptions.add(NeverValidAssumption.INSTANCE);
129+
assumptions.add(Assumption.NEVER_VALID);
131130
}
132131
return !constant.getAutoloadConstant().isAutoloadingThread();
133132
} else {

src/main/java/org/truffleruby/language/methods/CallInternalMethodNode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import com.oracle.truffle.api.nodes.Node;
1717
import com.oracle.truffle.api.nodes.NodeUtil;
1818
import com.oracle.truffle.api.profiles.BranchProfile;
19-
import com.oracle.truffle.api.utilities.AlwaysValidAssumption;
2019
import org.truffleruby.RubyContext;
2120
import org.truffleruby.builtins.CoreMethodNodeManager;
2221
import org.truffleruby.core.inlined.AlwaysInlinedMethodNode;
@@ -157,7 +156,7 @@ protected AlwaysInlinedMethodNode getUncachedAlwaysInlinedMethodNode(InternalMet
157156
protected Assumption getMethodAssumption(InternalMethod method) {
158157
return isSingleContext()
159158
? method.getDeclaringModule().fields.getOrCreateMethodAssumption(method.getName())
160-
: AlwaysValidAssumption.INSTANCE;
159+
: Assumption.ALWAYS_VALID;
161160
}
162161

163162
protected int getCacheLimit() {

0 commit comments

Comments
 (0)