File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -82,13 +82,18 @@ public abstract class PyObjectGetMethod extends Node {
82
82
public abstract Object execute (Frame frame , Object receiver , String name );
83
83
84
84
protected static boolean isObjectGetAttribute (Object lazyClass ) {
85
- Object slotValue = null ;
85
+ Object getattributeSlot = null ;
86
+ Object getattrSlot = null ;
86
87
if (lazyClass instanceof PythonBuiltinClassType ) {
87
- slotValue = SpecialMethodSlot .GetAttribute .getValue ((PythonBuiltinClassType ) lazyClass );
88
+ PythonBuiltinClassType type = (PythonBuiltinClassType ) lazyClass ;
89
+ getattributeSlot = SpecialMethodSlot .GetAttribute .getValue (type );
90
+ getattrSlot = SpecialMethodSlot .GetAttr .getValue (type );
88
91
} else if (lazyClass instanceof PythonManagedClass ) {
89
- slotValue = SpecialMethodSlot .GetAttribute .getValue ((PythonManagedClass ) lazyClass );
92
+ PythonManagedClass type = (PythonManagedClass ) lazyClass ;
93
+ getattributeSlot = SpecialMethodSlot .GetAttribute .getValue (type );
94
+ getattrSlot = SpecialMethodSlot .GetAttr .getValue (type );
90
95
}
91
- return slotValue == BuiltinMethodDescriptors .OBJ_GET_ATTRIBUTE ;
96
+ return getattributeSlot == BuiltinMethodDescriptors .OBJ_GET_ATTRIBUTE && getattrSlot == PNone . NO_VALUE ;
92
97
}
93
98
94
99
@ Specialization (guards = "!isObjectGetAttribute(lazyClass)" , limit = "1" )
You can’t perform that action at this time.
0 commit comments