mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:18:12 +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
|
@ -141,7 +141,7 @@ ErrorOr<void, ValidationError> AbstractMachine::validate(Module& module)
|
|||
InstantiationResult AbstractMachine::instantiate(Module const& module, Vector<ExternValue> externs)
|
||||
{
|
||||
if (auto result = validate(const_cast<Module&>(module)); result.is_error())
|
||||
return InstantiationError { DeprecatedString::formatted("Validation failed: {}", result.error()) };
|
||||
return InstantiationError { ByteString::formatted("Validation failed: {}", result.error()) };
|
||||
|
||||
auto main_module_instance_pointer = make<ModuleInstance>();
|
||||
auto& main_module_instance = *main_module_instance_pointer;
|
||||
|
@ -187,7 +187,7 @@ InstantiationResult AbstractMachine::instantiate(Module const& module, Vector<Ex
|
|||
});
|
||||
auto result = config.execute(interpreter).assert_wasm_result();
|
||||
if (result.is_trap())
|
||||
instantiation_result = InstantiationError { DeprecatedString::formatted("Global value construction trapped: {}", result.trap().reason) };
|
||||
instantiation_result = InstantiationError { ByteString::formatted("Global value construction trapped: {}", result.trap().reason) };
|
||||
else
|
||||
global_values.append(result.values().first());
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ InstantiationResult AbstractMachine::instantiate(Module const& module, Vector<Ex
|
|||
});
|
||||
auto result = config.execute(interpreter).assert_wasm_result();
|
||||
if (result.is_trap()) {
|
||||
instantiation_result = InstantiationError { DeprecatedString::formatted("Element construction trapped: {}", result.trap().reason) };
|
||||
instantiation_result = InstantiationError { ByteString::formatted("Element construction trapped: {}", result.trap().reason) };
|
||||
return IterationDecision::Continue;
|
||||
}
|
||||
|
||||
|
@ -267,7 +267,7 @@ InstantiationResult AbstractMachine::instantiate(Module const& module, Vector<Ex
|
|||
});
|
||||
auto result = config.execute(interpreter).assert_wasm_result();
|
||||
if (result.is_trap()) {
|
||||
instantiation_result = InstantiationError { DeprecatedString::formatted("Element section initialisation trapped: {}", result.trap().reason) };
|
||||
instantiation_result = InstantiationError { ByteString::formatted("Element section initialisation trapped: {}", result.trap().reason) };
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
auto d = result.values().first().to<i32>();
|
||||
|
@ -327,7 +327,7 @@ InstantiationResult AbstractMachine::instantiate(Module const& module, Vector<Ex
|
|||
});
|
||||
auto result = config.execute(interpreter).assert_wasm_result();
|
||||
if (result.is_trap()) {
|
||||
instantiation_result = InstantiationError { DeprecatedString::formatted("Data section initialisation trapped: {}", result.trap().reason) };
|
||||
instantiation_result = InstantiationError { ByteString::formatted("Data section initialisation trapped: {}", result.trap().reason) };
|
||||
return;
|
||||
}
|
||||
size_t offset = 0;
|
||||
|
@ -339,7 +339,7 @@ InstantiationResult AbstractMachine::instantiate(Module const& module, Vector<Ex
|
|||
return;
|
||||
if (main_module_instance.memories().size() <= data.index.value()) {
|
||||
instantiation_result = InstantiationError {
|
||||
DeprecatedString::formatted("Data segment referenced out-of-bounds memory ({}) of max {} entries",
|
||||
ByteString::formatted("Data segment referenced out-of-bounds memory ({}) of max {} entries",
|
||||
data.index.value(), main_module_instance.memories().size())
|
||||
};
|
||||
return;
|
||||
|
@ -358,7 +358,7 @@ InstantiationResult AbstractMachine::instantiate(Module const& module, Vector<Ex
|
|||
if (auto max = instance->type().limits().max(); max.has_value()) {
|
||||
if (*max * Constants::page_size < data.init.size() + offset) {
|
||||
instantiation_result = InstantiationError {
|
||||
DeprecatedString::formatted("Data segment attempted to write to out-of-bounds memory ({}) of max {} bytes",
|
||||
ByteString::formatted("Data segment attempted to write to out-of-bounds memory ({}) of max {} bytes",
|
||||
data.init.size() + offset, instance->type().limits().max().value())
|
||||
};
|
||||
return;
|
||||
|
@ -384,7 +384,7 @@ InstantiationResult AbstractMachine::instantiate(Module const& module, Vector<Ex
|
|||
auto& functions = main_module_instance.functions();
|
||||
auto index = section.function().index();
|
||||
if (functions.size() <= index.value()) {
|
||||
instantiation_result = InstantiationError { DeprecatedString::formatted("Start section function referenced invalid index {} of max {} entries", index.value(), functions.size()) };
|
||||
instantiation_result = InstantiationError { ByteString::formatted("Start section function referenced invalid index {} of max {} entries", index.value(), functions.size()) };
|
||||
return;
|
||||
}
|
||||
invoke(functions[index.value()], {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue