mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-01 13:44:21 +00:00
LibWasm: Make loops work
This commit should hopefully allow for `loop.wast` to be run in CI. (cherry picked from commit 6ca6fd248a14ab394f11131c3df029b486952d54)
This commit is contained in:
parent
1c86b8146a
commit
f6d7702411
|
@ -79,7 +79,7 @@ void BytecodeInterpreter::branch_to_label(Configuration& configuration, LabelInd
|
|||
configuration.stack().pop();
|
||||
}
|
||||
|
||||
for (auto& result : results)
|
||||
for (auto& result : results.in_reverse())
|
||||
configuration.stack().push(move(result));
|
||||
|
||||
configuration.ip() = label->continuation();
|
||||
|
@ -555,7 +555,7 @@ void BytecodeInterpreter::interpret(Configuration& configuration, InstructionPoi
|
|||
break;
|
||||
case BlockType::Index: {
|
||||
auto& type = configuration.frame().module().types()[args.block_type.type_index().value()];
|
||||
arity = type.results().size();
|
||||
arity = type.parameters().size();
|
||||
parameter_count = type.parameters().size();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue