Skip to content

Commit

Permalink
LibJS/Bytecode: Handle object destructuring to member expression
Browse files Browse the repository at this point in the history
19 new passes on test262. :^)
  • Loading branch information
awesomekling committed Jun 25, 2023
1 parent 3a0f7e8 commit 1f97063
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,8 @@ static Bytecode::CodeGenerationErrorOr<void> generate_object_binding_pattern_byt
if (create_variables)
generator.emit<Bytecode::Op::CreateVariable>(identifier_ref, Bytecode::Op::EnvironmentMode::Lexical, false);
generator.emit<Bytecode::Op::SetVariable>(identifier_ref, initialization_mode);
} else if (alias.has<NonnullRefPtr<MemberExpression const>>()) {
TRY(generator.emit_store_to_reference(alias.get<NonnullRefPtr<MemberExpression const>>()));
} else {
auto& identifier = alias.get<NonnullRefPtr<Identifier const>>()->string();
auto identifier_ref = generator.intern_identifier(identifier);
Expand Down

0 comments on commit 1f97063

Please sign in to comment.