diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-06-13 20:42:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 20:42:03 (GMT) |
commit | be2779c0cb54e56ea4bb9822cc7bb5c24e6a7af7 (patch) | |
tree | 4789368f885f8e144876dd680987c532eafa66cf /Python/compile.c | |
parent | 2211454fe210637ed7fabda12690dac6cc9a8149 (diff) | |
download | cpython-be2779c0cb54e56ea4bb9822cc7bb5c24e6a7af7.zip cpython-be2779c0cb54e56ea4bb9822cc7bb5c24e6a7af7.tar.gz cpython-be2779c0cb54e56ea4bb9822cc7bb5c24e6a7af7.tar.bz2 |
gh-105481: add flags to each instr in the opcode metadata table, to replace opcode.hasarg/hasname/hasconst (#105482)
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index 589d92f..399a702 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -248,6 +248,8 @@ instr_sequence_use_label(instr_sequence *seq, int lbl) { static int instr_sequence_addop(instr_sequence *seq, int opcode, int oparg, location loc) { + assert(!HAS_ARG(opcode) == !OPCODE_HAS_ARG(opcode)); + assert(!HAS_CONST(opcode) == !OPCODE_HAS_CONST(opcode)); assert(0 <= opcode && opcode <= MAX_OPCODE); assert(IS_PSEUDO_OPCODE(opcode) == IS_PSEUDO_INSTR(opcode)); assert(IS_WITHIN_OPCODE_RANGE(opcode)); |