Skip to content

Commit 2e98549

Browse files
committed
Clean up old slots for nb unary ops
1 parent 0b3a4ba commit 2e98549

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/SlotMethodDef.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyAsyncMethods__am_aiter;
4444
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyAsyncMethods__am_anext;
4545
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyAsyncMethods__am_await;
46-
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_absolute;
47-
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_floor_divide;
4846
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_inplace_add;
4947
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_inplace_and;
5048
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_inplace_floor_divide;
@@ -57,9 +55,6 @@
5755
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_inplace_subtract;
5856
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_inplace_true_divide;
5957
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_inplace_xor;
60-
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_invert;
61-
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_negative;
62-
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_positive;
6358
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyNumberMethods__nb_power;
6459
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyTypeObject__tp_as_number;
6560
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyTypeObject__tp_call;
@@ -70,12 +65,10 @@
7065
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyTypeObject__tp_repr;
7166
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyTypeObject__tp_richcompare;
7267
import static com.oracle.graal.python.builtins.objects.cext.structs.CFields.PyTypeObject__tp_str;
73-
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___ABS__;
7468
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___AITER__;
7569
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___ANEXT__;
7670
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___AWAIT__;
7771
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___CALL__;
78-
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___FLOORDIV__;
7972
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___HASH__;
8073
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___IADD__;
8174
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___IAND__;
@@ -84,17 +77,14 @@
8477
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___IMOD__;
8578
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___IMUL__;
8679
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___INIT__;
87-
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___INVERT__;
8880
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___IOR__;
8981
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___IPOW__;
9082
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___IRSHIFT__;
9183
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___ISUB__;
9284
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___ITER__;
9385
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___ITRUEDIV__;
9486
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___IXOR__;
95-
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___NEG__;
9687
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___NEXT__;
97-
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___POS__;
9888
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___POW__;
9989
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___REPR__;
10090
import static com.oracle.graal.python.nodes.SpecialMethodNames.T___STR__;
@@ -128,8 +118,6 @@ public enum SlotMethodDef {
128118
// (mq) AM_SEND is an internal function and mostly called from within AWAIT, AITER, ANEXT.
129119
/*- AM_SEND(PyAsyncMethods__am_send, ASYNC_AM_SEND, TernaryFunctionWrapper::new, MethodsFlags.AM_SEND), */
130120

131-
NB_ABSOLUTE(PyNumberMethods__nb_absolute, T___ABS__, UnaryFuncLegacyWrapper::new, MethodsFlags.NB_ABSOLUTE),
132-
NB_FLOOR_DIVIDE(PyNumberMethods__nb_floor_divide, T___FLOORDIV__, BinaryFuncWrapper::new, MethodsFlags.NB_FLOOR_DIVIDE),
133121
NB_INPLACE_ADD(PyNumberMethods__nb_inplace_add, T___IADD__, BinaryFuncWrapper::new, MethodsFlags.NB_INPLACE_ADD),
134122
NB_INPLACE_AND(PyNumberMethods__nb_inplace_and, T___IAND__, BinaryFuncWrapper::new, MethodsFlags.NB_INPLACE_AND),
135123
NB_INPLACE_FLOOR_DIVIDE(PyNumberMethods__nb_inplace_floor_divide, T___IFLOORDIV__, BinaryFuncWrapper::new, MethodsFlags.NB_INPLACE_FLOOR_DIVIDE),
@@ -142,9 +130,6 @@ public enum SlotMethodDef {
142130
NB_INPLACE_SUBTRACT(PyNumberMethods__nb_inplace_subtract, T___ISUB__, BinaryFuncWrapper::new, MethodsFlags.NB_INPLACE_SUBTRACT),
143131
NB_INPLACE_TRUE_DIVIDE(PyNumberMethods__nb_inplace_true_divide, T___ITRUEDIV__, BinaryFuncWrapper::new, MethodsFlags.NB_INPLACE_TRUE_DIVIDE),
144132
NB_INPLACE_XOR(PyNumberMethods__nb_inplace_xor, T___IXOR__, BinaryFuncWrapper::new, MethodsFlags.NB_INPLACE_XOR),
145-
NB_INVERT(PyNumberMethods__nb_invert, T___INVERT__, UnaryFuncLegacyWrapper::new, MethodsFlags.NB_INVERT),
146-
NB_NEGATIVE(PyNumberMethods__nb_negative, T___NEG__, UnaryFuncLegacyWrapper::new, MethodsFlags.NB_NEGATIVE),
147-
NB_POSITIVE(PyNumberMethods__nb_positive, T___POS__, UnaryFuncLegacyWrapper::new, MethodsFlags.NB_POSITIVE),
148133
NB_POWER(PyNumberMethods__nb_power, T___POW__, TernaryFunctionWrapper::new, MethodsFlags.NB_POWER);
149134

150135
public final TruffleString methodName;
@@ -178,7 +163,6 @@ public enum SlotMethodDef {
178163
static {
179164
initGroup(
180165
PyTypeObject__tp_as_number,
181-
NB_ABSOLUTE,
182166
NB_INPLACE_ADD,
183167
NB_INPLACE_AND,
184168
NB_INPLACE_FLOOR_DIVIDE,
@@ -191,9 +175,6 @@ public enum SlotMethodDef {
191175
NB_INPLACE_SUBTRACT,
192176
NB_INPLACE_TRUE_DIVIDE,
193177
NB_INPLACE_XOR,
194-
NB_INVERT,
195-
NB_NEGATIVE,
196-
NB_POSITIVE,
197178
NB_POWER);
198179
}
199180

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/ToNativeTypeNode.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ private static Object allocatePyNumberMethods(PythonManagedClass obj, TpSlots sl
150150

151151
writeGroupSlots(CFields.PyTypeObject__tp_as_number, slots, writePointerNode, mem, nullValue);
152152

153-
writePointerNode.write(mem, CFields.PyNumberMethods__nb_absolute, getSlot(obj, SlotMethodDef.NB_ABSOLUTE));
154153
writePointerNode.write(mem, CFields.PyNumberMethods__nb_inplace_add, getSlot(obj, SlotMethodDef.NB_INPLACE_ADD));
155154
writePointerNode.write(mem, CFields.PyNumberMethods__nb_inplace_and, getSlot(obj, SlotMethodDef.NB_INPLACE_AND));
156155
writePointerNode.write(mem, CFields.PyNumberMethods__nb_inplace_floor_divide, getSlot(obj, SlotMethodDef.NB_INPLACE_FLOOR_DIVIDE));
@@ -164,9 +163,6 @@ private static Object allocatePyNumberMethods(PythonManagedClass obj, TpSlots sl
164163
writePointerNode.write(mem, CFields.PyNumberMethods__nb_inplace_subtract, getSlot(obj, SlotMethodDef.NB_INPLACE_SUBTRACT));
165164
writePointerNode.write(mem, CFields.PyNumberMethods__nb_inplace_true_divide, getSlot(obj, SlotMethodDef.NB_INPLACE_TRUE_DIVIDE));
166165
writePointerNode.write(mem, CFields.PyNumberMethods__nb_inplace_xor, getSlot(obj, SlotMethodDef.NB_INPLACE_XOR));
167-
writePointerNode.write(mem, CFields.PyNumberMethods__nb_invert, getSlot(obj, SlotMethodDef.NB_INVERT));
168-
writePointerNode.write(mem, CFields.PyNumberMethods__nb_negative, getSlot(obj, SlotMethodDef.NB_NEGATIVE));
169-
writePointerNode.write(mem, CFields.PyNumberMethods__nb_positive, getSlot(obj, SlotMethodDef.NB_POSITIVE));
170166
writePointerNode.write(mem, CFields.PyNumberMethods__nb_power, getSlot(obj, SlotMethodDef.NB_POWER));
171167
return mem;
172168
}

0 commit comments

Comments
 (0)