mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
gh-112519: Make it possible to specify instruction flags for pseudo instructions in bytecodes.c (#112520)
This commit is contained in:
parent
7eeea13403
commit
07ebd46f9e
6 changed files with 76 additions and 12 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue