LibJS/Bytecode: Clear accumulator before entering while body

2 new passes on test262. :^)
This commit is contained in:
Andreas Kling 2023-07-05 14:29:12 +02:00
parent b14032bbfa
commit 24b815d4a0

View file

@ -671,6 +671,7 @@ Bytecode::CodeGenerationErrorOr<void> WhileStatement::generate_labelled_evaluati
generator.switch_to_basic_block(body_block);
generator.begin_continuable_scope(Bytecode::Label { test_block }, 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();