mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibJS: Rename Function => FunctionObject
This commit is contained in:
parent
e389ae3c97
commit
ba9d5c4d54
114 changed files with 263 additions and 262 deletions
|
@ -7,12 +7,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Function.h>
|
||||
#include <LibJS/Runtime/Function.h>
|
||||
#include <LibJS/Runtime/FunctionObject.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
class NativeFunction : public Function {
|
||||
JS_OBJECT(NativeFunction, Function);
|
||||
class NativeFunction : public FunctionObject {
|
||||
JS_OBJECT(NativeFunction, FunctionObject);
|
||||
|
||||
public:
|
||||
static NativeFunction* create(GlobalObject&, const FlyString& name, AK::Function<Value(VM&, GlobalObject&)>);
|
||||
|
@ -22,7 +22,7 @@ public:
|
|||
virtual ~NativeFunction() override;
|
||||
|
||||
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; };
|
||||
virtual bool has_constructor() const { return false; }
|
||||
|
@ -34,7 +34,7 @@ protected:
|
|||
explicit NativeFunction(Object& prototype);
|
||||
|
||||
private:
|
||||
virtual FunctionEnvironmentRecord* create_environment_record(Function&) override final;
|
||||
virtual FunctionEnvironmentRecord* create_environment_record(FunctionObject&) override final;
|
||||
virtual bool is_native_function() const final { return true; }
|
||||
|
||||
FlyString m_name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue