@@ -150,7 +150,7 @@ public static Object findAttr(Python3Core core, PythonBuiltinClassType klass, Ob
150
150
return value ;
151
151
}
152
152
153
- @ Specialization (guards = {"klass == cachedKlass" }, limit = "getAttributeAccessInlineCacheMaxDepth()" , assumptions = "singleContextAssumption ()" )
153
+ @ Specialization (guards = {"isSingleContext()" , " klass == cachedKlass" }, limit = "getAttributeAccessInlineCacheMaxDepth()" )
154
154
protected static Object lookupPBCTCached (@ SuppressWarnings ("unused" ) PythonBuiltinClassType klass ,
155
155
@ Cached ("klass" ) @ SuppressWarnings ("unused" ) PythonBuiltinClassType cachedKlass ,
156
156
@ Cached ("findAttr(getContext(), cachedKlass, key)" ) Object cachedValue ) {
@@ -184,7 +184,8 @@ public static PythonBuiltinClassType findOwnerInMro(Python3Core core, PythonBuil
184
184
return null ;
185
185
}
186
186
187
- @ Specialization (replaces = "lookupPBCTCached" , guards = "klass == cachedKlass" , limit = "getAttributeAccessInlineCacheMaxDepth()" )
187
+ @ Specialization (replaces = {"lookupPBCTCached" , "lookupPBCTCachedMulti" }, guards = "klass == cachedKlass" , //
188
+ limit = "getAttributeAccessInlineCacheMaxDepth()" )
188
189
protected Object lookupPBCTCachedOwner (@ SuppressWarnings ("unused" ) PythonBuiltinClassType klass ,
189
190
@ Cached ("klass" ) @ SuppressWarnings ("unused" ) PythonBuiltinClassType cachedKlass ,
190
191
@ Cached ("findOwnerInMro(getContext(), cachedKlass, key)" ) PythonBuiltinClassType ownerKlass ,
@@ -251,9 +252,9 @@ protected AttributeAssumptionPair findAttrAndAssumptionInMRO(Object klass) {
251
252
return new AttributeAssumptionPair (attrAssumption , PNone .NO_VALUE );
252
253
}
253
254
254
- @ Specialization (guards = {"isSameType(cachedKlass, klass)" , "cachedAttrInMROInfo != null" }, //
255
+ @ Specialization (guards = {"isSingleContext()" , " isSameType(cachedKlass, klass)" , "cachedAttrInMROInfo != null" }, //
255
256
limit = "getAttributeAccessInlineCacheMaxDepth()" , //
256
- assumptions = { "cachedAttrInMROInfo.assumption" , "singleContextAssumption()" } )
257
+ assumptions = "cachedAttrInMROInfo.assumption" )
257
258
protected static Object lookupConstantMROCached (@ SuppressWarnings ("unused" ) Object klass ,
258
259
@ Cached ("klass" ) @ SuppressWarnings ("unused" ) Object cachedKlass ,
259
260
@ Cached ("findAttrAndAssumptionInMRO(cachedKlass)" ) AttributeAssumptionPair cachedAttrInMROInfo ) {
@@ -268,7 +269,7 @@ public MroShapeLookupResult lookupInMroShape(MroShape shape, Object klass) {
268
269
// This specialization works well only for multi-context mode
269
270
// Note: MroShape creation and updates are disabled in multi-context mode, see
270
271
// PythonClass#initializeMroShape
271
- @ Specialization (guards = {"!singleContextAssumption().isValid ()" , "cachedMroShape != null" , "klass.getMroShape() == cachedMroShape" }, //
272
+ @ Specialization (guards = {"!isSingleContext ()" , "cachedMroShape != null" , "klass.getMroShape() == cachedMroShape" }, //
272
273
limit = "getAttributeAccessInlineCacheMaxDepth()" )
273
274
protected Object lookupConstantMROShape (PythonClass klass ,
274
275
@ SuppressWarnings ("unused" ) @ Cached ("klass.getMroShape()" ) MroShape cachedMroShape ,
@@ -284,10 +285,10 @@ protected static ReadAttributeFromObjectNode[] create(int size) {
284
285
return nodes ;
285
286
}
286
287
287
- @ Specialization (guards = {"isSameType(cachedKlass, klass)" , "mroLength < 32" }, //
288
+ @ Specialization (guards = {"isSingleContext()" , " isSameType(cachedKlass, klass)" , "mroLength < 32" }, //
288
289
limit = "getAttributeAccessInlineCacheMaxDepth()" , //
289
290
replaces = "lookupConstantMROShape" , //
290
- assumptions = { "lookupStable" , "singleContextAssumption()" } )
291
+ assumptions = "lookupStable" )
291
292
@ ExplodeLoop (kind = ExplodeLoop .LoopExplosionKind .FULL_UNROLL_UNTIL_RETURN )
292
293
protected Object lookupConstantMRO (@ SuppressWarnings ("unused" ) Object klass ,
293
294
@ Cached ("klass" ) @ SuppressWarnings ("unused" ) Object cachedKlass ,
0 commit comments