Skip to content
Prev Previous commit
Next Next commit
enable asseertions for pseudo-ops as well
  • Loading branch information
iritkatriel committed Jun 13, 2023
commit e93f976e17397930fdae8700ea7957b49efd7655
6 changes: 2 additions & 4 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +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)
{
if (!IS_PSEUDO_OPCODE(opcode)) {
assert(!HAS_ARG(opcode) == !OPCODE_HAS_ARG(opcode));
assert(!HAS_CONST(opcode) == !OPCODE_HAS_CONST(opcode));
}
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));
Expand Down