bpo-45152: Add HAS_CONST macro and get_const_value() function and use… (#28262)

This commit is contained in:
Irit Katriel 2021-09-14 09:53:32 +01:00 • committed by GitHub
parent 9f93018b69
commit c2f1e95337
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 7 deletions

4
Include/opcode.h generated
View file

@ -190,6 +190,10 @@ static uint32_t _PyOpcode_Jump[8] = {
};
#endif /* OPCODE_TABLES */
#define HAS_CONST(op) (false\
|| ((op) == 100) \
)
#define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)
/* Reserve some bytecodes for internal use in the compiler.