Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ the following command can be used to display the disassembly of
<BLANKLINE>
3 LOAD_GLOBAL 1 (len + NULL)
LOAD_FAST_BORROW 0 (alist)
CALL 1
CALL 2 (1)
RETURN_VALUE

(The "2" is a line number).
Expand Down Expand Up @@ -1601,6 +1601,9 @@ iterations of the loop.
.. versionchanged:: 3.13
Calls with keyword arguments are now handled by :opcode:`CALL_KW`.

.. versionchanged:: next
``argc`` is now the oparg shifted right by one.


.. opcode:: CALL_KW (argc)

Expand Down
3 changes: 2 additions & 1 deletion Include/internal/pycore_magic_number.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ Known values:
Python 3.15a8 3663 (Merge GET_ITER and GET_YIELD_FROM_ITER. Modify SEND to make it a bit more like FOR_ITER)
Python 3.15a8 3664 (Fix __qualname__ for __annotate__ functions)
Python 3.15a8 3665 (Add FOR_ITER_VIRTUAL and GET_ITER specializations)
Python 3.15a9 3666 (Pack CALL oparg as (argcount<<1) | skip_periodic; gh-148874)
Python 3.16 will start with 3700
Expand All @@ -309,7 +310,7 @@ PC/launcher.c must also be updated.
*/

#define PYC_MAGIC_NUMBER 3665
#define PYC_MAGIC_NUMBER 3666
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
(little-endian) and then appending b'\r\n'. */
#define PYC_MAGIC_NUMBER_TOKEN \
Expand Down
54 changes: 27 additions & 27 deletions Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Include/internal/pycore_opcode_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ extern "C" {
#define RESUME_OPARG_LOCATION_MASK 0x7
#define RESUME_OPARG_DEPTH1_MASK 0x8

#define CALL_OPARG_SKIP_PENDING_MASK 0x1
#define CALL_ARGCOUNT(oparg) ((oparg) >> 1)
#define CALL_OPARG(argcount, skip) (((argcount) << 1) | (skip))

#define GET_ITER_YIELD_FROM 1
#define GET_ITER_YIELD_FROM_NO_CHECK 2
#define GET_ITER_YIELD_FROM_CORO_CHECK 3
Expand Down
Loading
Loading