@@ -58,7 +58,9 @@ static String getSlotBaseClass(Slot s) {
58
58
case sq_concat -> "TpSlotBinaryFunc.TpSlotSqConcat" ;
59
59
case sq_length , mp_length -> "TpSlotLen.TpSlotLenBuiltin" + getSuffix (s .isComplex ());
60
60
case sq_item , sq_repeat -> "TpSlotSizeArgFun.TpSlotSizeArgFunBuiltin" ;
61
+ case sq_ass_item -> "TpSlotSqAssItem.TpSlotSqAssItemBuiltin" ;
61
62
case mp_subscript -> "TpSlotBinaryFunc.TpSlotMpSubscript" ;
63
+ case mp_ass_subscript -> "TpSlotMpAssSubscript.TpSlotMpAssSubscriptBuiltin" ;
62
64
case tp_getattro -> "TpSlotGetAttr.TpSlotGetAttrBuiltin" ;
63
65
case tp_descr_get -> "TpSlotDescrGet.TpSlotDescrGetBuiltin" + getSuffix (s .isComplex ());
64
66
case tp_descr_set -> "TpSlotDescrSet.TpSlotDescrSetBuiltin" ;
@@ -76,8 +78,10 @@ static String getSlotNodeBaseClass(Slot s) {
76
78
case sq_concat -> "com.oracle.graal.python.builtins.objects.type.slots.TpSlotBinaryFunc.SqConcatBuiltinNode" ;
77
79
case sq_length , mp_length -> "com.oracle.graal.python.builtins.objects.type.slots.TpSlotLen.LenBuiltinNode" ;
78
80
case sq_item -> "com.oracle.graal.python.builtins.objects.type.slots.TpSlotSizeArgFun.SqItemBuiltinNode" ;
81
+ case sq_ass_item -> "com.oracle.graal.python.builtins.objects.type.slots.TpSlotSqAssItem.SqAssItemBuiltinNode" ;
79
82
case sq_repeat -> "com.oracle.graal.python.builtins.objects.type.slots.TpSlotSizeArgFun.SqRepeatBuiltinNode" ;
80
83
case mp_subscript -> "com.oracle.graal.python.builtins.objects.type.slots.TpSlotBinaryFunc.MpSubscriptBuiltinNode" ;
84
+ case mp_ass_subscript -> "com.oracle.graal.python.builtins.objects.type.slots.TpSlotMpAssSubscript.MpAssSubscriptBuiltinNode" ;
81
85
case tp_getattro -> "com.oracle.graal.python.builtins.objects.type.slots.TpSlotGetAttr.GetAttrBuiltinNode" ;
82
86
case tp_descr_set -> "com.oracle.graal.python.builtins.objects.type.slots.TpSlotDescrSet.DescrSetBuiltinNode" ;
83
87
case tp_setattro -> "com.oracle.graal.python.builtins.objects.type.slots.TpSlotSetAttr.SetAttrBuiltinNode" ;
@@ -89,31 +93,21 @@ static String getUncachedExecuteSignature(SlotKind s) {
89
93
case nb_bool -> "boolean executeUncached(Object self)" ;
90
94
case tp_descr_get -> "Object executeUncached(Object self, Object obj, Object type)" ;
91
95
case sq_length , mp_length -> "int executeUncached(Object self)" ;
92
- case tp_getattro , tp_descr_set , tp_setattro , sq_item , mp_subscript , sq_concat , sq_repeat ,
93
- nb_add , nb_subtract , nb_multiply , nb_remainder , nb_divmod , nb_lshift , nb_rshift ,
94
- nb_and , nb_xor , nb_or , nb_floor_divide , nb_true_divide , nb_matrix_multiply ->
95
- throw new AssertionError ("Should not reach here: should be always complex" );
96
+ default -> throw new AssertionError ("Should not reach here: should be always complex" );
96
97
};
97
98
}
98
99
99
100
static boolean supportsComplex (SlotKind s ) {
100
101
return switch (s ) {
101
102
case nb_bool -> false ;
102
- case sq_length , mp_length , tp_getattro , tp_descr_get , tp_descr_set ,
103
- tp_setattro , sq_item , mp_subscript , sq_concat , sq_repeat ,
104
- nb_add , nb_subtract , nb_multiply , nb_remainder , nb_divmod , nb_lshift , nb_rshift ,
105
- nb_and , nb_xor , nb_or , nb_floor_divide , nb_true_divide , nb_matrix_multiply ->
106
- true ;
103
+ default -> true ;
107
104
};
108
105
}
109
106
110
107
static boolean supportsSimple (SlotKind s ) {
111
108
return switch (s ) {
112
109
case nb_bool , sq_length , mp_length , tp_descr_get -> true ;
113
- case tp_getattro , tp_descr_set , tp_setattro , sq_item , mp_subscript , sq_concat , sq_repeat ,
114
- nb_add , nb_subtract , nb_multiply , nb_remainder , nb_divmod , nb_lshift , nb_rshift ,
115
- nb_and , nb_xor , nb_or , nb_floor_divide , nb_true_divide , nb_matrix_multiply ->
116
- false ;
110
+ default -> false ;
117
111
};
118
112
}
119
113
@@ -122,10 +116,7 @@ static String getUncachedExecuteCall(SlotKind s) {
122
116
case nb_bool -> "executeBool(null, self)" ;
123
117
case sq_length , mp_length -> "executeInt(null, self)" ;
124
118
case tp_descr_get -> "execute(null, self, obj, type)" ;
125
- case tp_getattro , tp_descr_set , tp_setattro , sq_item , mp_subscript , sq_concat , sq_repeat ,
126
- nb_add , nb_subtract , nb_multiply , nb_remainder , nb_divmod , nb_lshift , nb_rshift ,
127
- nb_and , nb_xor , nb_or , nb_floor_divide , nb_true_divide , nb_matrix_multiply ->
128
- throw new AssertionError ("Should not reach here: should be always complex" );
119
+ default -> throw new AssertionError ("Should not reach here: should be always complex" );
129
120
};
130
121
}
131
122
0 commit comments