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-98831: Identify instructions that don't use oparg #100957

Merged
merged 4 commits into from Jan 14, 2023

Conversation

gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Jan 11, 2023

For these the instr_format field uses I_ instead of IB.
Register instructions use I_, IB, IBB_, IBBB, etc.

For these the instr_format field uses I_ instead of IB.
Register instructions use I_, IB, IBB_, IBBB, etc.
Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

Looks mostly good, just a bit confused by the register formats you're generating.

else:
fmt = "IB"
if variable_used(inst.block, "oparg"):
Copy link
Member

Choose a reason for hiding this comment

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

We don't know the actual opcode values yet, do we? If so, maybe we want to warn or something if this conflicts with HAVE_ARGUMENT.

Copy link
Member Author

Choose a reason for hiding this comment

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

Alas, we don't. I'd have to load opcode.py using the hack from your PR, which feels more infrastructure than I want to invest in for now (nothing is using the opcode metadata yet).

Python/opcode_metadata.h Outdated Show resolved Hide resolved
Tools/cases_generator/generate_cases.py Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@gvanrossum
Copy link
Member Author

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@brandtbucher: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from brandtbucher Jan 12, 2023
@gvanrossum gvanrossum merged commit 5134ef4 into python:main Jan 14, 2023
15 checks passed
@gvanrossum gvanrossum deleted the cases-oparg branch Jan 14, 2023
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