mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -32,7 +32,7 @@ void FunctionObject::set_function_name(Variant<PropertyKey, PrivateName> const&
|
|||
VERIFY(m_is_extensible);
|
||||
VERIFY(!storage_has(vm.names.name));
|
||||
|
||||
String name;
|
||||
DeprecatedString name;
|
||||
|
||||
// 2. If Type(name) is Symbol, then
|
||||
if (auto const* property_key = name_arg.get_pointer<PropertyKey>(); property_key && property_key->is_symbol()) {
|
||||
|
@ -41,10 +41,10 @@ void FunctionObject::set_function_name(Variant<PropertyKey, PrivateName> const&
|
|||
|
||||
// b. If description is undefined, set name to the empty String.
|
||||
if (!description.has_value())
|
||||
name = String::empty();
|
||||
name = DeprecatedString::empty();
|
||||
// c. Else, set name to the string-concatenation of "[", description, and "]".
|
||||
else
|
||||
name = String::formatted("[{}]", *description);
|
||||
name = DeprecatedString::formatted("[{}]", *description);
|
||||
}
|
||||
// 3. Else if name is a Private Name, then
|
||||
else if (auto const* private_name = name_arg.get_pointer<PrivateName>()) {
|
||||
|
@ -65,7 +65,7 @@ void FunctionObject::set_function_name(Variant<PropertyKey, PrivateName> const&
|
|||
// 5. If prefix is present, then
|
||||
if (prefix.has_value()) {
|
||||
// a. Set name to the string-concatenation of prefix, the code unit 0x0020 (SPACE), and name.
|
||||
name = String::formatted("{} {}", *prefix, name);
|
||||
name = DeprecatedString::formatted("{} {}", *prefix, name);
|
||||
|
||||
// b. If F has an [[InitialName]] internal slot, then
|
||||
if (is<NativeFunction>(this)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue