@@ -2800,9 +2800,79 @@ Deprecated
2800
2800
CPython bytecode changes
2801
2801
========================
2802
2802
2803
- * Replaced the opcode ``BINARY_SUBSCR `` by :opcode: `BINARY_OP ` with oparg ``NB_SUBSCR ``.
2803
+ * Replaced the opcode :opcode: `!BINARY_SUBSCR ` by the :opcode: `BINARY_OP `
2804
+ opcode with the ``NB_SUBSCR `` oparg.
2804
2805
(Contributed by Irit Katriel in :gh: `100239 `.)
2805
2806
2807
+ * Add the :opcode: `BUILD_INTERPOLATION ` and :opcode: `BUILD_TEMPLATE `
2808
+ opcodes to construct new :class: `~string.templatelib.Interpolation `
2809
+ and :class: `~string.templatelib.Template ` instances, respectively.
2810
+ (Contributed by Lysandros Nikolaou and others in :gh: `132661 `;
2811
+ see also :ref: `PEP 750: Template strings <whatsnew314-pep750 >`).
2812
+
2813
+ * Remove the :opcode: `!BUILD_CONST_KEY_MAP ` opcode.
2814
+ Use :opcode: `BUILD_MAP ` instead.
2815
+ (Contributed by Mark Shannon in :gh: `122160 `.)
2816
+
2817
+ * Replace the :opcode: `!LOAD_ASSERTION_ERROR ` opcode with
2818
+ :opcode: `LOAD_COMMON_CONSTANT ` and add support for loading
2819
+ :exc: `NotImplementedError `.
2820
+
2821
+ * Add the :opcode: `LOAD_FAST_BORROW ` and :opcode: `LOAD_FAST_BORROW_LOAD_FAST_BORROW `
2822
+ opcodes to reduce reference counting overhead when the interpreter can prove
2823
+ that the reference in the frame outlives the reference loaded onto the stack.
2824
+ (Contributed by Matt Page in :gh: `130704 `.)
2825
+
2826
+ * Add the :opcode: `LOAD_SMALL_INT ` opcode, which pushes a small integer
2827
+ equal to the ``oparg `` to the stack.
2828
+ The :opcode: `!RETURN_CONST ` opcode is removed as it is no longer used.
2829
+ (Contributed by Mark Shannon in :gh: `125837 `.)
2830
+
2831
+ * Add the new :opcode: `LOAD_SPECIAL ` instruction.
2832
+ Generate code for :keyword: `with ` and :keyword: `async with ` statements
2833
+ using the new instruction.
2834
+ Removed the :opcode: `!BEFORE_WITH ` and :opcode: `!BEFORE_ASYNC_WITH ` instructions.
2835
+ (Contributed by Mark Shannon in :gh: `120507 `.)
2836
+
2837
+ * Add the :opcode: `POP_ITER ` opcode to support 'virtual' iterators.
2838
+ (Contributed by Mark Shannon in :gh: `132554 `.)
2839
+
2840
+ Pseudo-instructions
2841
+ -------------------
2842
+
2843
+ * Add the :opcode: `!ANNOTATIONS_PLACEHOLDER ` pseudo instruction
2844
+ to support partially executed module-level annotations with
2845
+ :ref: `deferred evaluation of annotations <whatsnew314-pep649 >`.
2846
+ (Contributed by Jelle Zijlstra in :gh: `130907 `.)
2847
+
2848
+ * Add the :opcode: `!BINARY_OP_EXTEND ` pseudo instruction,
2849
+ which executes a pair of functions (guard and specialization functions)
2850
+ accessed from the inline cache.
2851
+ (Contributed by Irit Katriel in :gh: `100239 `.)
2852
+
2853
+ * Add three specializations for :opcode: `CALL_KW `;
2854
+ :opcode: `!CALL_KW_PY ` for calls to Python functions,
2855
+ :opcode: `!CALL_KW_BOUND_METHOD ` for calls to bound methods, and
2856
+ :opcode: `!CALL_KW_NON_PY ` for all other calls.
2857
+ (Contributed by Mark Shannon in :gh: `118093 `.)
2858
+
2859
+ * Add the :opcode: `JUMP_IF_TRUE ` and :opcode: `JUMP_IF_FALSE ` pseudo instructions,
2860
+ conditional jumps which do not impact the stack.
2861
+ Replaced by the sequence ``COPY 1 ``, ``TO_BOOL ``, ``POP_JUMP_IF_TRUE/FALSE ``.
2862
+ (Contributed by Irit Katriel in :gh: `124285 `.)
2863
+
2864
+ * Add the :opcode: `!LOAD_CONST_MORTAL ` pseudo instruction.
2865
+ (Contributed by Mark Shannon in :gh: `128685 `.)
2866
+
2867
+ * Add the :opcode: `LOAD_CONST_IMMORTAL ` pseudo instruction,
2868
+ which does the same as :opcode: `!LOAD_CONST `, but is more efficient
2869
+ for immortal objects.
2870
+ (Contributed by Mark Shannon in :gh: `125837 `.)
2871
+
2872
+ * Add the :opcode: `NOT_TAKEN ` pseudo instruction, used by :mod: `sys.monitoring `
2873
+ to record branch events (such as :monitoring-event: `BRANCH_LEFT `).
2874
+ (Contributed by Mark Shannon in :gh: `122548 `.)
2875
+
2806
2876
2807
2877
C API changes
2808
2878
=============
0 commit comments