gh-105481: add flags to each instr in the opcode metadata table, to replace opcode.hasarg/hasname/hasconst (#105482)

This commit is contained in:
Irit Katriel 2023-06-13 21:42:03 +01:00 committed by GitHub
parent 2211454fe2
commit be2779c0cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 681 additions and 625 deletions

View file

@ -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));