LibJS: Remove some unnecessary indirection in Object constructors

This commit is contained in:
Andreas Kling 2020-09-20 19:18:05 +02:00
parent 668e73df8a
commit 976e55e942
Notes: sideshowbarker 2024-07-19 02:19:28 +09:00

View file

@ -90,12 +90,12 @@ Object* Object::create_empty(GlobalObject& global_object)
Object::Object(GlobalObjectTag)
{
// This is the global object
m_shape = interpreter().heap().allocate<Shape>(static_cast<GlobalObject&>(*this), static_cast<GlobalObject&>(*this));
m_shape = heap().allocate<Shape>(static_cast<GlobalObject&>(*this), static_cast<GlobalObject&>(*this));
}
Object::Object(ConstructWithoutPrototypeTag, GlobalObject& global_object)
{
m_shape = interpreter().heap().allocate<Shape>(global_object, global_object);
m_shape = heap().allocate<Shape>(global_object, global_object);
}
Object::Object(Object& prototype)