mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
gh-105481: add flags to each instr in the opcode metadata table, to replace opcode.hasarg/hasname/hasconst (#105482)
This commit is contained in:
parent
2211454fe2
commit
be2779c0cb
6 changed files with 681 additions and 625 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue