Skip to content

Commit c1f3034

Browse files
committed
INTERPRETER_EXIT (a bit weird, ends in return)
1 parent 8d445ae commit c1f3034

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ do { \
8282
static PyObject *value, *value1, *value2, *left, *right, *res, *sum, *prod, *sub;
8383
static PyObject *container, *start, *stop, *v, *lhs, *rhs;
8484
static PyObject *list, *tuple, *dict, *owner;
85-
static PyObject *exit_func, *lasti, *val;
85+
static PyObject *exit_func, *lasti, *val, *retval;
8686
static size_t jump;
8787
// Dummy variables for cache effects
8888
static _Py_CODEUNIT when_to_jump_mask, invert, counter, index, hint;
@@ -589,11 +589,10 @@ dummy_func(
589589
goto error;
590590
}
591591

592-
// stack effect: (__0 -- )
593-
inst(INTERPRETER_EXIT) {
592+
inst(INTERPRETER_EXIT, (retval --)) {
594593
assert(frame == &entry_frame);
595594
assert(_PyFrame_IsIncomplete(frame));
596-
PyObject *retval = POP();
595+
STACK_SHRINK(1); // Since we're not going to DISPATCH()
597596
assert(EMPTY());
598597
/* Restore previous cframe and return. */
599598
tstate->cframe = cframe.previous;

Python/generated_cases.c.h

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)