From: Russell Keith-Magee Date: Wed, 30 Apr 2025 22:21:57 +0000 (+0800) Subject: GH-125515: Remove two unused error branches. (#133181) X-Git-Tag: v3.14.0b1~158 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c522debc218d441756bf631abe8ec8d6c6f1c45;p=thirdparty%2FPython%2Fcpython.git GH-125515: Remove two unused error branches. (#133181) Remove two unused error branches in the generated bytecode handling. --- diff --git a/Python/bytecodes.c b/Python/bytecodes.c index b30fa0899106..496a53dbabeb 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -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()); diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 89bfc069080a..6841fbcc22e5 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -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; diff --git a/Python/opcode_targets.h b/Python/opcode_targets.h index debaab98f00a..8c2dfb460770 100644 --- a/Python/opcode_targets.h +++ b/Python/opcode_targets.h @@ -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);