mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +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
|
@ -958,6 +958,19 @@ public:
|
|||
void replace_references_impl(Register, Register) { }
|
||||
};
|
||||
|
||||
class ThrowIfNullish final : public Instruction {
|
||||
public:
|
||||
ThrowIfNullish()
|
||||
: Instruction(Type::ThrowIfNullish)
|
||||
{
|
||||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
void replace_references_impl(BasicBlock const&, BasicBlock const&) { }
|
||||
void replace_references_impl(Register, Register) { }
|
||||
};
|
||||
|
||||
class EnterUnwindContext final : public Instruction {
|
||||
public:
|
||||
constexpr static bool IsTerminator = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue