File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -315,8 +315,15 @@ Object doNativeNull(PythonNativeNull object) {
315
315
return object .getPtr ();
316
316
}
317
317
318
- @ Specialization (guards = "!isNativeClass(object)" )
319
- Object doPythonClass (PythonClass object ) {
318
+ @ Specialization (guards = {"!isNativeClass(object)" , "object == cachedObject" }, limit = "3" )
319
+ Object doPythonClass (@ SuppressWarnings ("unused" ) PythonClass object ,
320
+ @ SuppressWarnings ("unused" ) @ Cached ("object" ) PythonClass cachedObject ,
321
+ @ Cached ("wrap(object)" ) PythonClassNativeWrapper wrapper ) {
322
+ return wrapper ;
323
+ }
324
+
325
+ @ Specialization (replaces = "doPythonClass" , guards = {"!isNativeClass(object)" })
326
+ Object doPythonClassUncached (PythonClass object ) {
320
327
return PythonClassNativeWrapper .wrap (object );
321
328
}
322
329
You can’t perform that action at this time.
0 commit comments