LibWasm: Make structured_end() jump to the instruction after itself

This commit is contained in:
Ali Mohammad Pur 2021-05-14 21:14:31 +04:30 committed by Andreas Kling
parent e9b746a723
commit 025b3349e4
Notes: sideshowbarker 2024-07-18 17:54:44 +09:00

View file

@ -303,7 +303,7 @@ ParseResult<Vector<Instruction>> Instruction::parse(InputStream& stream, Instruc
result.value().values.append(Instruction { Instructions::structured_end });
// Transform op(..., instr*) -> op(...) instr* op(end(ip))
result.value().values.prepend(Instruction { opcode, StructuredInstructionArgs { BlockType { block_type.release_value() }, ip, {} } });
result.value().values.prepend(Instruction { opcode, StructuredInstructionArgs { BlockType { block_type.release_value() }, ++ip, {} } });
return result.release_value().values;
}