LibJS/Bytecode: Emit do...while body before test in codegen

This makes the code flow naturally and allows jump elision to work.
This commit is contained in:
Andreas Kling 2024-05-06 13:38:08 +02:00
parent 68507b7e55
commit 9cbf17f181
Notes: sideshowbarker 2024-07-16 20:12:13 +09:00

View file

@ -787,8 +787,8 @@ Bytecode::CodeGenerationErrorOr<Optional<Bytecode::Operand>> DoWhileStatement::g
// body
// jump always (true) test
// end
auto& test_block = generator.make_block();
auto& body_block = generator.make_block();
auto& test_block = generator.make_block();
auto& load_result_and_jump_to_end_block = generator.make_block();
auto& end_block = generator.make_block();