Skip to content

Conversation

@iritkatriel
Copy link
Member

@iritkatrieliritkatriel commented Jun 19, 2023

This generates the metadata about specialised opcodes from bytecodes.c, to replace the hard coded dict in opcode.py.

There is one irregularity that I needed to special-case: BINARY_OP_INPLACE_ADD_UNICODE, which is commented out in bytecodes.c (because it has different stack effect compared to the rest of the family).

@iritkatrieliritkatriel requested a review from a team as a code ownerJune 19, 2023 14:01
@markshannon
Copy link
Member

markshannon commented Jun 19, 2023

We should move the optimization in BINARY_OP_INPLACE_ADD_UNICODE to tier 2, once it we have a tier 2 optimizer. It makes sense there, but not in tier 1.
For now we can just remove it. I suspect BINARY_OP_INPLACE_ADD_UNICODE is not safe for PEP 669 anyway.
#100982

@markshannon
Copy link
Member

Looks like summarize_stats.py needs updating

Copy link
Member

@gvanrossumgvanrossum left a comment

Choose a reason for hiding this comment

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

LGTM. One nit; no need to get another review if you decide to fix that. Also okay to merge as-is.

@iritkatrieliritkatriel merged commit 33f0a85 into python:mainJun 19, 2023
@iritkatrieliritkatriel deleted the specialziation-data branch June 19, 2023 22:47
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@iritkatriel@markshannon@gvanrossum@bedevere-bot