GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-122390: Replace `_Py_GetbaseOpcode` with `_Py_GetBaseCodeUnit` by markshannon · Pull Request #122942 · python/cpython

Conversation

@markshannon

@markshannon markshannon commented Aug 12, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.
  • Issue: Improve internal API for fetching original instruction, replacing _Py_GetBaseOpcode #122390

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
markshannon added 2 commits August 12, 2024 16:14
@markshannon
Replace _Py_GetbaseOpcode with _Py_GetBaseCodeUnit, and simplify some…
df033e4
… uses.
@markshannon
Fix up test_dis
604c79a
@markshannon
markshannon requested a review from ericsnowcurrently as a code owner August 12, 2024 15:26
@bedevere-app bedevere-app Bot mentioned this pull request Aug 12, 2024
Improve internal API for fetching original instruction, replacing _Py_GetBaseOpcode #122390
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Aug 12, 2024
@markshannon markshannon added the skip news label Aug 12, 2024
markshannon added 2 commits August 13, 2024 08:48
@markshannon
Modify magic number to ease merge conflict
0f507df
@markshannon
Merge branch 'main' into get-base-instruction
2ac1cdb
iritkatriel
iritkatriel reviewed Aug 13, 2024
View reviewed changes
Comment thread Objects/codeobject.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@markshannon
Generate MIN_SPECIALIZED_OPCODE and use it in asserts
3ef3cff
iritkatriel
iritkatriel approved these changes Aug 13, 2024
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Aug 13, 2024
@markshannon

markshannon commented Aug 13, 2024

Copy link
Copy Markdown
Member Author

Failures on emulated JIT builds are a known issue.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon
markshannon merged commit 7a65439 into python:main Aug 13, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Aug 13, 2024
@markshannon
markshannon deleted the get-base-instruction branch August 14, 2024 10:04
@AA-Turner AA-Turner mentioned this pull request Aug 14, 2024
[3.13] GH-109975: Copyedit 3.13 What's New: Release Highlights (GH-122958) #122971
Merged
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
@markshannon @blhsing
pythonGH-122390: Replace _Py_GetbaseOpcode with `_Py_GetBaseCodeUni…
03a8301
…t` (pythonGH-122942)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iritkatriel iritkatriel iritkatriel approved these changes
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@markshannon @iritkatriel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.