gh-112519: Make it possible to specify instruction flags for pseudo instructions in bytecodes.c (#112520)

This commit is contained in:
Irit Katriel 2023-11-30 11:03:30 +00:00 committed by GitHub
parent 7eeea13403
commit 07ebd46f9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 76 additions and 12 deletions

View file

@ -97,6 +97,7 @@ static const jump_target_label NO_LABEL = {-1};
static inline int
is_block_push(cfg_instr *i)
{
assert(OPCODE_HAS_ARG(i->i_opcode) || !IS_BLOCK_PUSH_OPCODE(i->i_opcode));
return IS_BLOCK_PUSH_OPCODE(i->i_opcode);
}
@ -2239,7 +2240,6 @@ convert_pseudo_ops(basicblock *entryblock)
for (int i = 0; i < b->b_iused; i++) {
cfg_instr *instr = &b->b_instr[i];
if (is_block_push(instr) || instr->i_opcode == POP_BLOCK) {
assert(SAME_OPCODE_METADATA(instr->i_opcode, NOP));
INSTR_SET_OP0(instr, NOP);
}
else if (instr->i_opcode == LOAD_CLOSURE) {