mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
LibJS: Move [[BoundThis]] and [[BoundArguments]] to BoundFunction
This commit is contained in:
parent
4566472ed6
commit
9043041dd3
Notes:
sideshowbarker
2024-07-18 03:27:54 +09:00
Author: https://github.com/linusg
Commit: 9043041dd3
Pull-request: https://github.com/SerenityOS/serenity/pull/10203
Reviewed-by: https://github.com/IdanHo ✅
Reviewed-by: https://github.com/davidot
7 changed files with 31 additions and 39 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue