mirror of
https://github.com/python/cpython.git
synced 2026-01-03 14:02:21 +00:00
gh-134584: Remove redundant refcount from _BINARY_OP_ADD_UNICODE (gh-142825)
This commit is contained in:
parent
fc80096a07
commit
71a7cb8887
9 changed files with 859 additions and 831 deletions
|
|
@ -298,12 +298,14 @@ dummy_func(void) {
|
|||
r = right;
|
||||
}
|
||||
|
||||
op(_BINARY_OP_ADD_UNICODE, (left, right -- res)) {
|
||||
op(_BINARY_OP_ADD_UNICODE, (left, right -- res, l, r)) {
|
||||
REPLACE_OPCODE_IF_EVALUATES_PURE(left, right);
|
||||
res = sym_new_type(ctx, &PyUnicode_Type);
|
||||
l = left;
|
||||
r = right;
|
||||
}
|
||||
|
||||
op(_BINARY_OP_INPLACE_ADD_UNICODE, (left, right -- )) {
|
||||
op(_BINARY_OP_INPLACE_ADD_UNICODE, (left, right --)) {
|
||||
JitOptRef res;
|
||||
if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
|
||||
assert(PyUnicode_CheckExact(sym_get_const(ctx, left)));
|
||||
|
|
@ -563,6 +565,12 @@ dummy_func(void) {
|
|||
}
|
||||
}
|
||||
|
||||
op(_POP_TOP_UNICODE, (value --)) {
|
||||
if (PyJitRef_IsBorrowed(value)) {
|
||||
REPLACE_OP(this_instr, _POP_TOP_NOP, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
op(_COPY, (bottom, unused[oparg-1] -- bottom, unused[oparg-1], top)) {
|
||||
assert(oparg > 0);
|
||||
top = bottom;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue