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-107457: update dis documentation with changes in 3.12 by MatthieuDartiailh · Pull Request #108900 · python/cpython Conversation
|
| adaptive bytecode can be shown by passing ``adaptive=True``. | ||
|
|
||
| .. versionchanged:: 3.12 | ||
| For instruction leading to a jump, a jump by 0 instruction should always |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What is an "instruction leading to a jump"?
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 agree it is a bit convoluted. I am happy to use a different phrasing. Initially I went for this because of opcode like FOR_ITER that do not jump often.
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 don't understand what you mean, so I can't offer how to reword it.
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.
Would the following re-wording read better ?
When the offset of a jump instruction is 0, the jump should always lead to the instruction directly following the jump instruction. Starting with 3.12, some jump instructions can be followed by a :opcode:CACHE instruction. When the argument of such an instruction is 0, it will jump to the first non-CACHE instruction following the jump instruction.
As a consequence, the presence of the :opcode:CACHE instructions is transparent for forward jumps but need to be taken into account when reasoning about backward jumps.
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 think I see what you mean now.
Can we just say that "the arg of a jump is the offset from the instruction that appears immediately after the JUMP instruction's CACHE entries" ?
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.
Can we agree on the following ? I would prefer to insist on the forward backward asymmetry
The argument of a jump is the offset of the target relative to the instruction that appears immediately after the jump instruction's CACHE entries.
As a consequence, the presence of the CACHE instructions is transparent for forward jumps but need to be taken into account when reasoning about backward jumps.
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.
Sure. I think "need --> needs" though.
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.
Sure
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.
|
Can I do anything to help merge this work ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
There was this question: https://github.com/python/cpython/pull/108900/files#r1336237016 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| arguments and sets ``STACK[-1]`` to the result. Used to implement functionality that is | ||
| necessary but not performance critical. | ||
| Calls an intrinsic function with two arguments. Used to implement functionality | ||
| that is necessary but not performance critical:: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| that is necessary but not performance critical:: | |
| that is not performance critical:: |
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 can see you copied this from the 1-arg opcode. But I think it's redundant in both cases.
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 will update it
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @MatthieuDartiailh for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…nGH-108900) (cherry picked from commit 198aa67) Co-authored-by: Matthieu Dartiailh <[email protected]>
|
GH-110985 is a backport of this pull request to the 3.12 branch. |
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.