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

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

View file

@ -90,12 +90,12 @@ Object* Object::create_empty(GlobalObject& global_object)
Object::Object(GlobalObjectTag) Object::Object(GlobalObjectTag)
{ {
// This is the global object // 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) 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) Object::Object(Object& prototype)