mirror of
https://github.com/python/cpython.git
synced 2025-12-31 12:33:28 +00:00
gh-134584: Eliminate redundant refcounting from _BINARY_OP_SUBSCR_TUPLE_INT (GH-143094)
This commit is contained in:
parent
cbe0cb779a
commit
cc48bf0fde
9 changed files with 65 additions and 34 deletions
|
|
@ -335,7 +335,7 @@ dummy_func(void) {
|
|||
i = sub_st;
|
||||
}
|
||||
|
||||
op(_BINARY_OP_SUBSCR_TUPLE_INT, (tuple_st, sub_st -- res)) {
|
||||
op(_BINARY_OP_SUBSCR_TUPLE_INT, (tuple_st, sub_st -- res, ts, ss)) {
|
||||
assert(sym_matches_type(tuple_st, &PyTuple_Type));
|
||||
if (sym_is_const(ctx, sub_st)) {
|
||||
assert(PyLong_CheckExact(sym_get_const(ctx, sub_st)));
|
||||
|
|
@ -354,6 +354,8 @@ dummy_func(void) {
|
|||
else {
|
||||
res = sym_new_not_null(ctx);
|
||||
}
|
||||
ts = tuple_st;
|
||||
ss = sub_st;
|
||||
}
|
||||
|
||||
op(_TO_BOOL, (value -- res)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue