Skip to content

Commit

Permalink
pythongh-125038: CHECK_ITER instruction introduced
Browse files Browse the repository at this point in the history
  • Loading branch information
efimov-mikhail committed Oct 15, 2024
1 parent 233f6b6 commit ca04eef
Show file tree
Hide file tree
Showing 15 changed files with 490 additions and 470 deletions.
4 changes: 4 additions & 0 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,10 @@ iterations of the loop.
.. versionchanged:: 3.12
Up until 3.11 the iterator was popped when it was exhausted.

.. opcode:: CHECK_ITER

Check that ``STACK[-1]`` is an :term:`iterator`.

.. opcode:: LOAD_GLOBAL (namei)

Loads the global named ``co_names[namei>>1]`` onto the stack.
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 @@ -260,6 +260,7 @@ Known values:
Python 3.14a1 3606 (Specialize CALL_KW)
Python 3.14a1 3607 (Add pseudo instructions JUMP_IF_TRUE/FALSE)
Python 3.14a1 3608 (Add support for slices)
Python 3.14a1 3609 (Add CHECK_ITER instruction)
Python 3.15 will start with 3650
Expand All @@ -272,7 +273,7 @@ PC/launcher.c must also be updated.
*/

#define PYC_MAGIC_NUMBER 3608
#define PYC_MAGIC_NUMBER 3609
/* 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
9 changes: 8 additions & 1 deletion Include/internal/pycore_opcode_metadata.h

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

1 change: 1 addition & 0 deletions Include/internal/pycore_uop_ids.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_uop_metadata.h

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

221 changes: 111 additions & 110 deletions Include/opcode_ids.h

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

Loading

0 comments on commit ca04eef

Please sign in to comment.