]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-125515: Remove two unused error branches. (#133181)
authorRussell Keith-Magee <russell@keith-magee.com>
Wed, 30 Apr 2025 22:21:57 +0000 (06:21 +0800)
committerGitHub <noreply@github.com>
Wed, 30 Apr 2025 22:21:57 +0000 (06:21 +0800)
Remove two unused error branches in the generated bytecode handling.

Python/bytecodes.c
Python/generated_cases.c.h
Python/opcode_targets.h

index b30fa0899106de5044bad7d77f7c3e0ca3a99013..496a53dbabebd46e3b341d2a76b17304f0b68425 100644 (file)
@@ -5332,18 +5332,6 @@ dummy_func(
             assert(tstate->tracing || eval_breaker == FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version));
         }
 
-        label(pop_4_error) {
-            stack_pointer -= 4;
-            assert(WITHIN_STACK_BOUNDS());
-            goto error;
-        }
-
-        label(pop_3_error) {
-            stack_pointer -= 3;
-            assert(WITHIN_STACK_BOUNDS());
-            goto error;
-        }
-
         label(pop_2_error) {
             stack_pointer -= 2;
             assert(WITHIN_STACK_BOUNDS());
index 89bfc069080a951e22f20f426bf8d4450940e55b..6841fbcc22e5a457a57422bf07c6d8db75ab85cb 100644 (file)
@@ -12230,20 +12230,6 @@ JUMP_TO_LABEL(error);
 #endif /* Py_TAIL_CALL_INTERP */
         /* BEGIN LABELS */
 
-        LABEL(pop_4_error)
-        {
-            stack_pointer -= 4;
-            assert(WITHIN_STACK_BOUNDS());
-            JUMP_TO_LABEL(error);
-        }
-
-        LABEL(pop_3_error)
-        {
-            stack_pointer -= 3;
-            assert(WITHIN_STACK_BOUNDS());
-            JUMP_TO_LABEL(error);
-        }
-
         LABEL(pop_2_error)
         {
             stack_pointer -= 2;
index debaab98f00a8e289500ccab9bc0f82c3c893458..8c2dfb4607708390427dad137a81d008e6d7787b 100644 (file)
@@ -260,8 +260,6 @@ static void *opcode_targets[256] = {
 #else /* Py_TAIL_CALL_INTERP */
 static py_tail_call_funcptr INSTRUCTION_TABLE[256];
 
-Py_PRESERVE_NONE_CC static PyObject *_TAIL_CALL_pop_4_error(TAIL_CALL_PARAMS);
-Py_PRESERVE_NONE_CC static PyObject *_TAIL_CALL_pop_3_error(TAIL_CALL_PARAMS);
 Py_PRESERVE_NONE_CC static PyObject *_TAIL_CALL_pop_2_error(TAIL_CALL_PARAMS);
 Py_PRESERVE_NONE_CC static PyObject *_TAIL_CALL_pop_1_error(TAIL_CALL_PARAMS);
 Py_PRESERVE_NONE_CC static PyObject *_TAIL_CALL_error(TAIL_CALL_PARAMS);