mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 14:50:18 +00:00
LibJS/Bytecode: Handle object destructuring to member expression
19 new passes on test262. :^)
This commit is contained in:
parent
7005a91a1e
commit
6f0952c358
Notes:
sideshowbarker
2024-07-17 03:10:07 +09:00
Author: https://github.com/awesomekling
Commit: 6f0952c358
Pull-request: https://github.com/SerenityOS/serenity/pull/19631
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue