@@ -302,9 +302,9 @@ public enum PythonBuiltinClassType implements TruffleObject {
302
302
303
303
// Foreign
304
304
ForeignObject ("ForeignObject" , J_POLYGLOT , Flags .PUBLIC_BASE_WDICT , ForeignObjectBuiltins .SLOTS ),
305
- ForeignNumber ("ForeignNumber" , J_POLYGLOT , Flags .PUBLIC_BASE_WDICT , FOREIGNNUMBER_M_FLAGS , ForeignNumberBuiltins .SLOTS ),
306
- ForeignBoolean ("ForeignBoolean" , J_POLYGLOT , Flags .PUBLIC_BASE_WDICT , FOREIGNNUMBER_M_FLAGS , ForeignBooleanBuiltins .SLOTS ),
307
- ForeignAbstractClass ("ForeignAbstractClass" , J_POLYGLOT , Flags .PUBLIC_BASE_WDICT ),
305
+ ForeignNumber ("ForeignNumber" , J_POLYGLOT , ForeignObject , Flags .PUBLIC_BASE_WDICT , FOREIGNNUMBER_M_FLAGS , ForeignNumberBuiltins .SLOTS ),
306
+ ForeignBoolean ("ForeignBoolean" , J_POLYGLOT , ForeignNumber , Flags .PUBLIC_BASE_WDICT , FOREIGNNUMBER_M_FLAGS , ForeignBooleanBuiltins .SLOTS ),
307
+ ForeignAbstractClass ("ForeignAbstractClass" , J_POLYGLOT , ForeignObject , Flags .PUBLIC_BASE_WDICT ),
308
308
309
309
// bz2
310
310
BZ2Compressor ("BZ2Compressor" , "_bz2" ),
@@ -628,6 +628,11 @@ private static class Flags {
628
628
this (name , module , module , flags );
629
629
}
630
630
631
+ PythonBuiltinClassType (String name , String module , PythonBuiltinClassType base , Flags flags ) {
632
+ this (name , module , module , flags );
633
+ this .base = base ;
634
+ }
635
+
631
636
PythonBuiltinClassType (String name , String module , Flags flags , TpSlots slots ) {
632
637
this (name , module , module , flags , DEFAULT_M_FLAGS , slots );
633
638
}
@@ -640,6 +645,11 @@ private static class Flags {
640
645
this (name , module , module , flags , methodsFlags , slots );
641
646
}
642
647
648
+ PythonBuiltinClassType (String name , String module , PythonBuiltinClassType base , Flags flags , long methodsFlags , TpSlots slots ) {
649
+ this (name , module , module , flags , methodsFlags , slots );
650
+ this .base = base ;
651
+ }
652
+
643
653
PythonBuiltinClassType (String name , String publishInModule , String moduleName , Flags flags ) {
644
654
this (name , publishInModule , moduleName , flags , DEFAULT_M_FLAGS , TpSlots .createEmpty ());
645
655
}
@@ -838,10 +848,6 @@ public final Shape getInstanceShape(PythonLanguage lang) {
838
848
839
849
Boolean .base = PInt ;
840
850
841
- ForeignNumber .base = ForeignObject ;
842
- ForeignBoolean .base = ForeignNumber ;
843
- ForeignAbstractClass .base = ForeignObject ;
844
-
845
851
PBaseExceptionGroup .base = PBaseException ;
846
852
SystemExit .base = PBaseException ;
847
853
KeyboardInterrupt .base = PBaseException ;
0 commit comments