mirror of
https://github.com/python/cpython.git
synced 2026-01-03 14:02:21 +00:00
gh-134584: Eliminate redundant refcounting from _CALL_TUPLE_1 (GH-135860)
This commit is contained in:
parent
44d3dc6491
commit
a78f43b001
11 changed files with 71 additions and 41 deletions
|
|
@ -1097,7 +1097,7 @@ dummy_func(void) {
|
|||
}
|
||||
}
|
||||
|
||||
op(_CALL_TUPLE_1, (callable, null, arg -- res)) {
|
||||
op(_CALL_TUPLE_1, (callable, null, arg -- res, a)) {
|
||||
if (sym_matches_type(arg, &PyTuple_Type)) {
|
||||
// e.g. tuple((1, 2)) or tuple(foo) where foo is known to be a tuple
|
||||
// Note: we must strip the reference information because it goes
|
||||
|
|
@ -1107,6 +1107,7 @@ dummy_func(void) {
|
|||
else {
|
||||
res = sym_new_type(ctx, &PyTuple_Type);
|
||||
}
|
||||
a = arg;
|
||||
}
|
||||
|
||||
op(_GUARD_TOS_LIST, (tos -- tos)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue