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 103
103
import com .oracle .graal .python .builtins .objects .ints .PInt ;
104
104
import com .oracle .graal .python .builtins .objects .iterator .PSequenceIterator ;
105
105
import com .oracle .graal .python .builtins .objects .module .PythonModule ;
106
- import com .oracle .graal .python .builtins .objects .object .PythonBuiltinObject ;
107
106
import com .oracle .graal .python .builtins .objects .object .PythonObject ;
108
107
import com .oracle .graal .python .builtins .objects .slice .PSlice ;
109
108
import com .oracle .graal .python .builtins .objects .slice .PSlice .SliceInfo ;
@@ -439,23 +438,16 @@ PHashingCollection getDict(PythonNativeClass object) {
439
438
@ Builtin (name = "PyTruffle_SetAttr" , fixedNumOfPositionalArgs = 3 )
440
439
@ GenerateNodeFactory
441
440
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
-
449
441
@ Specialization
450
442
@ TruffleBoundary
451
443
Object setattr (PythonBuiltinClass object , String key , Object value ) {
452
444
object .setAttributeUnsafe (key , value );
453
445
return PNone .NONE ;
454
446
}
455
447
456
- @ Specialization
448
+ @ Specialization ( guards = { "!isPythonBuiltinClass(object)" })
457
449
@ TruffleBoundary
458
- Object setattr (PythonNativeClass object , String key , Object value ) {
450
+ Object setattr (PythonObject object , String key , Object value ) {
459
451
object .getStorage ().define (key , value );
460
452
return PNone .NONE ;
461
453
}
You can’t perform that action at this time.
0 commit comments