1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:48: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:
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

@ -40,7 +40,6 @@ namespace JS {
Interpreter::Interpreter()
: m_heap(*this)
{
m_empty_object_shape = heap().allocate<Shape>();
}
Interpreter::~Interpreter()
@ -161,7 +160,6 @@ Optional<Value> Interpreter::get_variable(const FlyString& name)
void Interpreter::gather_roots(Badge<Heap>, HashTable<Cell*>& roots)
{
roots.set(m_empty_object_shape);
roots.set(m_global_object);
roots.set(m_exception);