LibJS: Use FlyString in PropertyKey instead of DeprecatedFlyString

This required dealing with *substantial* fallout.
This commit is contained in:
Andreas Kling 2025-03-18 18:08:02 -05:00 committed by Andreas Kling
commit 46a5710238
Notes: github-actions[bot] 2025-03-24 22:28:26 +00:00
110 changed files with 985 additions and 987 deletions

View file

@ -13,15 +13,15 @@ namespace JS {
GC_DEFINE_ALLOCATOR(ModuleNamespaceObject);
ModuleNamespaceObject::ModuleNamespaceObject(Realm& realm, Module* module, Vector<DeprecatedFlyString> exports)
ModuleNamespaceObject::ModuleNamespaceObject(Realm& realm, Module* module, Vector<FlyString> exports)
: Object(ConstructWithPrototypeTag::Tag, realm.intrinsics().object_prototype(), MayInterfereWithIndexedPropertyAccess::Yes)
, m_module(module)
, m_exports(move(exports))
{
// Note: We just perform step 6 of 10.4.6.12 ModuleNamespaceCreate ( module, exports ), https://tc39.es/ecma262/#sec-modulenamespacecreate
// 6. Let sortedExports be a List whose elements are the elements of exports ordered as if an Array of the same values had been sorted using %Array.prototype.sort% using undefined as comparefn.
quick_sort(m_exports, [&](DeprecatedFlyString const& lhs, DeprecatedFlyString const& rhs) {
return lhs.view() < rhs.view();
quick_sort(m_exports, [&](FlyString const& lhs, FlyString const& rhs) {
return lhs.bytes_as_string_view() < rhs.bytes_as_string_view();
});
}