@@ -3160,15 +3160,14 @@ static boolean isLazyContext(CApiContext cApiContext) {
3160
3160
}
3161
3161
3162
3162
@ GenerateUncached
3163
- public abstract static class ResolveHandleNode extends Node {
3163
+ public abstract static class ResolveHandleNode extends PNodeWithContext {
3164
3164
3165
3165
public abstract Object execute (Object pointerObject );
3166
3166
3167
3167
public abstract Object executeLong (long pointer );
3168
3168
3169
3169
@ Specialization (limit = "3" , //
3170
- guards = {"cachedPointer == pointer" , "cachedValue != null" }, //
3171
- assumptions = "singleContextAssumption()" , //
3170
+ guards = {"isSingleContext()" , "cachedPointer == pointer" , "cachedValue != null" }, //
3172
3171
rewriteOn = InvalidAssumptionException .class )
3173
3172
static PythonNativeWrapper resolveLongCached (@ SuppressWarnings ("unused" ) long pointer ,
3174
3173
@ Cached ("pointer" ) @ SuppressWarnings ("unused" ) long cachedPointer ,
@@ -3179,8 +3178,7 @@ static PythonNativeWrapper resolveLongCached(@SuppressWarnings("unused") long po
3179
3178
}
3180
3179
3181
3180
@ Specialization (limit = "3" , //
3182
- guards = {"isSame(lib, cachedPointerObject, pointerObject)" , "cachedValue != null" }, //
3183
- assumptions = "singleContextAssumption()" , //
3181
+ guards = {"isSingleContext()" , "isSame(lib, cachedPointerObject, pointerObject)" , "cachedValue != null" }, //
3184
3182
rewriteOn = InvalidAssumptionException .class )
3185
3183
static PythonNativeWrapper resolveObjectCached (@ SuppressWarnings ("unused" ) Object pointerObject ,
3186
3184
@ Cached ("pointerObject" ) @ SuppressWarnings ("unused" ) Object cachedPointerObject ,
@@ -3220,10 +3218,6 @@ static boolean isSame(InteropLibrary lib, Object left, Object right) {
3220
3218
return lib .isIdentical (left , right , lib );
3221
3219
}
3222
3220
3223
- Assumption singleContextAssumption () {
3224
- return PythonLanguage .get (this ).singleContextAssumption ;
3225
- }
3226
-
3227
3221
static Assumption getHandleValidAssumption (PythonNativeWrapper nativeWrapper ) {
3228
3222
return nativeWrapper .ensureHandleValidAssumption ();
3229
3223
}
0 commit comments