mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
LibJS/Bytecode: Throw on destructuring object assignment to nullish LHS
24 new passes on test262. :^)
This commit is contained in:
parent
4032bfc2fc
commit
8021048bc9
4 changed files with 30 additions and 0 deletions
|
@ -989,6 +989,8 @@ Bytecode::CodeGenerationErrorOr<void> FunctionExpression::generate_bytecode(Byte
|
|||
|
||||
static Bytecode::CodeGenerationErrorOr<void> generate_object_binding_pattern_bytecode(Bytecode::Generator& generator, BindingPattern const& pattern, Bytecode::Op::SetVariable::InitializationMode initialization_mode, Bytecode::Register const& value_reg, bool create_variables)
|
||||
{
|
||||
generator.emit<Bytecode::Op::ThrowIfNullish>();
|
||||
|
||||
Vector<Bytecode::Register> excluded_property_names;
|
||||
auto has_rest = false;
|
||||
if (pattern.entries.size() > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue