]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-106529: Implement POP_JUMP_IF_XXX uops (#106551)
authorGuido van Rossum <guido@python.org>
Mon, 10 Jul 2023 23:04:26 +0000 (16:04 -0700)
committerGitHub <noreply@github.com>
Mon, 10 Jul 2023 23:04:26 +0000 (16:04 -0700)
commit22988c323ad621b9f47b6cb640b80ac806e26368
tree3df379493e053e266519e718d1c6d7829bea11ad
parent18dfbd035775c15533d13a98e56b1d2bf5c65f00
gh-106529: Implement POP_JUMP_IF_XXX uops (#106551)

- Hand-written uops JUMP_IF_{TRUE,FALSE}.
  These peek at the top of the stack.
  The jump target (in superblock space) is absolute.

- Hand-written translation for POP_JUMP_IF_{TRUE,FALSE},
  assuming the jump is unlikely.
  Once we implement jump-likelihood profiling,
  we can implement the jump-unlikely case (in another PR).

- Tests (including some test cleanup).

- Improvements to len(ex) and ex[i] to expose the whole trace.
Lib/test/test_capi/test_misc.py
Python/ceval.c
Python/opcode_metadata.h
Python/optimizer.c
Tools/cases_generator/generate_cases.py