Skip to content

GH-122390: Replace _Py_GetbaseOpcode with _Py_GetBaseCodeUnit - #122942

Merged
markshannon merged 5 commits into
python:mainfrom
faster-cpython:get-base-instruction
Aug 13, 2024
Merged

markshannon merged 5 commits into
python:mainfrom
faster-cpython:get-base-instruction

Conversation

@markshannon

@markshannon markshannon commented Aug 12, 2024 •

Copy link
Copy Markdown
Member

This PR:

  • Ensures we account for ENTER_EXECUTOR and instrumentation whenever we need to fetch the underlying instruction.
  • Moves ENTER_EXECUTOR to opcode 255, to keep the common path fast in _Py_GetBaseCodeUnit.
  • Does a bit of tidying up around calls to _Py_GetBaseCodeUnit as we don't need the additional checks any more.
Comment thread Objects/codeobject.c Resolved
@markshannon

Copy link
Copy Markdown
Member Author

Failures on emulated JIT builds are a known issue.

@markshannon
markshannon merged commit 7a65439 into python:main Aug 13, 2024
@markshannon
markshannon deleted the get-base-instruction branch August 14, 2024 10:04
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants