File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 103103import com .oracle .graal .python .builtins .objects .ints .PInt ;
104104import com .oracle .graal .python .builtins .objects .iterator .PSequenceIterator ;
105105import com .oracle .graal .python .builtins .objects .module .PythonModule ;
106- import com .oracle .graal .python .builtins .objects .object .PythonBuiltinObject ;
107106import com .oracle .graal .python .builtins .objects .object .PythonObject ;
108107import com .oracle .graal .python .builtins .objects .slice .PSlice ;
109108import com .oracle .graal .python .builtins .objects .slice .PSlice .SliceInfo ;
@@ -439,23 +438,16 @@ PHashingCollection getDict(PythonNativeClass object) {
439438 @ Builtin (name = "PyTruffle_SetAttr" , fixedNumOfPositionalArgs = 3 )
440439 @ GenerateNodeFactory
441440 abstract static class PyObject_Setattr extends PythonBuiltinNode {
442- @ Specialization
443- @ TruffleBoundary
444- Object setattr (PythonBuiltinObject object , String key , Object value ) {
445- object .getStorage ().define (key , value );
446- return PNone .NONE ;
447- }
448-
449441 @ Specialization
450442 @ TruffleBoundary
451443 Object setattr (PythonBuiltinClass object , String key , Object value ) {
452444 object .setAttributeUnsafe (key , value );
453445 return PNone .NONE ;
454446 }
455447
456- @ Specialization
448+ @ Specialization ( guards = { "!isPythonBuiltinClass(object)" })
457449 @ TruffleBoundary
458- Object setattr (PythonNativeClass object , String key , Object value ) {
450+ Object setattr (PythonObject object , String key , Object value ) {
459451 object .getStorage ().define (key , value );
460452 return PNone .NONE ;
461453 }
You can’t perform that action at this time.
0 commit comments