mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
LibJS/Bytecode: Put end block last in for statement codegen
This commit is contained in:
@@ -851,8 +851,6 @@ Bytecode::CodeGenerationErrorOr<Optional<Bytecode::Operand>> ForStatement::gener
|
||||
Bytecode::BasicBlock* body_block_ptr { nullptr };
|
||||
Bytecode::BasicBlock* update_block_ptr { nullptr };
|
||||
|
||||
auto& end_block = generator.make_block();
|
||||
|
||||
bool has_lexical_environment = false;
|
||||
|
||||
if (m_init) {
|
||||
@@ -897,6 +895,8 @@ Bytecode::CodeGenerationErrorOr<Optional<Bytecode::Operand>> ForStatement::gener
|
||||
else
|
||||
test_block_ptr = body_block_ptr;
|
||||
|
||||
auto& end_block = generator.make_block();
|
||||
|
||||
generator.emit<Bytecode::Op::Jump>(Bytecode::Label { *test_block_ptr });
|
||||
|
||||
if (m_test) {
|
||||
|
||||
Reference in New Issue
Block a user