From 1f9706327be23279f1c0c95090845b024cd93c91 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 25 Jun 2023 16:24:05 +0200 Subject: [PATCH] LibJS/Bytecode: Handle object destructuring to member expression 19 new passes on test262. :^) --- Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp index 3ae5528a20b0f5..bd40d27f66b49c 100644 --- a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp +++ b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp @@ -1081,6 +1081,8 @@ static Bytecode::CodeGenerationErrorOr generate_object_binding_pattern_byt if (create_variables) generator.emit(identifier_ref, Bytecode::Op::EnvironmentMode::Lexical, false); generator.emit(identifier_ref, initialization_mode); + } else if (alias.has>()) { + TRY(generator.emit_store_to_reference(alias.get>())); } else { auto& identifier = alias.get>()->string(); auto identifier_ref = generator.intern_identifier(identifier);