mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
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:
parent
68507b7e55
commit
9cbf17f181
Notes:
sideshowbarker
2024-07-16 20:12:13 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9cbf17f181 Pull-request: https://github.com/SerenityOS/serenity/pull/24240 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/trflynn89 ✅
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user