mirror of
https://github.com/python/cpython.git
synced 2026-01-01 04:53:46 +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
|
|
@ -951,7 +951,7 @@ dummy_func(void) {
|
|||
}
|
||||
}
|
||||
|
||||
op(_CALL_STR_1, (unused, unused, arg -- res)) {
|
||||
op(_CALL_STR_1, (unused, unused, arg -- res, a)) {
|
||||
if (sym_matches_type(arg, &PyUnicode_Type)) {
|
||||
// e.g. str('foo') or str(foo) where foo is known to be a string
|
||||
// Note: we must strip the reference information because it goes
|
||||
|
|
@ -961,6 +961,7 @@ dummy_func(void) {
|
|||
else {
|
||||
res = sym_new_type(ctx, &PyUnicode_Type);
|
||||
}
|
||||
a = arg;
|
||||
}
|
||||
|
||||
op(_CALL_ISINSTANCE, (unused, unused, instance, cls -- res)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue