diff options
author | Michael Droettboom <mdboom@gmail.com> | 2024-10-08 17:18:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-08 17:18:39 (GMT) |
commit | c6127af8685c2a9b416207e46089cee79d028b85 (patch) | |
tree | f7547bbcdcf3cf109a026410c4b81cc51b1c7316 /Include | |
parent | 7dca7322cca7ff146444e56f28f21f1090987fff (diff) | |
download | cpython-c6127af8685c2a9b416207e46089cee79d028b85.zip cpython-c6127af8685c2a9b416207e46089cee79d028b85.tar.gz cpython-c6127af8685c2a9b416207e46089cee79d028b85.tar.bz2 |
gh-125063: Emit slices as constants in the bytecode compiler (#125064)
* Make slices marshallable
* Emit slices as constants
* Update Python/marshal.c
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* Refactor codegen_slice into two functions so it
always has the same net effect
* Fix for free-threaded builds
* Simplify marshal loading of slices
* Only return SUCCESS/ERROR from codegen_slice
---------
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_magic_number.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/internal/pycore_magic_number.h b/Include/internal/pycore_magic_number.h index 2414d25..a88ff2d 100644 --- a/Include/internal/pycore_magic_number.h +++ b/Include/internal/pycore_magic_number.h @@ -259,6 +259,7 @@ Known values: Python 3.14a1 3605 (Move ENTER_EXECUTOR to opcode 255) 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.15 will start with 3650 @@ -271,7 +272,7 @@ PC/launcher.c must also be updated. */ -#define PYC_MAGIC_NUMBER 3607 +#define PYC_MAGIC_NUMBER 3608 /* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes (little-endian) and then appending b'\r\n'. */ #define PYC_MAGIC_NUMBER_TOKEN \ |