From 2aba3fc9bb465318f6a072d2f345d666acb059d4 Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Fri, 9 Jan 2026 16:55:02 +0200 Subject: [PATCH 1/8] Remove `Reverse` bytecode --- Lib/_opcode_metadata.py | 5 ++--- crates/compiler-core/src/bytecode.rs | 11 +++-------- crates/vm/src/frame.rs | 5 ----- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Lib/_opcode_metadata.py b/Lib/_opcode_metadata.py index 529f5cbf656..30903a99a9f 100644 --- a/Lib/_opcode_metadata.py +++ b/Lib/_opcode_metadata.py @@ -140,9 +140,8 @@ 'JUMP_IF_TRUE_OR_POP': 130, 'JUMP_IF_NOT_EXC_MATCH': 131, 'LOAD_CLASS_DEREF': 132, - 'REVERSE': 133, - 'SET_EXC_INFO': 134, - 'SUBSCRIPT': 135, + 'SET_EXC_INFO': 133, + 'SUBSCRIPT': 134, 'RESUME': 149, 'JUMP': 252, 'LOAD_CLOSURE': 253, diff --git a/crates/compiler-core/src/bytecode.rs b/crates/compiler-core/src/bytecode.rs index 19380be4713..56f32a7f77e 100644 --- a/crates/compiler-core/src/bytecode.rs +++ b/crates/compiler-core/src/bytecode.rs @@ -902,7 +902,7 @@ pub enum Instruction { Resume { arg: Arg, } = 149, - // ==================== RustPython-only instructions (119-135) ==================== + // ==================== RustPython-only instructions (119-134) ==================== // Ideally, we want to be fully aligned with CPython opcodes, but we still have some leftovers. // So we assign random IDs to these opcodes. Break { @@ -941,11 +941,8 @@ pub enum Instruction { } = 130, JumpIfNotExcMatch(Arg