Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

GH-122390: Replace _Py_GetbaseOpcode with _Py_GetBaseCodeUnit#122942

Merged
markshannon merged 5 commits into
python:mainpython/cpython:mainfrom
faster-cpython:get-base-instructionfaster-cpython/cpython:get-base-instructionCopy head branch name to clipboard
Aug 13, 2024
Merged

GH-122390: Replace _Py_GetbaseOpcode with _Py_GetBaseCodeUnit#122942
markshannon merged 5 commits into
python:mainpython/cpython:mainfrom
faster-cpython:get-base-instructionfaster-cpython/cpython:get-base-instructionCopy head branch name to clipboard

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 Outdated
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.