GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-95913: Edit, expand & format Bytecode sect in 3.11 WhatsNew by CAM-Gerlach · Pull Request #98559 · python/cpython Conversation
|
| Changed Opcodes | ||
| --------------- | ||
|
|
||
| * Changed :opcode:`JUMP_IF_TRUE_OR_POP` and :opcode:`JUMP_IF_FALSE_OR_POP` | ||
| to now be relative rather than absolute. |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I left the Changes section as it was for now (aside from minor technical edits), but there were a handful of additional Opcode changes of what seemed to be roughly comparable magnitude to those mentioned that weren't noted here, mostly grouped by a few specific common alterations, that we could include in a final short table (with columns Opcode(s) and Change), if you feel its worth including.
Here are the additional changes that could be mentioned:
Added where oparg
Exception representation on the stack now consist of one, not three, items
The exit function is in position 4 of the stack rather than 7.
If the low bit of namei is set, then a NULL is pushed to the stack before the global variable.
i is no longer offset by the length of co_varnames
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This should be also checked with @markshannon, @brandtbucher, @iritkatriel and @ericsnowcurrently. If this doesn't land today, it won't be included in 3.11.0 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| * :opcode:`JUMP_IF_TRUE_OR_POP` and :opcode:`JUMP_IF_FALSE_OR_POP` are now | ||
| relative rather than absolute. | ||
| .. _whatsnew311-added-opcodes: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The list we have now has all the jump related changes together, but if you split it into a "added" table and a "replaced" table then they are no longer together. I don't know if that's an improvement.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I created an alternative PR -#98566. It tries to consolidate related items into a high level descriptions, rather than enumerate all the changes. Maybe this is more useful for whatsnew. The full details, if you need them, as in the dis doc.
I added an item about the exc-info related changes. Didn't do anything about these:
GET_AWAITABLE
WITH_EXCEPT_START
If the low bit of namei is set, then a NULL is pushed to the stack before the global variable.
LOAD_GLOBAL
i is no longer offset by the length of co_varnames
LOAD_CLOSURE
LOAD_DEREF
LOAD_CLASSDEREF
STORE_DEREF
DELETE_DEREF
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Great points, thanks. I've incorporated the changes suggested via your PR, specifically:
NO_INTERRUPT opcode addition, which didn't appear to be closely related to the others) into a single Replaced table entry with a linked noteEXC/EG changes were already consolidated)Beyond that, I've given this PR a major revamp based on your feedback above:
In total, this retains nearly the same space consumption of the previous dense wall of flat bullets format (once allowing for the missing substantive additions, replacements and removals added here), while being much easier for the reader to quickly navigate, find what they're looking for and jump to more information in the dis docs.
| Flat Bullets | Initial PR | Revised PR |
|---|---|---|
![]() |
![]() |
![]() |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Yeah this is better! Just CHECK_EG_MATCH is also new for PEP 654. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Heads up: please land this before 3Pm GMT+0 if you want it to be in 3.11.0 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @CAM-Gerlach for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ythonGH-98559) (cherry picked from commit 22739a0) Co-authored-by: C.A.M. Gerlach <[email protected]>
|
GH-98597 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
) (cherry picked from commit 22739a0) Co-authored-by: C.A.M. Gerlach <[email protected]>
It's merged and backported. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.