mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:07:36 +00:00
LibJS: Add preparation for Temporal constructors and prototypes
Add a JS_ENUMERATE_TEMPORAL_OBJECTS macro and use it to generate: - Forward declarations - CommonPropertyNames class name members - Constructor and prototype GlobalObject members, getters, visitors, and initialize_constructor() calls
This commit is contained in:
parent
7da1fcb2ef
commit
6735353b96
4 changed files with 44 additions and 0 deletions
|
@ -46,6 +46,12 @@ public:
|
|||
JS_ENUMERATE_BUILTIN_TYPES
|
||||
#undef __JS_ENUMERATE
|
||||
|
||||
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \
|
||||
Temporal::ConstructorName* temporal_##snake_name##_constructor() { return m_temporal_##snake_name##_constructor; } \
|
||||
Object* temporal_##snake_name##_prototype() { return m_temporal_##snake_name##_prototype; }
|
||||
JS_ENUMERATE_TEMPORAL_OBJECTS
|
||||
#undef __JS_ENUMERATE
|
||||
|
||||
#define __JS_ENUMERATE(ClassName, snake_name) \
|
||||
Object* snake_name##_prototype() { return m_##snake_name##_prototype; }
|
||||
JS_ENUMERATE_ITERATOR_PROTOTYPES
|
||||
|
@ -95,6 +101,12 @@ private:
|
|||
JS_ENUMERATE_BUILTIN_TYPES
|
||||
#undef __JS_ENUMERATE
|
||||
|
||||
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \
|
||||
Temporal::ConstructorName* m_temporal_##snake_name##_constructor { nullptr }; \
|
||||
Object* m_temporal_##snake_name##_prototype { nullptr };
|
||||
JS_ENUMERATE_TEMPORAL_OBJECTS
|
||||
#undef __JS_ENUMERATE
|
||||
|
||||
#define __JS_ENUMERATE(ClassName, snake_name) \
|
||||
Object* m_##snake_name##_prototype { nullptr };
|
||||
JS_ENUMERATE_ITERATOR_PROTOTYPES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue