mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Use FlyString in PropertyKey instead of DeprecatedFlyString
This required dealing with *substantial* fallout.
This commit is contained in:
parent
fc744e3f3f
commit
46a5710238
Notes:
github-actions[bot]
2025-03-24 22:28:26 +00:00
Author: https://github.com/awesomekling
Commit: 46a5710238
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4067
Reviewed-by: https://github.com/trflynn89
110 changed files with 985 additions and 987 deletions
|
@ -18,12 +18,12 @@ namespace JS {
|
|||
ThrowCompletionOr<GC::Ref<RegExpObject>> regexp_create(VM&, Value pattern, Value flags);
|
||||
ThrowCompletionOr<GC::Ref<RegExpObject>> regexp_alloc(VM&, FunctionObject& new_target);
|
||||
|
||||
Result<regex::RegexOptions<ECMAScriptFlags>, ByteString> regex_flags_from_string(StringView flags);
|
||||
Result<regex::RegexOptions<ECMAScriptFlags>, String> regex_flags_from_string(StringView flags);
|
||||
struct ParseRegexPatternError {
|
||||
ByteString error;
|
||||
String error;
|
||||
};
|
||||
ErrorOr<ByteString, ParseRegexPatternError> parse_regex_pattern(StringView pattern, bool unicode, bool unicode_sets);
|
||||
ThrowCompletionOr<ByteString> parse_regex_pattern(VM& vm, StringView pattern, bool unicode, bool unicode_sets);
|
||||
ErrorOr<String, ParseRegexPatternError> parse_regex_pattern(StringView pattern, bool unicode, bool unicode_sets);
|
||||
ThrowCompletionOr<String> parse_regex_pattern(VM& vm, StringView pattern, bool unicode, bool unicode_sets);
|
||||
|
||||
class RegExpObject : public Object {
|
||||
JS_OBJECT(RegExpObject, Object);
|
||||
|
@ -51,16 +51,16 @@ public:
|
|||
};
|
||||
|
||||
static GC::Ref<RegExpObject> create(Realm&);
|
||||
static GC::Ref<RegExpObject> create(Realm&, Regex<ECMA262> regex, ByteString pattern, ByteString flags);
|
||||
static GC::Ref<RegExpObject> create(Realm&, Regex<ECMA262> regex, String pattern, String flags);
|
||||
|
||||
ThrowCompletionOr<GC::Ref<RegExpObject>> regexp_initialize(VM&, Value pattern, Value flags);
|
||||
ByteString escape_regexp_pattern() const;
|
||||
String escape_regexp_pattern() const;
|
||||
|
||||
virtual void initialize(Realm&) override;
|
||||
virtual ~RegExpObject() override = default;
|
||||
|
||||
ByteString const& pattern() const { return m_pattern; }
|
||||
ByteString const& flags() const { return m_flags; }
|
||||
String const& pattern() const { return m_pattern; }
|
||||
String const& flags() const { return m_flags; }
|
||||
Flags flag_bits() const { return m_flag_bits; }
|
||||
Regex<ECMA262> const& regex() { return *m_regex; }
|
||||
Regex<ECMA262> const& regex() const { return *m_regex; }
|
||||
|
@ -72,12 +72,12 @@ public:
|
|||
|
||||
private:
|
||||
RegExpObject(Object& prototype);
|
||||
RegExpObject(Regex<ECMA262> regex, ByteString pattern, ByteString flags, Object& prototype);
|
||||
RegExpObject(Regex<ECMA262> regex, String pattern, String flags, Object& prototype);
|
||||
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
ByteString m_pattern;
|
||||
ByteString m_flags;
|
||||
String m_pattern;
|
||||
String m_flags;
|
||||
Flags m_flag_bits { 0 };
|
||||
bool m_legacy_features_enabled { false }; // [[LegacyFeaturesEnabled]]
|
||||
// Note: This is initialized in RegExpAlloc, but will be non-null afterwards
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue