File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/frame Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 27
27
28
28
import com .oracle .graal .python .builtins .PythonBuiltinClassType ;
29
29
import com .oracle .graal .python .builtins .objects .ints .PInt ;
30
+ import com .oracle .graal .python .builtins .objects .type .PythonBuiltinClass ;
31
+ import com .oracle .graal .python .builtins .objects .type .PythonClass ;
30
32
import com .oracle .graal .python .nodes .PNode ;
31
33
import com .oracle .truffle .api .CompilerDirectives ;
32
34
import com .oracle .truffle .api .frame .Frame ;
@@ -40,7 +42,8 @@ public abstract class FrameSlotNode extends PNode {
40
42
private final ConditionProfile isPrimitiveProfile = ConditionProfile .createBinaryProfile ();
41
43
42
44
protected boolean isPrimitiveInt (PInt cls ) {
43
- return isPrimitiveProfile .profile (cls .getPythonClass () == getCore ().lookupType (PythonBuiltinClassType .PInt ));
45
+ PythonClass pythonClass = cls .getPythonClass ();
46
+ return isPrimitiveProfile .profile (pythonClass instanceof PythonBuiltinClass && ((PythonBuiltinClass ) pythonClass ).getType () == PythonBuiltinClassType .PInt );
44
47
}
45
48
46
49
protected final FrameSlot frameSlot ;
You can’t perform that action at this time.
0 commit comments