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

LibJS: Move the empty object shape from Interpreter to GlobalObject

The big remaining hurdle before a GlobalObject-agnostic Interpreter is
the fact that Interpreter owns and vends the GlobalObject :^)
This commit is contained in:
Andreas Kling 2020-04-18 13:56:13 +02:00
parent 75f6454de7
commit 3072f9fd82
5 changed files with 13 additions and 7 deletions

View file

@ -37,6 +37,8 @@ public:
virtual ~GlobalObject() override;
Shape* empty_object_shape() { return m_empty_object_shape; }
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \
ConstructorName* snake_name##_constructor() { return m_##snake_name##_constructor; } \
Object* snake_name##_prototype() { return m_##snake_name##_prototype; }
@ -55,6 +57,8 @@ private:
template<typename ConstructorType>
void add_constructor(const FlyString& property_name, ConstructorType*&, Object& prototype);
Shape* m_empty_object_shape { nullptr };
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \
ConstructorName* m_##snake_name##_constructor { nullptr }; \
Object* m_##snake_name##_prototype { nullptr };