mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-134584: Eliminate redundant refcounting from _CALL_TYPE_1 (GH-135818)
This commit is contained in:
parent
c8b80f5e23
commit
25c294b6ea
11 changed files with 1047 additions and 819 deletions
11
Python/generated_cases.c.h
generated
11
Python/generated_cases.c.h
generated
|
|
@ -4144,6 +4144,8 @@
|
|||
_PyStackRef callable;
|
||||
_PyStackRef arg;
|
||||
_PyStackRef res;
|
||||
_PyStackRef a;
|
||||
_PyStackRef value;
|
||||
/* Skip 1 cache entry */
|
||||
/* Skip 2 cache entries */
|
||||
// _GUARD_NOS_NULL
|
||||
|
|
@ -4170,15 +4172,18 @@
|
|||
arg = stack_pointer[-1];
|
||||
PyObject *arg_o = PyStackRef_AsPyObjectBorrow(arg);
|
||||
assert(oparg == 1);
|
||||
(void)callable;
|
||||
(void)null;
|
||||
STAT_INC(CALL, hit);
|
||||
a = arg;
|
||||
res = PyStackRef_FromPyObjectNew(Py_TYPE(arg_o));
|
||||
}
|
||||
// _POP_TOP
|
||||
{
|
||||
value = a;
|
||||
stack_pointer[-3] = res;
|
||||
stack_pointer += -2;
|
||||
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
|
||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
PyStackRef_CLOSE(arg);
|
||||
PyStackRef_XCLOSE(value);
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
}
|
||||
DISPATCH();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue