mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37:45 +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,29 +7,29 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/Function.h>
|
||||
#include <LibJS/Runtime/FunctionObject.h>
|
||||
#include <LibJS/Runtime/VM.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
class Accessor final : public Cell {
|
||||
public:
|
||||
static Accessor* create(VM& vm, Function* getter, Function* setter)
|
||||
static Accessor* create(VM& vm, FunctionObject* getter, FunctionObject* setter)
|
||||
{
|
||||
return vm.heap().allocate_without_global_object<Accessor>(getter, setter);
|
||||
}
|
||||
|
||||
Accessor(Function* getter, Function* setter)
|
||||
Accessor(FunctionObject* getter, FunctionObject* setter)
|
||||
: m_getter(getter)
|
||||
, m_setter(setter)
|
||||
{
|
||||
}
|
||||
|
||||
Function* getter() const { return m_getter; }
|
||||
void set_getter(Function* getter) { m_getter = getter; }
|
||||
FunctionObject* getter() const { return m_getter; }
|
||||
void set_getter(FunctionObject* getter) { m_getter = getter; }
|
||||
|
||||
Function* setter() const { return m_setter; }
|
||||
void set_setter(Function* setter) { m_setter = setter; }
|
||||
FunctionObject* setter() const { return m_setter; }
|
||||
void set_setter(FunctionObject* setter) { m_setter = setter; }
|
||||
|
||||
Value call_getter(Value this_value)
|
||||
{
|
||||
|
@ -55,8 +55,8 @@ public:
|
|||
private:
|
||||
const char* class_name() const override { return "Accessor"; };
|
||||
|
||||
Function* m_getter { nullptr };
|
||||
Function* m_setter { nullptr };
|
||||
FunctionObject* m_getter { nullptr };
|
||||
FunctionObject* m_setter { nullptr };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue