diff options
author | Guido van Rossum <guido@python.org> | 2022-11-08 16:22:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-08 16:22:56 (GMT) |
commit | f1a654648b7d86cc52225455d72fe69e8920318f (patch) | |
tree | 6cc8eccd801fed6726cb4b7c60bddd4811964177 /Python/ceval.c | |
parent | c7065ce01999cbbc483bfcb7449b5223bea5bfa1 (diff) | |
download | cpython-f1a654648b7d86cc52225455d72fe69e8920318f.zip cpython-f1a654648b7d86cc52225455d72fe69e8920318f.tar.gz cpython-f1a654648b7d86cc52225455d72fe69e8920318f.tar.bz2 |
GH-98831: Simple input-output stack effects for bytecodes.c (#99120)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 46fad97..4828adb 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -806,6 +806,7 @@ GETITEM(PyObject *v, Py_ssize_t i) { #define THIRD() (stack_pointer[-3]) #define FOURTH() (stack_pointer[-4]) #define PEEK(n) (stack_pointer[-(n)]) +#define POKE(n, v) (stack_pointer[-(n)] = (v)) #define SET_TOP(v) (stack_pointer[-1] = (v)) #define SET_SECOND(v) (stack_pointer[-2] = (v)) #define BASIC_STACKADJ(n) (stack_pointer += n) @@ -1274,6 +1275,14 @@ unbound_local_error: goto error; } +pop_4_error: + STACK_SHRINK(1); +pop_3_error: + STACK_SHRINK(1); +pop_2_error: + STACK_SHRINK(1); +pop_1_error: + STACK_SHRINK(1); error: call_shape.kwnames = NULL; /* Double-check exception status. */ |