File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 138
138
import com .oracle .truffle .api .CompilerAsserts ;
139
139
import com .oracle .truffle .api .CompilerDirectives ;
140
140
import com .oracle .truffle .api .CompilerDirectives .TruffleBoundary ;
141
+ import com .oracle .truffle .api .dsl .Bind ;
141
142
import com .oracle .truffle .api .dsl .Cached ;
142
143
import com .oracle .truffle .api .dsl .Cached .Shared ;
143
144
import com .oracle .truffle .api .dsl .CachedContext ;
@@ -1191,6 +1192,13 @@ static PythonBuiltinClassType doPythonBuiltinClassType(@SuppressWarnings("unused
1191
1192
return cachedClassType ;
1192
1193
}
1193
1194
1195
+ @ Specialization (guards = {"classType == cachedClassType" }, limit = "1" )
1196
+ static PythonBuiltinClassType doPythonBuiltinClassType (@ SuppressWarnings ("unused" ) PythonBuiltinClass builtinClass ,
1197
+ @ Bind ("builtinClass.getType()" ) @ SuppressWarnings ("unused" ) PythonBuiltinClassType classType ,
1198
+ @ Cached ("classType" ) PythonBuiltinClassType cachedClassType ) {
1199
+ return cachedClassType ;
1200
+ }
1201
+
1194
1202
@ Specialization (guards = "isPythonAbstractClass(object)" , assumptions = "singleContextAssumption()" , rewriteOn = NotSameTypeException .class )
1195
1203
static Object doPythonAbstractClass (Object object ,
1196
1204
@ Cached (value = "object" , weak = true ) Object cachedObject ,
You can’t perform that action at this time.
0 commit comments