// - If getitem is NULL, then getitem_version is meaningless.
// - If getitem->func_version == getitem_version, then getitem can be called
// with two positional arguments and no keyword arguments, and has neither
- // *args nor **kwargs (as required by BINARY_SUBSCR_GETITEM):
+ // *args nor **kwargs (as required by BINARY_OP_SUBSCR_GETITEM):
PyObject *getitem;
uint32_t getitem_version;
PyObject *init;
The `return_offset` field determines where a `RETURN` should go in the caller,
relative to `instr_ptr`. It is only meaningful to the callee, so it needs to
be set in any instruction that implements a call (to a Python function),
-including CALL, SEND and BINARY_SUBSCR_GETITEM, among others. If there is no
+including CALL, SEND and BINARY_OP_SUBSCR_GETITEM, among others. If there is no
callee, then return_offset is meaningless. It is necessary to have a separate
field for the return offset because (1) if we apply this offset to `instr_ptr`
while executing the `RETURN`, this is too early and would lose us information
binary_subscr_list_int()
self.assert_specialized(binary_subscr_list_int,
"BINARY_OP_SUBSCR_LIST_INT")
- self.assert_no_opcode(binary_subscr_list_int, "BINARY_SUBSCR")
+ self.assert_no_opcode(binary_subscr_list_int, "BINARY_OP")
def binary_subscr_tuple_int():
for _ in range(_testinternalcapi.SPECIALIZATION_THRESHOLD):
binary_subscr_tuple_int()
self.assert_specialized(binary_subscr_tuple_int,
"BINARY_OP_SUBSCR_TUPLE_INT")
- self.assert_no_opcode(binary_subscr_tuple_int, "BINARY_SUBSCR")
+ self.assert_no_opcode(binary_subscr_tuple_int, "BINARY_OP")
def binary_subscr_dict():
for _ in range(_testinternalcapi.SPECIALIZATION_THRESHOLD):
binary_subscr_str_int()
self.assert_specialized(binary_subscr_str_int, "BINARY_OP_SUBSCR_STR_INT")
- self.assert_no_opcode(binary_subscr_str_int, "BINARY_SUBSCR")
+ self.assert_no_opcode(binary_subscr_str_int, "BINARY_OP")
def binary_subscr_getitems():
class C:
binary_subscr_getitems()
self.assert_specialized(binary_subscr_getitems, "BINARY_OP_SUBSCR_GETITEM")
- self.assert_no_opcode(binary_subscr_getitems, "BINARY_SUBSCR")
+ self.assert_no_opcode(binary_subscr_getitems, "BINARY_OP")
@cpython_only
@requires_specialization_ft