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

bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. #26396

Merged
merged 14 commits into from
Jun 7, 2021

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented May 27, 2021

This moves logic out of the frame initialization code and into the compiler and eval loop. Doing so simplifies the runtime code and allows us to optimize it better.

https://bugs.python.org/issue43693

Include/cpython/code.h Outdated Show resolved Hide resolved
Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

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

Also a couple of Windows warnings.

Doc/library/dis.rst Show resolved Hide resolved
Include/cpython/code.h Show resolved Hide resolved
Include/cpython/code.h Show resolved Hide resolved
@@ -181,14 +181,16 @@ def jabs_op(name, op):
def_op('MAKE_FUNCTION', 132) # Flags
def_op('BUILD_SLICE', 133) # Number of items

def_op('LOAD_CLOSURE', 135)
Copy link
Member

Choose a reason for hiding this comment

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

Why the opcode shuffle?

Copy link
Member Author

Choose a reason for hiding this comment

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

My initial impression was that MAKE_CELL should be at the front of the cell-related list and I figured it would be better to preserve the gap at 134. I figured it wouldn't matter but if it's a problem I can put MAKE_CELL at 139.

Objects/frameobject.c Outdated Show resolved Hide resolved
Objects/frameobject.c Outdated Show resolved Hide resolved
Python/ceval.c Outdated Show resolved Hide resolved
Python/ceval.c Outdated Show resolved Hide resolved
@ericsnowcurrently ericsnowcurrently added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 7, 2021
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @ericsnowcurrently for commit 05accc0 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 7, 2021
@ericsnowcurrently ericsnowcurrently merged commit 631f993 into python:main Jun 7, 2021
@ericsnowcurrently ericsnowcurrently deleted the add-make-cell branch June 7, 2021 22:52
pablogsal added a commit to pablogsal/cpython that referenced this pull request Jun 8, 2021
pablogsal added a commit that referenced this pull request Jun 8, 2021
ericsnowcurrently added a commit to ericsnowcurrently/cpython that referenced this pull request Jun 8, 2021
ericsnowcurrently added a commit that referenced this pull request Jun 8, 2021
This was reverted in GH-26596 (commit 6d518bb) due to some bad memory accesses.

* Add the MAKE_CELL opcode. (gh-26396)

The memory accesses have been fixed.

https://bugs.python.org/issue43693
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants