FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-105481: generate _specializations and _specialized_instructions from bytecodes.c by iritkatriel · Pull Request #105913 · python/cpython · GitHub

/ cpython Public

gh-105481: generate _specializations and _specialized_instructions from bytecodes.c - #105913

Merged
iritkatriel merged 9 commits into
python:mainfrom
iritkatriel:specialziation-data
Jun 19, 2023
Merged

gh-105481: generate _specializations and _specialized_instructions from bytecodes.c#105913
iritkatriel merged 9 commits into
python:mainfrom
iritkatriel:specialziation-data

Conversation

iritkatriel commented Jun 19, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

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).

iritkatriel requested a review from a team as a code owner June 19, 2023 14:01

markshannon commented Jun 19, 2023
edited
Loading

Copy link
Copy Markdown
Member

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

Comment thread Lib/test/test__opcode.py Outdated

Copy link
Copy Markdown
Member

Looks like summarize_stats.py needs updating

gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Comment thread Makefile.pre.in Outdated
iritkatriel merged commit 33f0a85 into python:main Jun 19, 2023
iritkatriel deleted the specialziation-data branch June 19, 2023 22:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL