]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-106529: Generate uops for POP_JUMP_IF_[NOT_]NONE (#106796)
authorGuido van Rossum <guido@python.org>
Mon, 17 Jul 2023 17:06:05 +0000 (10:06 -0700)
committerGitHub <noreply@github.com>
Mon, 17 Jul 2023 17:06:05 +0000 (10:06 -0700)
commitb2b261ab2a2d4ff000c6248dbc52247c78cfa5ab
tree51ba72743630d842113cc1de9a073ab407e699e6
parentad95c7253a70e559e7d3f25d53f4772f28bb8b44
gh-106529: Generate uops for POP_JUMP_IF_[NOT_]NONE (#106796)

These aren't automatically translated because (ironically)
they are macros deferring to POP_JUMP_IF_{TRUE,FALSE},
which are not viable uops (being manually translated).

The hack is that we emit IS_NONE and then set opcode and
jump to the POP_JUMP_IF_{TRUE,FALSE} translation code.
Lib/test/test_capi/test_misc.py
Python/optimizer.c