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-148874: add flag to `CALL` to skip periodic check in `with` by NekoAsakura · Pull Request #149019 · python/cpython Conversation
|
| Calls with keyword arguments are now handled by :opcode:`CALL_KW`. | ||
|
|
||
| .. versionchanged:: next | ||
| ``argc`` is now the oparg shifted right by one. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Also explain what the low bit is for.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| #define RESUME_OPARG_LOCATION_MASK 0x7 | ||
| #define RESUME_OPARG_DEPTH1_MASK 0x8 | ||
|
|
||
| #define CALL_OPARG_SKIP_PENDING_MASK 0x1 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you avoid using macros (or inline functions) for this?
This is sp that our tools can understand the offsets in calls.
The tools can (with a bit of modification) understand oparg >> 1, but CALL_ARGCOUNT will require special casing CALL_ARGCOUNT making it more complex.
(The reason this matters is that we will want to convert fixes sized arrays to scalars in the code generator in the future)
Also, comments anywhere there is masking or shifting would be clearer, IMO, than opaque macros.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| elif deop in (CALL, INSTRUMENTED_CALL): | ||
| argval = arg >> 1 | ||
| if arg & 1: | ||
| argrepr = f"{argval} + skip_pending" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We use the term "no interrupt" for jumps, so could you use that here for consistency?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ERROR_IF(err != 0); | ||
| } | ||
|
|
||
| replaced op(_CHECK_PERIODIC_AT_END_PENDING, (--)) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| replaced op(_CHECK_PERIODIC_AT_END_PENDING, (--)) { | |
| replaced op(_CHECK_PERIODIC_IF_INTERRUPTIBLE, (--)) { |
The meaning of _CHECK_PERIODIC_AT_END_PENDING isn't clear.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| [_FOR_ITER_VIRTUAL] = _FOR_ITER_VIRTUAL_TIER_TWO, | ||
| [_ITER_NEXT_LIST] = _ITER_NEXT_LIST_TIER_TWO, | ||
| [_CHECK_PERIODIC_AT_END] = _TIER2_RESUME_CHECK, | ||
| [_CHECK_PERIODIC_AT_END_PENDING] = _TIER2_RESUME_CHECK, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This should either be replaced by _NOP if oparg & 1 is 0 or _CHECK_PERIODIC_AT_END if oparg & 1 is 1 in the front-end, so I wouldn't expect it to appear here.
We do much the same with _PUSH_NULL_CONDITIONAL, converting it to _NOP or _PUSH_NULL
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Documentation build overview
126 files changed ·
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the review <3 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A bit of clash with #148831, having a look. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Probably the magic number. You'll need to merge in main then increase it again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yep was fixed in #149121 |
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.
Generally looks good.
I don't we need a new uop, changing _CHECK_PERIODIC_AT_END should be sufficient.
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.
There was an error while loading. Please reload this page.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing as #150911 has landed. |
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.