diff options
author | Linus Groh <mail@linusgroh.de> | 2021-09-25 00:38:23 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-25 17:51:30 +0200 |
commit | 9043041dd34e361d761313dcaba81f220e31b7de (patch) | |
tree | 77d1100029909d3d08c801fd7cf36f6c3da1d1d3 /Userland/Libraries/LibJS/Runtime/BoundFunction.h | |
parent | 4566472ed624bdb47ce611b15c07ce4ab10883f8 (diff) | |
download | serenity-9043041dd34e361d761313dcaba81f220e31b7de.zip |
LibJS: Move [[BoundThis]] and [[BoundArguments]] to BoundFunction
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/BoundFunction.h')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/BoundFunction.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/BoundFunction.h b/Userland/Libraries/LibJS/Runtime/BoundFunction.h index f183dd7b8b..af16ceff65 100644 --- a/Userland/Libraries/LibJS/Runtime/BoundFunction.h +++ b/Userland/Libraries/LibJS/Runtime/BoundFunction.h @@ -14,7 +14,7 @@ class BoundFunction final : public FunctionObject { JS_OBJECT(BoundFunction, FunctionObject); public: - BoundFunction(GlobalObject&, FunctionObject& target_function, Value bound_this, Vector<Value> arguments, i32 length, Object* constructor_prototype); + BoundFunction(GlobalObject&, FunctionObject& target_function, Value bound_this, Vector<Value> bound_arguments, i32 length, Object* constructor_prototype); virtual void initialize(GlobalObject&) override; virtual ~BoundFunction(); @@ -25,11 +25,15 @@ public: virtual bool is_strict_mode() const override { return m_bound_target_function->is_strict_mode(); } FunctionObject& bound_target_function() const { return *m_bound_target_function; } + Value bound_this() const { return m_bound_this; } + Vector<Value> const& bound_arguments() const { return m_bound_arguments; } private: virtual void visit_edges(Visitor&) override; FunctionObject* m_bound_target_function { nullptr }; // [[BoundTargetFunction]] + Value m_bound_this; // [[BoundThis]] + Vector<Value> m_bound_arguments; // [[BoundArguments]] Object* m_constructor_prototype { nullptr }; FlyString m_name; |