mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
Revert "LibRegex: Port remaining DeprecatedFlyString to ByteString"
This reverts commit aab3fbe254
.
Greatly regressed JavaScript benchmark performance.
This commit is contained in:
parent
7c32d1e8a5
commit
e5db913b0d
Notes:
github-actions[bot]
2025-04-01 13:43:39 +00:00
Author: https://github.com/awesomekling
Commit: e5db913b0d
2 changed files with 8 additions and 7 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <AK/ByteString.h>
|
||||
#include <AK/CharacterTypes.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <AK/GenericLexer.h>
|
||||
#include <AK/ScopeGuard.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
|
@ -981,7 +982,7 @@ bool ECMA262Parser::parse_pattern(ByteCode& stack, size_t& match_length_minimum,
|
|||
return parse_disjunction(stack, match_length_minimum, flags);
|
||||
}
|
||||
|
||||
bool ECMA262Parser::has_duplicate_in_current_alternative(ByteString const& name)
|
||||
bool ECMA262Parser::has_duplicate_in_current_alternative(DeprecatedFlyString const& name)
|
||||
{
|
||||
auto it = m_parser_state.named_capture_groups.find(name);
|
||||
if (it == m_parser_state.named_capture_groups.end())
|
||||
|
@ -2502,7 +2503,7 @@ bool ECMA262Parser::parse_unicode_property_escape(PropertyEscape& property, bool
|
|||
[](Empty&) -> bool { VERIFY_NOT_REACHED(); });
|
||||
}
|
||||
|
||||
ByteString ECMA262Parser::read_capture_group_specifier(bool take_starting_angle_bracket)
|
||||
DeprecatedFlyString ECMA262Parser::read_capture_group_specifier(bool take_starting_angle_bracket)
|
||||
{
|
||||
static constexpr u32 const REPLACEMENT_CHARACTER = 0xFFFD;
|
||||
constexpr u32 const ZERO_WIDTH_NON_JOINER { 0x200C };
|
||||
|
@ -2603,7 +2604,7 @@ ByteString ECMA262Parser::read_capture_group_specifier(bool take_starting_angle_
|
|||
builder.append_code_point(code_point);
|
||||
}
|
||||
|
||||
auto name = builder.to_byte_string();
|
||||
DeprecatedFlyString name = builder.to_byte_string();
|
||||
if (!hit_end || name.is_empty())
|
||||
set_error(Error::InvalidNameForCaptureGroup);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue