From 6404f6db577eef3c863c0c8e3552459a439b846b Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Thu, 22 May 2025 02:14:53 +0300 Subject: [PATCH] LibJS: Delete unused `Shape::create_for_prototype()` --- Libraries/LibJS/Runtime/Shape.cpp | 10 ---------- Libraries/LibJS/Runtime/Shape.h | 1 - 2 files changed, 11 deletions(-) diff --git a/Libraries/LibJS/Runtime/Shape.cpp b/Libraries/LibJS/Runtime/Shape.cpp index 88e2a9d3ab3..4da87347a55 100644 --- a/Libraries/LibJS/Runtime/Shape.cpp +++ b/Libraries/LibJS/Runtime/Shape.cpp @@ -315,16 +315,6 @@ void Shape::remove_property_without_transition(PropertyKey const& property_key, } } -GC::Ref Shape::create_for_prototype(GC::Ref realm, GC::Ptr prototype) -{ - auto new_shape = realm->heap().allocate(realm); - s_all_prototype_shapes.set(new_shape); - new_shape->m_is_prototype_shape = true; - new_shape->m_prototype = prototype; - new_shape->m_prototype_chain_validity = realm->heap().allocate(); - return new_shape; -} - GC::Ref Shape::clone_for_prototype() { VERIFY(!m_is_prototype_shape); diff --git a/Libraries/LibJS/Runtime/Shape.h b/Libraries/LibJS/Runtime/Shape.h index 2c3f94f054a..c8fc44b8795 100644 --- a/Libraries/LibJS/Runtime/Shape.h +++ b/Libraries/LibJS/Runtime/Shape.h @@ -73,7 +73,6 @@ public: [[nodiscard]] GC::Ref create_cacheable_dictionary_transition(); [[nodiscard]] GC::Ref create_uncacheable_dictionary_transition(); [[nodiscard]] GC::Ref clone_for_prototype(); - [[nodiscard]] static GC::Ref create_for_prototype(GC::Ref, GC::Ptr prototype); void add_property_without_transition(PropertyKey const&, PropertyAttributes);