Skip to content

bpo-43693: Compute deref offsets in compiler #25152

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

Merged

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Apr 2, 2021

Merges locals and cells into a single array.
Saves a pointer in the interpreter and means that we don't need the LOAD_CLOSURE opcode any more

https://bugs.python.org/issue43693

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Update also Doc/library/dis.rst.

@serhiy-storchaka
Copy link
Member

Please don't forget to bump a bytecode magic number and add a line to the bytecode history list.

@ericsnowcurrently ericsnowcurrently force-pushed the compile-deref-offsets-in-compiler branch 2 times, most recently from 6e4b212 to 8045347 Compare April 24, 2021 00:20
@ericsnowcurrently ericsnowcurrently force-pushed the compile-deref-offsets-in-compiler branch from 16546b6 to 6174448 Compare May 7, 2021 20:42
@markshannon
Copy link
Member Author

Eric is working on a PR to implement faster-cpython/ideas#41, so I'm closing this.

@ericsnowcurrently ericsnowcurrently force-pushed the compile-deref-offsets-in-compiler branch from 6174448 to 46d531e Compare June 3, 2021 16:41
@gvanrossum
Copy link
Member

(What are you doing here?)

@ericsnowcurrently
Copy link
Member

This change was always going to be included. I figured it would still be cleaner if it were its own PR. It also makes the subsequent PR a little smaller. (Plus it was already reviewed, between Mark and me, so I'll merge it today. 🙂)

@ericsnowcurrently ericsnowcurrently merged commit b2bf2bc into python:main Jun 4, 2021
pablogsal added a commit to pablogsal/cpython that referenced this pull request Jun 4, 2021
pablogsal added a commit that referenced this pull request Jun 4, 2021
* Revert "bpo-43693: Compute deref offsets in compiler (gh-25152)"

This reverts commit b2bf2bc.

* Revert "bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)"

This reverts commit 2c1e258.

These two commits are breaking the refleak buildbots.
ericsnowcurrently added a commit to ericsnowcurrently/cpython that referenced this pull request Jun 7, 2021
These were reverted in pythonGH-26530 (commit 17c4edc).

* Compute deref offsets in compiler (pythongh-25152)
* Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (pythongh-26388)
ericsnowcurrently added a commit that referenced this pull request Jun 7, 2021
These were reverted in gh-26530 (commit 17c4edc) due to refleaks.

* 2c1e258 - Compute deref offsets in compiler (gh-25152)
* b2bf2bc - Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)

This change fixes the refleaks.

https://bugs.python.org/issue43693
@ericsnowcurrently ericsnowcurrently deleted the compile-deref-offsets-in-compiler branch June 7, 2021 18:22
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.

6 participants