aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-09-12 10:58:40 -0700
committerGitHub <noreply@github.com>2023-09-12 17:58:40 +0000
commitb86ce91bfeeb0437a38ee6b59fb86d5d37d529ee (patch)
treea8345f8042f8afaa7a19a6d5d0291da8bef66a9f /Python
parentd12b3e3152b1858e91c4890d0bf3a3b574a3ff6f (diff)
downloadcpython-b86ce91bfeeb0437a38ee6b59fb86d5d37d529ee.tar.gz
cpython-b86ce91bfeeb0437a38ee6b59fb86d5d37d529ee.zip
gh-106581: Honor 'always_exits' in write_components() (#109338)
I must have overlooked this when refactoring the code generator. The Tier 1 interpreter contained a few silly things like ``` goto resume_frame; STACK_SHRINK(1); ``` (and other variations, some where the unconditional `goto` was hidden in a macro).
Diffstat (limited to 'Python')
-rw-r--r--Python/generated_cases.c.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index b86e35f84fd..9742c95c407 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -803,7 +803,6 @@
SKIP_OVER(INLINE_CACHE_ENTRIES_BINARY_SUBSCR);
frame->return_offset = 0;
DISPATCH_INLINED(new_frame);
- STACK_SHRINK(1);
}
TARGET(LIST_APPEND) {
@@ -969,7 +968,6 @@
break;
}
if (true) { STACK_SHRINK(oparg); goto error; }
- STACK_SHRINK(oparg);
}
TARGET(INTERPRETER_EXIT) {
@@ -982,7 +980,6 @@
assert(!_PyErr_Occurred(tstate));
tstate->c_recursion_remaining += PY_EVAL_C_STACK_UNITS;
return retval;
- STACK_SHRINK(1);
}
TARGET(RETURN_VALUE) {
@@ -1044,7 +1041,6 @@
frame->prev_instr += frame->return_offset;
_PyFrame_StackPush(frame, retval);
goto resume_frame;
- STACK_SHRINK(1);
}
TARGET(RETURN_CONST) {
@@ -1388,7 +1384,6 @@
_PyErr_SetRaisedException(tstate, exc);
monitor_reraise(tstate, frame, next_instr-1);
goto exception_unwind;
- STACK_SHRINK(1);
}
TARGET(END_ASYNC_FOR) {
@@ -2210,8 +2205,6 @@
// don't want to specialize instrumented instructions
INCREMENT_ADAPTIVE_COUNTER(cache->counter);
GO_TO_INSTRUCTION(LOAD_SUPER_ATTR);
- STACK_SHRINK(2);
- STACK_GROW(((oparg & 1) ? 1 : 0));
}
TARGET(LOAD_SUPER_ATTR) {
@@ -3422,7 +3415,6 @@
next_instr[oparg].op.code == INSTRUMENTED_END_FOR);
frame->return_offset = oparg;
DISPATCH_INLINED(gen_frame);
- STACK_GROW(1);
}
TARGET(BEFORE_ASYNC_WITH) {
@@ -4032,8 +4024,6 @@
SKIP_OVER(INLINE_CACHE_ENTRIES_CALL);
frame->return_offset = 0;
DISPATCH_INLINED(new_frame);
- STACK_SHRINK(oparg);
- STACK_SHRINK(1);
}
TARGET(CALL_NO_KW_TYPE_1) {
@@ -4169,8 +4159,6 @@
* as it will be checked after start_frame */
tstate->py_recursion_remaining--;
goto start_frame;
- STACK_SHRINK(oparg);
- STACK_SHRINK(1);
}
TARGET(EXIT_INIT_CHECK) {
@@ -4453,8 +4441,6 @@
SKIP_OVER(INLINE_CACHE_ENTRIES_CALL + 1);
assert(next_instr[-1].op.code == POP_TOP);
DISPATCH();
- STACK_SHRINK(oparg);
- STACK_SHRINK(1);
}
TARGET(CALL_NO_KW_METHOD_DESCRIPTOR_O) {