gh-134584: Eliminate redundant refcounting from `_CALL_LEN` (gh-136104)

This commit is contained in:
Donghee Na 2025-12-12 00:24:34 +09:00 committed by GitHub
parent c433986005
commit a27538540e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 54 additions and 41 deletions

View file

@ -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)) {