mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +00:00
LibJS: Rename Function => FunctionObject
This commit is contained in:
parent
e389ae3c97
commit
ba9d5c4d54
114 changed files with 263 additions and 262 deletions
|
@ -6,23 +6,23 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/Function.h>
|
||||
#include <LibJS/Runtime/FunctionObject.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
class BoundFunction final : public Function {
|
||||
JS_OBJECT(BoundFunction, Function);
|
||||
class BoundFunction final : public FunctionObject {
|
||||
JS_OBJECT(BoundFunction, FunctionObject);
|
||||
|
||||
public:
|
||||
BoundFunction(GlobalObject&, Function& target_function, Value bound_this, Vector<Value> arguments, i32 length, Object* constructor_prototype);
|
||||
BoundFunction(GlobalObject&, FunctionObject& target_function, Value bound_this, Vector<Value> arguments, i32 length, Object* constructor_prototype);
|
||||
virtual void initialize(GlobalObject&) override;
|
||||
virtual ~BoundFunction();
|
||||
|
||||
virtual Value call() override;
|
||||
|
||||
virtual Value construct(Function& new_target) override;
|
||||
virtual Value construct(FunctionObject& new_target) override;
|
||||
|
||||
virtual FunctionEnvironmentRecord* create_environment_record(Function&) override;
|
||||
virtual FunctionEnvironmentRecord* create_environment_record(FunctionObject&) override;
|
||||
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
|
@ -31,7 +31,7 @@ public:
|
|||
return m_name;
|
||||
}
|
||||
|
||||
Function& target_function() const
|
||||
FunctionObject& target_function() const
|
||||
{
|
||||
return *m_target_function;
|
||||
}
|
||||
|
@ -39,8 +39,8 @@ public:
|
|||
virtual bool is_strict_mode() const override { return m_target_function->is_strict_mode(); }
|
||||
|
||||
private:
|
||||
Function* m_target_function = nullptr;
|
||||
Object* m_constructor_prototype = nullptr;
|
||||
FunctionObject* m_target_function { nullptr };
|
||||
Object* m_constructor_prototype { nullptr };
|
||||
FlyString m_name;
|
||||
i32 m_length { 0 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue