Skip to content

Conversation

@markshannon
Copy link
Member

@markshannonmarkshannon 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-storchakaserhiy-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.

@ericsnowcurrentlyericsnowcurrentlyforce-pushed the compile-deref-offsets-in-compiler branch 2 times, most recently from 6e4b212 to 8045347CompareApril 24, 2021 00:20
@ericsnowcurrentlyericsnowcurrentlyforce-pushed the compile-deref-offsets-in-compiler branch from 16546b6 to 6174448CompareMay 7, 2021 20:42
@markshannon
Copy link
MemberAuthor

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

@ericsnowcurrentlyericsnowcurrentlyforce-pushed the compile-deref-offsets-in-compiler branch from 6174448 to 46d531eCompareJune 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. 🙂)

@ericsnowcurrentlyericsnowcurrently merged commit b2bf2bc into python:mainJun 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
@ericsnowcurrentlyericsnowcurrently deleted the compile-deref-offsets-in-compiler branch June 7, 2021 18:22
Sign up for freeto 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

@markshannon@serhiy-storchaka@gvanrossum@ericsnowcurrently@the-knights-who-say-ni@bedevere-bot