1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +00:00

LibJS: Rename Function => FunctionObject

This commit is contained in:
Andreas Kling 2021-06-27 21:48:34 +02:00
parent e389ae3c97
commit ba9d5c4d54
114 changed files with 263 additions and 262 deletions

View file

@ -8,12 +8,12 @@
#include <LibJS/AST.h>
#include <LibJS/Bytecode/Generator.h>
#include <LibJS/Runtime/Function.h>
#include <LibJS/Runtime/FunctionObject.h>
namespace JS {
class ScriptFunction final : public Function {
JS_OBJECT(ScriptFunction, Function);
class ScriptFunction final : public FunctionObject {
JS_OBJECT(ScriptFunction, FunctionObject);
public:
static ScriptFunction* create(GlobalObject&, const FlyString& name, const Statement& body, Vector<FunctionNode::Parameter> parameters, i32 m_function_length, EnvironmentRecord* parent_scope, FunctionKind, bool is_strict, bool is_arrow_function = false);
@ -26,7 +26,7 @@ public:
const Vector<FunctionNode::Parameter>& parameters() const { return m_parameters; };
virtual Value call() override;
virtual Value construct(Function& new_target) override;
virtual Value construct(FunctionObject& new_target) override;
virtual const FlyString& name() const override { return m_name; };
void set_name(const FlyString& name) { m_name = name; };
@ -41,7 +41,7 @@ protected:
virtual bool is_strict_mode() const final { return m_is_strict; }
private:
virtual FunctionEnvironmentRecord* create_environment_record(Function&) override;
virtual FunctionEnvironmentRecord* create_environment_record(FunctionObject&) override;
virtual void visit_edges(Visitor&) override;
Value execute_function_body();