1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 20:27:34 +00:00

LibJS: Move [[BoundThis]] and [[BoundArguments]] to BoundFunction

This commit is contained in:
Linus Groh 2021-09-25 00:38:23 +02:00
parent 4566472ed6
commit 9043041dd3
7 changed files with 31 additions and 39 deletions

View file

@ -25,10 +25,6 @@ public:
BoundFunction* bind(Value bound_this_value, Vector<Value> arguments);
Value bound_this() const { return m_bound_this; }
const Vector<Value>& bound_arguments() const { return m_bound_arguments; }
virtual bool is_strict_mode() const { return false; }
// [[Environment]]
@ -40,15 +36,10 @@ public:
virtual Realm* realm() const { return nullptr; }
protected:
virtual void visit_edges(Visitor&) override;
explicit FunctionObject(Object& prototype);
FunctionObject(Value bound_this, Vector<Value> bound_arguments, Object& prototype);
private:
virtual bool is_function() const override { return true; }
Value m_bound_this;
Vector<Value> m_bound_arguments;
};
}