Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-119180: Add LOAD_COMMON_CONSTANT opcode#119321

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JelleZijlstra merged 7 commits intopython:mainfromJelleZijlstra:pep649-loadcommon
May 22, 2024

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstraJelleZijlstra commentedMay 21, 2024
edited by github-actionsbot
Loading

The PEP 649 implementation will require a way to load NotImplementedError
from the bytecode.@markshannon suggested implementing this by converting
LOAD_ASSERTION_ERROR into a more general mechanism for loading constants.

This PR adds this new opcode. I will work on the rest of the implementation
of the PEP separately.


📚 Documentation preview 📚:https://cpython-previews--119321.org.readthedocs.build/

The PEP 649 implementation will require a way to load NotImplementedErrorfrom the bytecode.@markshannon suggested implementing this by convertingLOAD_ASSERTION_ERROR into a more general mechanism for loading constants.This PR adds this new opcode. I will work on the rest of the implementationof the PEP separately.
JelleZijlstraand others added3 commitsMay 21, 2024 13:10
…e-119180.UNDUb9.rstCo-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@JelleZijlstra
Copy link
MemberAuthor

The previous version broke the JIT.@brandtbucher helped figure out that this is because the common_constants array is empty when the JIT is being compiled. Since there didn't seem to be a simple way to make this work correctly, we decided to simply use a switch in the interpreter code instead.

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.

Here you go!

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.

Yay!

@JelleZijlstraJelleZijlstraenabled auto-merge (squash)May 21, 2024 20:31
@JelleZijlstraJelleZijlstra merged commit98e855f intopython:mainMay 22, 2024
55 checks passed
@JelleZijlstraJelleZijlstra deleted the pep649-loadcommon branchMay 22, 2024 12:26
JelleZijlstra added a commit that referenced this pull requestMay 25, 2024
PR#119321 added a comment about the magic number bumpbut did not actually apply the new magic number.
estyxx pushed a commit to estyxx/cpython that referenced this pull requestJul 17, 2024
The PEP 649 implementation will require a way to load NotImplementedErrorfrom the bytecode.@markshannon suggested implementing this by convertingLOAD_ASSERTION_ERROR into a more general mechanism for loading constants.This PR adds this new opcode. I will work on the rest of the implementationof the PEP separately.Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
estyxx pushed a commit to estyxx/cpython that referenced this pull requestJul 17, 2024
PRpython#119321 added a comment about the magic number bumpbut did not actually apply the new magic number.
@JelleZijlstraJelleZijlstra restored the pep649-loadcommon branchSeptember 10, 2024 23:37
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@iritkatrieliritkatrieliritkatriel left review comments

@carljmcarljmcarljm approved these changes

@gvanrossumgvanrossumgvanrossum approved these changes

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

@brettcannonbrettcannonAwaiting requested review from brettcannonbrettcannon is a code owner

@ncoghlanncoghlanAwaiting requested review from ncoghlanncoghlan is a code owner

@warsawwarsawAwaiting requested review from warsawwarsaw is a code owner

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@JelleZijlstra@carljm@iritkatriel@gvanrossum

[8]ページ先頭

©2009-2025 Movatter.jp