mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte string. As the null state has already been removed, there are no other particularly hairy blockers in repurposing this type as a byte string (what it _really_ is). This commit is auto-generated: $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \ Meta Ports Ladybird Tests Kernel) $ perl -pie 's/\bDeprecatedString\b/ByteString/g; s/deprecated_string/byte_string/g' $xs $ clang-format --style=file -i \ $(git diff --name-only | grep \.cpp\|\.h) $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -16,12 +16,12 @@ namespace JS {
|
|||
ThrowCompletionOr<NonnullGCPtr<RegExpObject>> regexp_create(VM&, Value pattern, Value flags);
|
||||
ThrowCompletionOr<NonnullGCPtr<RegExpObject>> regexp_alloc(VM&, FunctionObject& new_target);
|
||||
|
||||
Result<regex::RegexOptions<ECMAScriptFlags>, DeprecatedString> regex_flags_from_string(StringView flags);
|
||||
Result<regex::RegexOptions<ECMAScriptFlags>, ByteString> regex_flags_from_string(StringView flags);
|
||||
struct ParseRegexPatternError {
|
||||
DeprecatedString error;
|
||||
ByteString error;
|
||||
};
|
||||
ErrorOr<DeprecatedString, ParseRegexPatternError> parse_regex_pattern(StringView pattern, bool unicode, bool unicode_sets);
|
||||
ThrowCompletionOr<DeprecatedString> parse_regex_pattern(VM& vm, StringView pattern, bool unicode, bool unicode_sets);
|
||||
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);
|
||||
|
||||
class RegExpObject : public Object {
|
||||
JS_OBJECT(RegExpObject, Object);
|
||||
|
@ -38,16 +38,16 @@ public:
|
|||
};
|
||||
|
||||
static NonnullGCPtr<RegExpObject> create(Realm&);
|
||||
static NonnullGCPtr<RegExpObject> create(Realm&, Regex<ECMA262> regex, DeprecatedString pattern, DeprecatedString flags);
|
||||
static NonnullGCPtr<RegExpObject> create(Realm&, Regex<ECMA262> regex, ByteString pattern, ByteString flags);
|
||||
|
||||
ThrowCompletionOr<NonnullGCPtr<RegExpObject>> regexp_initialize(VM&, Value pattern, Value flags);
|
||||
DeprecatedString escape_regexp_pattern() const;
|
||||
ByteString escape_regexp_pattern() const;
|
||||
|
||||
virtual void initialize(Realm&) override;
|
||||
virtual ~RegExpObject() override = default;
|
||||
|
||||
DeprecatedString const& pattern() const { return m_pattern; }
|
||||
DeprecatedString const& flags() const { return m_flags; }
|
||||
ByteString const& pattern() const { return m_pattern; }
|
||||
ByteString const& flags() const { return m_flags; }
|
||||
Regex<ECMA262> const& regex() { return *m_regex; }
|
||||
Regex<ECMA262> const& regex() const { return *m_regex; }
|
||||
Realm& realm() { return *m_realm; }
|
||||
|
@ -58,10 +58,10 @@ public:
|
|||
|
||||
private:
|
||||
RegExpObject(Object& prototype);
|
||||
RegExpObject(Regex<ECMA262> regex, DeprecatedString pattern, DeprecatedString flags, Object& prototype);
|
||||
RegExpObject(Regex<ECMA262> regex, ByteString pattern, ByteString flags, Object& prototype);
|
||||
|
||||
DeprecatedString m_pattern;
|
||||
DeprecatedString m_flags;
|
||||
ByteString m_pattern;
|
||||
ByteString m_flags;
|
||||
bool m_legacy_features_enabled { false }; // [[LegacyFeaturesEnabled]]
|
||||
// Note: This is initialized in RegExpAlloc, but will be non-null afterwards
|
||||
GCPtr<Realm> m_realm; // [[Realm]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue