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
parent fc744e3f3f
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

@ -6,7 +6,7 @@
#pragma once
#include <AK/DeprecatedFlyString.h>
#include <AK/FlyString.h>
#include <AK/HashMap.h>
#include <AK/NonnullOwnPtr.h>
#include <AK/OwnPtr.h>
@ -60,7 +60,7 @@ public:
virtual ~Executable() override;
DeprecatedFlyString name;
FlyString name;
Vector<u8> bytecode;
Vector<PropertyLookupCache> property_lookup_caches;
Vector<GlobalVariableCache> global_variable_caches;
@ -85,15 +85,15 @@ public:
HashMap<size_t, SourceRecord> source_map;
Vector<DeprecatedFlyString> local_variable_names;
Vector<FlyString> local_variable_names;
size_t local_index_base { 0 };
Optional<IdentifierTableIndex> length_identifier;
ByteString const& get_string(StringTableIndex index) const { return string_table->get(index); }
DeprecatedFlyString const& get_identifier(IdentifierTableIndex index) const { return identifier_table->get(index); }
String const& get_string(StringTableIndex index) const { return string_table->get(index); }
FlyString const& get_identifier(IdentifierTableIndex index) const { return identifier_table->get(index); }
Optional<DeprecatedFlyString const&> get_identifier(Optional<IdentifierTableIndex> const& index) const
Optional<FlyString const&> get_identifier(Optional<IdentifierTableIndex> const& index) const
{
if (!index.has_value())
return {};