|
@@ -40,12 +40,27 @@ public:
|
|
|
virtual const FlyString& name() const = 0;
|
|
|
virtual LexicalEnvironment* create_environment() = 0;
|
|
|
|
|
|
+ virtual void visit_children(Visitor&) override;
|
|
|
+
|
|
|
+ Optional<Value> bound_this() const
|
|
|
+ {
|
|
|
+ return m_bound_this;
|
|
|
+ }
|
|
|
+
|
|
|
+ const Vector<Value>& bound_arguments() const
|
|
|
+ {
|
|
|
+ return m_bound_arguments;
|
|
|
+ }
|
|
|
+
|
|
|
protected:
|
|
|
explicit Function(Object& prototype);
|
|
|
+ explicit Function(Object& prototype, Optional<Value> bound_this, Vector<Value> bound_arguments);
|
|
|
virtual const char* class_name() const override { return "Function"; }
|
|
|
|
|
|
private:
|
|
|
virtual bool is_function() const final { return true; }
|
|
|
+ Optional<Value> m_bound_this;
|
|
|
+ Vector<Value> m_bound_arguments;
|
|
|
};
|
|
|
|
|
|
}
|