mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
Revert "Everywhere: Remove DeprecatedFlyString + any remaining references to it"
This reverts commit 3131e6369f
.
Greatly regressed JavaScript benchmark performance.
This commit is contained in:
parent
45905d6f7b
commit
7c32d1e8a5
Notes:
github-actions[bot]
2025-04-01 13:43:40 +00:00
Author: https://github.com/awesomekling
Commit: 7c32d1e8a5
23 changed files with 298 additions and 13 deletions
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/Singleton.h>
|
||||
|
@ -119,6 +120,16 @@ size_t FlyString::number_of_fly_strings()
|
|||
return all_fly_strings().size();
|
||||
}
|
||||
|
||||
DeprecatedFlyString FlyString::to_deprecated_fly_string() const
|
||||
{
|
||||
return DeprecatedFlyString(bytes_as_string_view());
|
||||
}
|
||||
|
||||
ErrorOr<FlyString> FlyString::from_deprecated_fly_string(DeprecatedFlyString const& deprecated_fly_string)
|
||||
{
|
||||
return FlyString::from_utf8(deprecated_fly_string.view());
|
||||
}
|
||||
|
||||
unsigned Traits<FlyString>::hash(FlyString const& fly_string)
|
||||
{
|
||||
return fly_string.hash();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue