LibJS: Use premade shape when creating mapped arguments objects

Knocks out a 0.4% profile item on Speedometer 3.
This commit is contained in:
Andreas Kling 2025-04-18 18:11:10 +02:00 committed by Andreas Kling
parent ed5ad267c7
commit e0b32b1863
Notes: github-actions[bot] 2025-04-18 23:14:55 +00:00
4 changed files with 25 additions and 5 deletions

View file

@ -13,7 +13,7 @@ namespace JS {
GC_DEFINE_ALLOCATOR(ArgumentsObject);
ArgumentsObject::ArgumentsObject(Realm& realm, Environment& environment)
: Object(ConstructWithPrototypeTag::Tag, realm.intrinsics().object_prototype(), MayInterfereWithIndexedPropertyAccess::Yes)
: Object(realm.intrinsics().mapped_arguments_object_shape(), MayInterfereWithIndexedPropertyAccess::Yes)
, m_environment(environment)
{
}