Skip to content

Commit 45ca379

Browse files
committed
Use NeverValidAssumption in GenericInvokeNode
1 parent 2914cd5 commit 45ca379

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/GenericInvokeNode.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
import com.oracle.graal.python.runtime.PythonContext.PythonThreadState;
5252
import com.oracle.truffle.api.Assumption;
5353
import com.oracle.truffle.api.RootCallTarget;
54-
import com.oracle.truffle.api.Truffle;
5554
import com.oracle.truffle.api.dsl.Cached;
5655
import com.oracle.truffle.api.dsl.Cached.Shared;
5756
import com.oracle.truffle.api.dsl.GenerateUncached;
@@ -60,13 +59,10 @@
6059
import com.oracle.truffle.api.frame.VirtualFrame;
6160
import com.oracle.truffle.api.nodes.IndirectCallNode;
6261
import com.oracle.truffle.api.profiles.ConditionProfile;
62+
import com.oracle.truffle.api.utilities.NeverValidAssumption;
6363

6464
@GenerateUncached
6565
public abstract class GenericInvokeNode extends InvokeNode {
66-
private static final Assumption invalid = Truffle.getRuntime().createAssumption();
67-
static {
68-
invalid.invalidate();
69-
}
7066

7167
public static GenericInvokeNode create() {
7268
return GenericInvokeNodeGen.create();
@@ -81,12 +77,12 @@ protected GenericInvokeNode() {
8177

8278
@Override
8379
public Assumption needNotPassExceptionAssumption() {
84-
return invalid;
80+
return NeverValidAssumption.INSTANCE;
8581
}
8682

8783
@Override
8884
public Assumption needNotPassFrameAssumption() {
89-
return invalid;
85+
return NeverValidAssumption.INSTANCE;
9086
}
9187

9288
/**

0 commit comments

Comments
 (0)