gh-115480: Minor fixups in int constant propagation (GH-115507)

This commit is contained in:
Ken Jin 2024-02-16 22:59:43 +08:00 committed by GitHub
parent 144eb5605b
commit f92857a930
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 59 additions and 132 deletions

View file

@ -588,16 +588,17 @@ remove_globals(_PyInterpreterFrame *frame, _PyUOpInstruction *buffer,
INST->oparg = ARG; \
INST->operand = OPERAND;
#define OUT_OF_SPACE_IF_NULL(EXPR) \
do { \
if ((EXPR) == NULL) { \
goto out_of_space; \
} \
} while (0);
#define _LOAD_ATTR_NOT_NULL \
do { \
attr = sym_new_known_notnull(ctx); \
if (attr == NULL) { \
goto error; \
} \
null = sym_new_null(ctx); \
if (null == NULL) { \
goto error; \
} \
OUT_OF_SPACE_IF_NULL(attr = sym_new_known_notnull(ctx)); \
OUT_OF_SPACE_IF_NULL(null = sym_new_null(ctx)); \
} while (0);