mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +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
|
@ -579,7 +579,7 @@ ThrowCompletionOr<Value> perform_eval(VM& vm, Value x, CallerMode strict_caller,
|
|||
.in_class_field_initializer = in_class_field_initializer,
|
||||
};
|
||||
|
||||
Parser parser { Lexer { code_string.deprecated_string() }, Program::Type::Script, move(initial_state) };
|
||||
Parser parser { Lexer { code_string.byte_string() }, Program::Type::Script, move(initial_state) };
|
||||
auto program = parser.parse_program(strict_caller == CallerMode::Strict);
|
||||
|
||||
// b. If script is a List of errors, throw a SyntaxError exception.
|
||||
|
@ -1289,7 +1289,7 @@ ThrowCompletionOr<String> get_substitution(VM& vm, Utf16View const& matched, Utf
|
|||
TRY_OR_THROW_OOM(vm, result.try_append(curr));
|
||||
} else {
|
||||
auto group_name_view = replace_view.substring_view(start_position, *end_position - start_position);
|
||||
auto group_name = TRY_OR_THROW_OOM(vm, group_name_view.to_deprecated_string(Utf16View::AllowInvalidCodeUnits::Yes));
|
||||
auto group_name = TRY_OR_THROW_OOM(vm, group_name_view.to_byte_string(Utf16View::AllowInvalidCodeUnits::Yes));
|
||||
|
||||
auto capture = TRY(named_captures.as_object().get(group_name));
|
||||
|
||||
|
@ -1505,7 +1505,7 @@ ThrowCompletionOr<Value> perform_import_call(VM& vm, Value specifier, Value opti
|
|||
|
||||
// 8. Let specifierString be Completion(ToString(specifier)).
|
||||
// 9. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
auto specifier_string = TRY_OR_REJECT_WITH_VALUE(vm, promise_capability, specifier.to_deprecated_string(vm));
|
||||
auto specifier_string = TRY_OR_REJECT_WITH_VALUE(vm, promise_capability, specifier.to_byte_string(vm));
|
||||
|
||||
// 10. Let attributes be a new empty List.
|
||||
Vector<ImportAttribute> attributes;
|
||||
|
@ -1569,7 +1569,7 @@ ThrowCompletionOr<Value> perform_import_call(VM& vm, Value specifier, Value opti
|
|||
}
|
||||
|
||||
// 4. Append the ImportAttribute Record { [[Key]]: key, [[Value]]: value } to attributes.
|
||||
attributes.empend(key.as_string().deprecated_string(), value.as_string().deprecated_string());
|
||||
attributes.empend(key.as_string().byte_string(), value.as_string().byte_string());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue