mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:37:45 +00:00
LibJS: Add a NewObject bytecode instruction for ObjectExpression :^)
This commit is contained in:
parent
f2863b5a89
commit
bea6e31ddc
4 changed files with 38 additions and 0 deletions
|
@ -125,6 +125,21 @@ private:
|
|||
String m_string;
|
||||
};
|
||||
|
||||
class NewObject final : public Instruction {
|
||||
public:
|
||||
explicit NewObject(Register dst)
|
||||
: m_dst(dst)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~NewObject() override { }
|
||||
virtual void execute(Bytecode::Interpreter&) const override;
|
||||
virtual String to_string() const override;
|
||||
|
||||
private:
|
||||
Register m_dst;
|
||||
};
|
||||
|
||||
class SetVariable final : public Instruction {
|
||||
public:
|
||||
SetVariable(FlyString identifier, Register src)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue