GH-100923: Embed jump mask in COMPARE_OP oparg (GH-100924)

This commit is contained in:
Mark Shannon 2023-01-11 20:40:43 +00:00 committed by GitHub
parent 61f12b8ff7
commit 6e4e14d98f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 200 additions and 177 deletions

View file

@ -2887,7 +2887,9 @@ static int compiler_addcompare(struct compiler *c, location loc,
default:
Py_UNREACHABLE();
}
ADDOP_I(c, loc, COMPARE_OP, cmp);
/* cmp goes in top bits of the oparg, while the low bits are used by quickened
* versions of this opcode to store the comparison mask. */
ADDOP_I(c, loc, COMPARE_OP, cmp << 4);
return SUCCESS;
}