gh-144005: Eliminate redundant refcounting in the JIT for BINARY_OP_EXTEND (#144006)

This commit is contained in:
AN Long 2026-01-24 02:19:01 +09:00 committed by GitHub
parent 70e67f579e
commit 2f42f83344
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 109 additions and 53 deletions

View file

@ -311,6 +311,12 @@ dummy_func(void) {
r = right;
}
op(_BINARY_OP_EXTEND, (left, right -- res, l, r)) {
res = sym_new_not_null(ctx);
l = left;
r = right;
}
op(_BINARY_OP_INPLACE_ADD_UNICODE, (left, right -- res)) {
if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyUnicode_CheckExact(sym_get_const(ctx, left)));