@@ -96,16 +96,16 @@ static Object doBuiltinTypeCached(@SuppressWarnings("unused") PythonBuiltinClass
96
96
97
97
// Single-context
98
98
99
- @ Specialization (guards = " klass == cachedKlass" , //
100
- assumptions = { "singleContextAssumption()" , " cachedKlass.getSlotsFinalAssumption()"} , //
99
+ @ Specialization (guards = { "isSingleContext()" , " klass == cachedKlass"} , //
100
+ assumptions = " cachedKlass.getSlotsFinalAssumption()" , //
101
101
limit = "getAttributeAccessInlineCacheMaxDepth()" )
102
102
static Object doSlotCachedSingleCtx (@ SuppressWarnings ("unused" ) PythonClass klass ,
103
103
@ SuppressWarnings ("unused" ) @ Cached (value = "klass" , weak = true ) PythonClass cachedKlass ,
104
104
@ Cached (value = "slot.getValue(klass)" , weak = true ) Object result ) {
105
105
return result ;
106
106
}
107
107
108
- @ Specialization (guards = "klass == cachedKlass " , assumptions = { "singleContextAssumption() " }, limit = "getAttributeAccessInlineCacheMaxDepth()" )
108
+ @ Specialization (guards = { "isSingleContext() " , "klass == cachedKlass " }, limit = "getAttributeAccessInlineCacheMaxDepth()" )
109
109
static Object doBuiltinCachedSingleCtx (@ SuppressWarnings ("unused" ) PythonBuiltinClass klass ,
110
110
@ SuppressWarnings ("unused" ) @ Cached ("klass" ) PythonBuiltinClass cachedKlass ,
111
111
@ Cached ("slot.getValue(klass)" ) Object result ) {
@@ -115,8 +115,8 @@ static Object doBuiltinCachedSingleCtx(@SuppressWarnings("unused") PythonBuiltin
115
115
// PythonBuiltinClassType: if the value of the slot is not node factory or None, we must
116
116
// read
117
117
// the slot from the resolved builtin class
118
- @ Specialization (guards = {"klassType == cachedKlassType" , "slot.getValue(cachedKlassType) == null" }, //
119
- assumptions = { "singleContextAssumption()" }, limit = "getAttributeAccessInlineCacheMaxDepth()" )
118
+ @ Specialization (guards = {"isSingleContext()" , " klassType == cachedKlassType" , "slot.getValue(cachedKlassType) == null" }, //
119
+ limit = "getAttributeAccessInlineCacheMaxDepth()" )
120
120
static Object doBuiltinTypeCachedSingleCtx (@ SuppressWarnings ("unused" ) PythonBuiltinClassType klassType ,
121
121
@ SuppressWarnings ("unused" ) @ Cached ("klassType" ) PythonBuiltinClassType cachedKlassType ,
122
122
@ Cached ("slot.getValue(getContext().lookupType(cachedKlassType))" ) Object value ) {
@@ -125,7 +125,8 @@ static Object doBuiltinTypeCachedSingleCtx(@SuppressWarnings("unused") PythonBui
125
125
126
126
// Multi-context:
127
127
128
- @ Specialization (replaces = "doSlotCachedSingleCtx" , guards = {"slot.getValue(klass) == result" , "isCacheable(result)" }, limit = "getAttributeAccessInlineCacheMaxDepth()" )
128
+ @ Specialization (replaces = "doSlotCachedSingleCtx" , guards = {"slot.getValue(klass) == result" , "isCacheable(result)" }, //
129
+ limit = "getAttributeAccessInlineCacheMaxDepth()" )
129
130
static Object doSlotCachedMultiCtx (@ SuppressWarnings ("unused" ) PythonClass klass ,
130
131
@ Cached ("slot.getValue(klass)" ) Object result ) {
131
132
// in multi-context we can still cache primitives and BuiltinMethodDescriptor instances
0 commit comments