mirror of
https://github.com/python/cpython.git
synced 2026-01-08 08:22:41 +00:00
gh-134584: Eliminate redundant refcounting from `_CALL_LEN` (gh-136104)
This commit is contained in:
parent
c433986005
commit
a27538540e
9 changed files with 54 additions and 41 deletions
|
|
@ -1202,7 +1202,7 @@ dummy_func(void) {
|
|||
sym_set_const(callable, (PyObject *)&PyUnicode_Type);
|
||||
}
|
||||
|
||||
op(_CALL_LEN, (callable, null, arg -- res)) {
|
||||
op(_CALL_LEN, (callable, null, arg -- res, a, c)) {
|
||||
res = sym_new_type(ctx, &PyLong_Type);
|
||||
Py_ssize_t tuple_length = sym_tuple_length(arg);
|
||||
if (tuple_length >= 0) {
|
||||
|
|
@ -1217,6 +1217,8 @@ dummy_func(void) {
|
|||
res = sym_new_const(ctx, temp);
|
||||
Py_DECREF(temp);
|
||||
}
|
||||
a = arg;
|
||||
c = callable;
|
||||
}
|
||||
|
||||
op(_GET_LEN, (obj -- obj, len)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue