mirror of
https://github.com/RGBCube/serenity
synced 2025-06-28 17:02:12 +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:
parent
75f6454de7
commit
3072f9fd82
5 changed files with 13 additions and 7 deletions
|
@ -72,6 +72,7 @@ GlobalObject::GlobalObject()
|
|||
void GlobalObject::initialize()
|
||||
{
|
||||
// These are done first since other prototypes depend on their presence.
|
||||
m_empty_object_shape = heap().allocate<Shape>();
|
||||
m_object_prototype = heap().allocate<ObjectPrototype>();
|
||||
m_function_prototype = heap().allocate<FunctionPrototype>();
|
||||
|
||||
|
@ -119,6 +120,8 @@ void GlobalObject::visit_children(Visitor& visitor)
|
|||
{
|
||||
Object::visit_children(visitor);
|
||||
|
||||
visitor.visit(m_empty_object_shape);
|
||||
|
||||
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \
|
||||
visitor.visit(m_##snake_name##_constructor);
|
||||
JS_ENUMERATE_ERROR_SUBCLASSES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue