gh-100239: replace BINARY_SUBSCR & family by BINARY_OP with oparg NB_SUBSCR (#129700)

This commit is contained in:
Irit Katriel 2025-02-07 22:39:54 +00:00 committed by GitHub
parent 2248a9c153
commit a1417b211f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 1281 additions and 1447 deletions

View file

@ -575,15 +575,6 @@
break;
}
case _BINARY_SUBSCR: {
JitOptSymbol *res;
res = sym_new_not_null(ctx);
stack_pointer[-2] = res;
stack_pointer += -1;
assert(WITHIN_STACK_BOUNDS());
break;
}
case _BINARY_SLICE: {
JitOptSymbol *res;
res = sym_new_not_null(ctx);
@ -599,7 +590,7 @@
break;
}
case _BINARY_SUBSCR_LIST_INT: {
case _BINARY_OP_SUBSCR_LIST_INT: {
JitOptSymbol *res;
res = sym_new_not_null(ctx);
stack_pointer[-2] = res;
@ -608,7 +599,7 @@
break;
}
case _BINARY_SUBSCR_STR_INT: {
case _BINARY_OP_SUBSCR_STR_INT: {
JitOptSymbol *res;
res = sym_new_not_null(ctx);
stack_pointer[-2] = res;
@ -617,7 +608,7 @@
break;
}
case _BINARY_SUBSCR_TUPLE_INT: {
case _BINARY_OP_SUBSCR_TUPLE_INT: {
JitOptSymbol *res;
res = sym_new_not_null(ctx);
stack_pointer[-2] = res;
@ -626,7 +617,7 @@
break;
}
case _BINARY_SUBSCR_DICT: {
case _BINARY_OP_SUBSCR_DICT: {
JitOptSymbol *res;
res = sym_new_not_null(ctx);
stack_pointer[-2] = res;
@ -635,7 +626,7 @@
break;
}
case _BINARY_SUBSCR_CHECK_FUNC: {
case _BINARY_OP_SUBSCR_CHECK_FUNC: {
JitOptSymbol *getitem;
getitem = sym_new_not_null(ctx);
stack_pointer[0] = getitem;
@ -644,7 +635,7 @@
break;
}
case _BINARY_SUBSCR_INIT_CALL: {
case _BINARY_OP_SUBSCR_INIT_CALL: {
_Py_UOpsAbstractFrame *new_frame;
new_frame = NULL;
ctx->done = true;