Skip to content

Commit

Permalink
LibJS/Bytecode: Clear accumulator before entering for body
Browse files Browse the repository at this point in the history
2 new passes on test262. :^)
  • Loading branch information
awesomekling committed Jul 5, 2023
1 parent 7e3a78c commit 0801691
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ Bytecode::CodeGenerationErrorOr<void> ForStatement::generate_labelled_evaluation
generator.switch_to_basic_block(*body_block_ptr);
generator.begin_continuable_scope(Bytecode::Label { m_update ? *update_block_ptr : *test_block_ptr }, label_set);
generator.begin_breakable_scope(Bytecode::Label { end_block }, label_set);
generator.emit<Bytecode::Op::LoadImmediate>(js_undefined());
TRY(m_body->generate_bytecode(generator));
generator.end_breakable_scope();
generator.end_continuable_scope();
Expand Down

0 comments on commit 0801691

Please sign in to comment.