| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @brandtbucher for commit 53917a5 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @brandtbucher for commit 53917a5 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Can you add CALL_KW to the list of specializable instructions that we don't specialize for the stats. https://github.com/python/cpython/blob/main/Python/specialize.c#L135 |
Sorry, something went wrong.
There was a problem hiding this comment.
I just love seeing this! Mostly some docs nits.
Sorry, something went wrong.
| arguments. Also, fix a possible crash when jumping over method calls in a | ||
| debugger. |
There was a problem hiding this comment.
Is the crash fix inseparable from the new opcode? Is there no issue for it?
Sorry, something went wrong.
There was a problem hiding this comment.
It's just bugs in mark_stacks left over from #107788. So same issue number, unrelated to the new opcode though.
Sorry, something went wrong.
| correct name, the bytecode pushes the unbound method and ``STACK[-1]``. | ||
| ``STACK[-1]`` will be used as the first argument (``self``) by :opcode:`CALL` | ||
| when calling the unbound method. Otherwise, ``NULL`` and the object returned by | ||
| or :opcode:`CALL_KW` when calling the unbound method. Otherwise, ``NULL`` and the object returned by |
There was a problem hiding this comment.
Break long line
| or :opcode:`CALL_KW` when calling the unbound method. Otherwise, ``NULL`` and the object returned by | |
| or :opcode:`CALL_KW` when calling the unbound method. | |
| Otherwise, ``NULL`` and the object returned by |
Sorry, something went wrong.
| * The callable | ||
| * The positional arguments | ||
| * The named arguments | ||
| * ``self`` (or ``NULL``) |
There was a problem hiding this comment.
| * ``self`` (or ``NULL``) | |
| * ``self`` or ``NULL`` |
Sorry, something went wrong.
| ``argc`` is the total of the positional and named arguments, excluding | ||
| ``self`` when a ``NULL`` is not present. |
There was a problem hiding this comment.
(Same thing about whether "not" should be removed.)
Make explicit that if there are N positional and M keyword arguments, oparg is N+M, and len(tuple) must be == M.
Sorry, something went wrong.
| # Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array | ||
| # in PC/launcher.c must also be updated. | ||
|
|
||
| MAGIC_NUMBER = (3561).to_bytes(2, 'little') + b'\r\n' |
There was a problem hiding this comment.
This is already a merge conflict. :-) Might need to manually merge #109269.
Sorry, something went wrong.
| // or | ||
| // [method, self, arg1, arg2, ...] | ||
| // (Some args may be keywords, see KW_NAMES, which sets 'kwnames'.) | ||
| // [callable, self, arg1, arg2, ...] |
There was a problem hiding this comment.
Maybe add (here too) that oparg counts arg1 etc., but not self? (It has to be this way, of course, but still bears repeating IMO.)
Sorry, something went wrong.
| ``argc`` is the total of the positional arguments, excluding | ||
| ``self`` when a ``NULL`` is not present. |
There was a problem hiding this comment.
I think it's clearer to just say "excluding self":
| ``argc`` is the total of the positional arguments, excluding | |
| ``self`` when a ``NULL`` is not present. | |
| ``argc`` is the total of the positional arguments, excluding ``self``. |
Sorry, something went wrong.
|
|
||
| * The callable | ||
| * ``self`` | ||
| * ``self`` (or ``NULL``) |
There was a problem hiding this comment.
| * ``self`` (or ``NULL``) | |
| * ``self`` or ``NULL`` |
Sorry, something went wrong.
| ``argc`` is the total of the positional and named arguments, excluding | ||
| ``self`` when a ``NULL`` is not present. |
There was a problem hiding this comment.
| ``argc`` is the total of the positional and named arguments, excluding | |
| ``self`` when a ``NULL`` is not present. | |
| ``argc`` is the total of the positional and named arguments, excluding ``self``. |
Sorry, something went wrong.
| GO_TO_INSTRUCTION(CALL_KW); | ||
| } | ||
|
|
||
| inst(CALL_KW, (callable, self_or_null, args[oparg], kwnames -- res)) { |
There was a problem hiding this comment.
Maybe this deserves a comment (like CALL) about the stack contents on entry and exit? Or if not, maybe CALL doesn't need it either? (Because it should be clear from the DSL.)
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, I'd rather just remove it from both. It's not that complex anymore.
Sorry, something went wrong.
|
Ignoring the buildbot failures since they're all either failing on main or on other PRs also. Not a very informative run... :( |
Sorry, something went wrong.
That's only useful if we're recording failure kinds, right? We're not in this case, so I don't think it would actually add anything other than an empty section. |
Sorry, something went wrong.
| :opcode:`KW_NAMES`, if any. | ||
| On the stack are (in ascending order), either: | ||
| Calls a callable object with the number of arguments specified by ``argc``. | ||
| On the stack are (in ascending order): | ||
|
|
||
| * NULL | ||
| * The callable | ||
| * The positional arguments | ||
| * The named arguments | ||
|
|
||
| or: | ||
|
|
||
| * The callable | ||
| * ``self`` | ||
| * ``self`` or ``NULL`` | ||
| * The remaining positional arguments | ||
| * The named arguments | ||
|
|
||
| ``argc`` is the total of the positional and named arguments, excluding | ||
| ``self`` when a ``NULL`` is not present. | ||
| ``argc`` is the total of the positional arguments, excluding ``self``. |
There was a problem hiding this comment.
That is definitely easier to follow. :)
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Get rid of the magic kwnames side-channel and split out calls with a tuple of keyword names on the stack (CALL_KW) from those with no keyword arguments (the existing CALL family). Stats on an earlier version of this branch suggested that specializing CALL_KW just isn't worth it.
Other cleanup:
The new CALL_KW instruction is mostly copied and lightly modified from the existing CALL instruction. They can probably share code using uops, but that's a project for another day.
📚 Documentation preview 📚: https://cpython-previews--109300.org.readthedocs.build/