mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +00:00
LibJS: Store the %Array.prototype.values% intrinsic on the global object
Also group the getter functions for all the additional intrinsics (not generated via macros), and initialize the members.
This commit is contained in:
parent
50472fd69f
commit
1c1354db07
3 changed files with 15 additions and 18 deletions
|
@ -36,8 +36,8 @@ public:
|
|||
// Not included in JS_ENUMERATE_NATIVE_OBJECTS due to missing distinct constructor
|
||||
GeneratorObjectPrototype* generator_object_prototype() { return m_generator_object_prototype; }
|
||||
|
||||
FunctionObject* array_prototype_values_function() const { return m_array_prototype_values_function; }
|
||||
FunctionObject* eval_function() const { return m_eval_function; }
|
||||
|
||||
FunctionObject* throw_type_error_function() const { return m_throw_type_error_function; }
|
||||
|
||||
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName, ArrayType) \
|
||||
|
@ -95,6 +95,10 @@ private:
|
|||
|
||||
GlobalEnvironment* m_environment { nullptr };
|
||||
|
||||
FunctionObject* m_array_prototype_values_function { nullptr };
|
||||
FunctionObject* m_eval_function { nullptr };
|
||||
FunctionObject* m_throw_type_error_function { nullptr };
|
||||
|
||||
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName, ArrayType) \
|
||||
ConstructorName* m_##snake_name##_constructor { nullptr }; \
|
||||
Object* m_##snake_name##_prototype { nullptr };
|
||||
|
@ -111,9 +115,6 @@ private:
|
|||
Object* m_##snake_name##_prototype { nullptr };
|
||||
JS_ENUMERATE_ITERATOR_PROTOTYPES
|
||||
#undef __JS_ENUMERATE
|
||||
|
||||
FunctionObject* m_eval_function;
|
||||
FunctionObject* m_throw_type_error_function;
|
||||
};
|
||||
|
||||
template<typename ConstructorType>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue