Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-111485: Remove some special cases from the code generator and bytecodes.c #111540

Merged
merged 3 commits into from Oct 31, 2023

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Oct 31, 2023

  • Removes a bunch of special cases for tier-1-only instruction detection, making them explicit in bytecodes.c with TIER_ONE_ONLY.
  • Don't emit or check formats for psuedo-instructions. They don't exist in the bytecode, so don't have a format.
  • Make the counter in JUMP_BACKWARD explicit
  • Fix error handling in MAKE_CELL so it can be executed in tier 2.

@markshannon markshannon changed the title Remove some special cases from the code generator and bytecodes.c GH-111485: Remove some special cases from the code generator and bytecodes.c Oct 31, 2023
@markshannon markshannon merged commit 2904d99 into python:main Oct 31, 2023
33 checks passed
"exception_unwind",
"import_from",
"import_name",
"_PyObject_CallNoArgs", # Proxy for BEFORE_WITH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gvanrossum, do we know why we were special-casing BEFORE_WITH like this?

I ask because it looks like this PR made BEFORE_ASYNC_WITH (which also uses _PyObject_CallNoArgs) a viable uop. It seems fine, but maybe I'm missing something.

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.

None yet

3 participants