mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
gh-134584: Eliminate redundant refcounting from _CALL_STR_1 (GH-136070)
Signed-off-by: Manjusaka <me@manjusaka.me>
This commit is contained in:
parent
d3ef5ba34d
commit
a154c9ed4e
10 changed files with 58 additions and 43 deletions
7
Python/optimizer_cases.c.h
generated
7
Python/optimizer_cases.c.h
generated
|
|
@ -2855,6 +2855,7 @@
|
|||
case _CALL_STR_1: {
|
||||
JitOptRef arg;
|
||||
JitOptRef res;
|
||||
JitOptRef a;
|
||||
arg = stack_pointer[-1];
|
||||
if (sym_matches_type(arg, &PyUnicode_Type)) {
|
||||
res = PyJitRef_StripReferenceInfo(arg);
|
||||
|
|
@ -2862,9 +2863,11 @@
|
|||
else {
|
||||
res = sym_new_type(ctx, &PyUnicode_Type);
|
||||
}
|
||||
CHECK_STACK_BOUNDS(-2);
|
||||
a = arg;
|
||||
CHECK_STACK_BOUNDS(-1);
|
||||
stack_pointer[-3] = res;
|
||||
stack_pointer += -2;
|
||||
stack_pointer[-2] = a;
|
||||
stack_pointer += -1;
|
||||
ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue