gh-105481: add HAS_JUMP flag to opcode metadata (#105791)
This commit is contained in:
@@ -248,8 +248,11 @@ instr_sequence_use_label(instr_sequence *seq, int lbl) {
|
||||
static int
|
||||
instr_sequence_addop(instr_sequence *seq, int opcode, int oparg, location loc)
|
||||
{
|
||||
/* compare old and new opcode macros - use ! to compare as bools. */
|
||||
assert(!HAS_ARG(opcode) == !OPCODE_HAS_ARG(opcode));
|
||||
assert(!HAS_CONST(opcode) == !OPCODE_HAS_CONST(opcode));
|
||||
assert(!OPCODE_HAS_JUMP(opcode) == !OPCODE_HAS_JUMP(opcode));
|
||||
|
||||
assert(0 <= opcode && opcode <= MAX_OPCODE);
|
||||
assert(IS_PSEUDO_OPCODE(opcode) == IS_PSEUDO_INSTR(opcode));
|
||||
assert(IS_WITHIN_OPCODE_RANGE(opcode));
|
||||
@@ -1114,7 +1117,7 @@ codegen_addop_j(instr_sequence *seq, location loc,
|
||||
int opcode, jump_target_label target)
|
||||
{
|
||||
assert(IS_LABEL(target));
|
||||
assert(IS_JUMP_OPCODE(opcode) || IS_BLOCK_PUSH_OPCODE(opcode));
|
||||
assert(OPCODE_HAS_JUMP(opcode) || IS_BLOCK_PUSH_OPCODE(opcode));
|
||||
assert(!IS_ASSEMBLER_OPCODE(opcode));
|
||||
return instr_sequence_addop(seq, opcode, target.id, loc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user