1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00

LibJS/Bytecode: Make sure empty with statement results in undefined

2 new passes on test262. :^)
This commit is contained in:
Andreas Kling 2023-07-02 10:28:36 +02:00
parent 8ba4036bba
commit bd2c3ace68

View file

@ -2372,6 +2372,9 @@ Bytecode::CodeGenerationErrorOr<void> WithStatement::generate_bytecode(Bytecode:
// EnterObjectEnvironment sets the running execution context's lexical_environment to a new Object Environment.
generator.start_boundary(Bytecode::Generator::BlockBoundaryType::LeaveLexicalEnvironment);
generator.emit<Bytecode::Op::LoadImmediate>(js_undefined());
TRY(m_body->generate_bytecode(generator));
generator.end_boundary(Bytecode::Generator::BlockBoundaryType::LeaveLexicalEnvironment);