mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibJS/Bytecode: Make sure empty with
statement results in undefined
2 new passes on test262. :^)
This commit is contained in:
parent
8ba4036bba
commit
bd2c3ace68
Notes:
sideshowbarker
2024-07-17 20:19:08 +09:00
Author: https://github.com/awesomekling
Commit: bd2c3ace68
Pull-request: https://github.com/SerenityOS/serenity/pull/19745
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue