From 6e4e14d98fe0868981f29701496d57a8223c5407 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Wed, 11 Jan 2023 20:40:43 +0000 Subject: GH-100923: Embed jump mask in `COMPARE_OP` oparg (GH-100924) --- Python/compile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 943168ba693..c0177fbf3e3 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -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; } -- cgit v1.2.3