gh-144007: Eliminate redundant refcounting in the JIT for BINARY_OP (GH-144011)

This commit is contained in:
AN Long
2026-01-24 18:35:32 +09:00
committed by GitHub
parent 29f1e778fa
commit 4e10fa993a
11 changed files with 105 additions and 48 deletions
+3 -1
View File
@@ -211,7 +211,9 @@ dummy_func(void) {
sym_set_type(left, &PyFloat_Type);
}
op(_BINARY_OP, (lhs, rhs -- res)) {
op(_BINARY_OP, (lhs, rhs -- res, l, r)) {
l = lhs;
r = rhs;
REPLACE_OPCODE_IF_EVALUATES_PURE(lhs, rhs, res);
bool lhs_int = sym_matches_type(lhs, &PyLong_Type);
bool rhs_int = sym_matches_type(rhs, &PyLong_Type);