gh-134584: Eliminate redundant refcounting from _COMPARE_OP_X (GH-143186)

This commit is contained in:
Hai Zhu 2025-12-27 00:12:28 +08:00 committed by GitHub
parent d3d4cf9432
commit b3f2d80569
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 775 additions and 788 deletions

View file

@ -466,14 +466,16 @@ dummy_func(void) {
r = right;
}
op(_COMPARE_OP_FLOAT, (left, right -- res)) {
REPLACE_OPCODE_IF_EVALUATES_PURE(left, right);
op(_COMPARE_OP_FLOAT, (left, right -- res, l, r)) {
res = sym_new_type(ctx, &PyBool_Type);
l = left;
r = right;
}
op(_COMPARE_OP_STR, (left, right -- res)) {
REPLACE_OPCODE_IF_EVALUATES_PURE(left, right);
op(_COMPARE_OP_STR, (left, right -- res, l, r)) {
res = sym_new_type(ctx, &PyBool_Type);
l = left;
r = right;
}
op(_IS_OP, (left, right -- b)) {