GH-98831: Simple input-output stack effects for bytecodes.c (#99120)

This commit is contained in:
Guido van Rossum 2022-11-08 08:22:56 -08:00 committed by GitHub
parent c7065ce019
commit f1a654648b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 384 additions and 406 deletions

View file

@ -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. */