mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +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
|
@ -976,11 +976,11 @@ Bytecode::CodeGenerationErrorOr<void> ObjectExpression::generate_bytecode(Byteco
|
|||
if (property_kind == Bytecode::Op::PropertyKind::ProtoSetter) {
|
||||
TRY(property->value().generate_bytecode(generator));
|
||||
} else if (property_kind != Bytecode::Op::PropertyKind::Spread) {
|
||||
DeprecatedString identifier = string_literal.value();
|
||||
ByteString identifier = string_literal.value();
|
||||
if (property_kind == Bytecode::Op::PropertyKind::Getter)
|
||||
identifier = DeprecatedString::formatted("get {}", identifier);
|
||||
identifier = ByteString::formatted("get {}", identifier);
|
||||
else if (property_kind == Bytecode::Op::PropertyKind::Setter)
|
||||
identifier = DeprecatedString::formatted("set {}", identifier);
|
||||
identifier = ByteString::formatted("set {}", identifier);
|
||||
auto name = generator.intern_identifier(identifier);
|
||||
TRY(generator.emit_named_evaluation_if_anonymous_function(property->value(), name));
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ void BasicBlock::dump(Bytecode::Executable const& executable) const
|
|||
}
|
||||
warnln(":");
|
||||
while (!it.at_end()) {
|
||||
warnln("[{:4x}] {}", it.offset(), (*it).to_deprecated_string(executable));
|
||||
warnln("[{:4x}] {}", it.offset(), (*it).to_byte_string(executable));
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,14 +225,14 @@ ThrowCompletionOr<void> put_by_property_key(VM& vm, Value base, Value this_value
|
|||
case Op::PropertyKind::Getter: {
|
||||
auto& function = value.as_function();
|
||||
if (function.name().is_empty() && is<ECMAScriptFunctionObject>(function))
|
||||
static_cast<ECMAScriptFunctionObject*>(&function)->set_name(DeprecatedString::formatted("get {}", name));
|
||||
static_cast<ECMAScriptFunctionObject*>(&function)->set_name(ByteString::formatted("get {}", name));
|
||||
object->define_direct_accessor(name, &function, nullptr, Attribute::Configurable | Attribute::Enumerable);
|
||||
break;
|
||||
}
|
||||
case Op::PropertyKind::Setter: {
|
||||
auto& function = value.as_function();
|
||||
if (function.name().is_empty() && is<ECMAScriptFunctionObject>(function))
|
||||
static_cast<ECMAScriptFunctionObject*>(&function)->set_name(DeprecatedString::formatted("set {}", name));
|
||||
static_cast<ECMAScriptFunctionObject*>(&function)->set_name(ByteString::formatted("set {}", name));
|
||||
object->define_direct_accessor(name, nullptr, &function, Attribute::Configurable | Attribute::Enumerable);
|
||||
break;
|
||||
}
|
||||
|
@ -511,7 +511,7 @@ ThrowCompletionOr<CalleeAndThis> get_callee_and_this_from_environment(Bytecode::
|
|||
}
|
||||
|
||||
// 13.2.7.3 Runtime Semantics: Evaluation, https://tc39.es/ecma262/#sec-regular-expression-literals-runtime-semantics-evaluation
|
||||
Value new_regexp(VM& vm, ParsedRegex const& parsed_regex, DeprecatedString const& pattern, DeprecatedString const& flags)
|
||||
Value new_regexp(VM& vm, ParsedRegex const& parsed_regex, ByteString const& pattern, ByteString const& flags)
|
||||
{
|
||||
// 1. Let pattern be CodePointsToString(BodyText of RegularExpressionLiteral).
|
||||
// 2. Let flags be CodePointsToString(FlagText of RegularExpressionLiteral).
|
||||
|
|
|
@ -30,7 +30,7 @@ struct CalleeAndThis {
|
|||
Value this_value;
|
||||
};
|
||||
ThrowCompletionOr<CalleeAndThis> get_callee_and_this_from_environment(Bytecode::Interpreter&, DeprecatedFlyString const& name, EnvironmentVariableCache&);
|
||||
Value new_regexp(VM&, ParsedRegex const&, DeprecatedString const& pattern, DeprecatedString const& flags);
|
||||
Value new_regexp(VM&, ParsedRegex const&, ByteString const& pattern, ByteString const& flags);
|
||||
MarkedVector<Value> argument_list_evaluation(VM&, Value arguments);
|
||||
ThrowCompletionOr<void> create_variable(VM&, DeprecatedFlyString const& name, Op::EnvironmentMode, bool is_global, bool is_immutable, bool is_strict);
|
||||
ThrowCompletionOr<ECMAScriptFunctionObject*> new_class(VM&, Value super_class, ClassExpression const&, Optional<IdentifierTableIndex> const& lhs_name);
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
size_t number_of_registers { 0 };
|
||||
bool is_strict_mode { false };
|
||||
|
||||
DeprecatedString const& get_string(StringTableIndex index) const { return string_table->get(index); }
|
||||
ByteString const& get_string(StringTableIndex index) const { return string_table->get(index); }
|
||||
DeprecatedFlyString const& get_identifier(IdentifierTableIndex index) const { return identifier_table->get(index); }
|
||||
|
||||
void dump() const;
|
||||
|
|
|
@ -152,7 +152,7 @@ public:
|
|||
return m_current_basic_block->is_terminated();
|
||||
}
|
||||
|
||||
StringTableIndex intern_string(DeprecatedString string)
|
||||
StringTableIndex intern_string(ByteString string)
|
||||
{
|
||||
return m_string_table->insert(move(string));
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ public:
|
|||
|
||||
Type type() const { return m_type; }
|
||||
size_t length() const { return m_length; }
|
||||
DeprecatedString to_deprecated_string(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string(Bytecode::Executable const&) const;
|
||||
ThrowCompletionOr<void> execute(Bytecode::Interpreter&) const;
|
||||
static void destroy(Instruction&);
|
||||
|
||||
|
|
|
@ -502,11 +502,11 @@ Variant<NonnullOwnPtr<CallFrame>, CallFrame*> Interpreter::pop_call_frame()
|
|||
|
||||
namespace JS::Bytecode {
|
||||
|
||||
DeprecatedString Instruction::to_deprecated_string(Bytecode::Executable const& executable) const
|
||||
ByteString Instruction::to_byte_string(Bytecode::Executable const& executable) const
|
||||
{
|
||||
#define __BYTECODE_OP(op) \
|
||||
case Instruction::Type::op: \
|
||||
return static_cast<Bytecode::Op::op const&>(*this).to_deprecated_string_impl(executable);
|
||||
return static_cast<Bytecode::Op::op const&>(*this).to_byte_string_impl(executable);
|
||||
|
||||
switch (type()) {
|
||||
ENUMERATE_BYTECODE_OPS(__BYTECODE_OP)
|
||||
|
@ -568,9 +568,9 @@ static ThrowCompletionOr<Value> strict_equals(VM&, Value src1, Value src2)
|
|||
interpreter.accumulator() = TRY(op_snake_case(vm, lhs, rhs)); \
|
||||
return {}; \
|
||||
} \
|
||||
DeprecatedString OpTitleCase::to_deprecated_string_impl(Bytecode::Executable const&) const \
|
||||
ByteString OpTitleCase::to_byte_string_impl(Bytecode::Executable const&) const \
|
||||
{ \
|
||||
return DeprecatedString::formatted(#OpTitleCase " {}", m_lhs_reg); \
|
||||
return ByteString::formatted(#OpTitleCase " {}", m_lhs_reg); \
|
||||
}
|
||||
|
||||
JS_ENUMERATE_COMMON_BINARY_OPS(JS_DEFINE_COMMON_BINARY_OP)
|
||||
|
@ -592,7 +592,7 @@ static ThrowCompletionOr<Value> typeof_(VM& vm, Value value)
|
|||
interpreter.accumulator() = TRY(op_snake_case(vm, interpreter.accumulator())); \
|
||||
return {}; \
|
||||
} \
|
||||
DeprecatedString OpTitleCase::to_deprecated_string_impl(Bytecode::Executable const&) const \
|
||||
ByteString OpTitleCase::to_byte_string_impl(Bytecode::Executable const&) const \
|
||||
{ \
|
||||
return #OpTitleCase; \
|
||||
}
|
||||
|
@ -671,17 +671,17 @@ ThrowCompletionOr<void> NewRegExp::execute_impl(Bytecode::Interpreter& interpret
|
|||
return {};
|
||||
}
|
||||
|
||||
#define JS_DEFINE_NEW_BUILTIN_ERROR_OP(ErrorName) \
|
||||
ThrowCompletionOr<void> New##ErrorName::execute_impl(Bytecode::Interpreter& interpreter) const \
|
||||
{ \
|
||||
auto& vm = interpreter.vm(); \
|
||||
auto& realm = *vm.current_realm(); \
|
||||
interpreter.accumulator() = ErrorName::create(realm, interpreter.current_executable().get_string(m_error_string)); \
|
||||
return {}; \
|
||||
} \
|
||||
DeprecatedString New##ErrorName::to_deprecated_string_impl(Bytecode::Executable const& executable) const \
|
||||
{ \
|
||||
return DeprecatedString::formatted("New" #ErrorName " {} (\"{}\")", m_error_string, executable.string_table->get(m_error_string)); \
|
||||
#define JS_DEFINE_NEW_BUILTIN_ERROR_OP(ErrorName) \
|
||||
ThrowCompletionOr<void> New##ErrorName::execute_impl(Bytecode::Interpreter& interpreter) const \
|
||||
{ \
|
||||
auto& vm = interpreter.vm(); \
|
||||
auto& realm = *vm.current_realm(); \
|
||||
interpreter.accumulator() = ErrorName::create(realm, interpreter.current_executable().get_string(m_error_string)); \
|
||||
return {}; \
|
||||
} \
|
||||
ByteString New##ErrorName::to_byte_string_impl(Bytecode::Executable const& executable) const \
|
||||
{ \
|
||||
return ByteString::formatted("New" #ErrorName " {} (\"{}\")", m_error_string, executable.string_table->get(m_error_string)); \
|
||||
}
|
||||
|
||||
JS_ENUMERATE_NEW_BUILTIN_ERROR_OPS(JS_DEFINE_NEW_BUILTIN_ERROR_OP)
|
||||
|
@ -1325,69 +1325,69 @@ ThrowCompletionOr<void> BlockDeclarationInstantiation::execute_impl(Bytecode::In
|
|||
return {};
|
||||
}
|
||||
|
||||
DeprecatedString Load::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString Load::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("Load {}", m_src);
|
||||
return ByteString::formatted("Load {}", m_src);
|
||||
}
|
||||
|
||||
DeprecatedString LoadImmediate::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString LoadImmediate::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("LoadImmediate {}", m_value);
|
||||
return ByteString::formatted("LoadImmediate {}", m_value);
|
||||
}
|
||||
|
||||
DeprecatedString Store::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString Store::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("Store {}", m_dst);
|
||||
return ByteString::formatted("Store {}", m_dst);
|
||||
}
|
||||
|
||||
DeprecatedString NewBigInt::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString NewBigInt::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("NewBigInt \"{}\"", m_bigint.to_base_deprecated(10));
|
||||
return ByteString::formatted("NewBigInt \"{}\"", m_bigint.to_base_deprecated(10));
|
||||
}
|
||||
|
||||
DeprecatedString NewArray::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString NewArray::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append("NewArray"sv);
|
||||
if (m_element_count != 0) {
|
||||
builder.appendff(" [{}-{}]", m_elements[0], m_elements[1]);
|
||||
}
|
||||
return builder.to_deprecated_string();
|
||||
return builder.to_byte_string();
|
||||
}
|
||||
|
||||
DeprecatedString NewPrimitiveArray::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString NewPrimitiveArray::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("NewPrimitiveArray {}"sv, m_values.span());
|
||||
return ByteString::formatted("NewPrimitiveArray {}"sv, m_values.span());
|
||||
}
|
||||
|
||||
DeprecatedString Append::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString Append::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
if (m_is_spread)
|
||||
return DeprecatedString::formatted("Append lhs: **{}", m_lhs);
|
||||
return DeprecatedString::formatted("Append lhs: {}", m_lhs);
|
||||
return ByteString::formatted("Append lhs: **{}", m_lhs);
|
||||
return ByteString::formatted("Append lhs: {}", m_lhs);
|
||||
}
|
||||
|
||||
DeprecatedString IteratorToArray::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString IteratorToArray::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "IteratorToArray";
|
||||
}
|
||||
|
||||
DeprecatedString NewString::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString NewString::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("NewString {} (\"{}\")", m_string, executable.string_table->get(m_string));
|
||||
return ByteString::formatted("NewString {} (\"{}\")", m_string, executable.string_table->get(m_string));
|
||||
}
|
||||
|
||||
DeprecatedString NewObject::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString NewObject::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "NewObject";
|
||||
}
|
||||
|
||||
DeprecatedString NewRegExp::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString NewRegExp::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("NewRegExp source:{} (\"{}\") flags:{} (\"{}\")", m_source_index, executable.get_string(m_source_index), m_flags_index, executable.get_string(m_flags_index));
|
||||
return ByteString::formatted("NewRegExp source:{} (\"{}\") flags:{} (\"{}\")", m_source_index, executable.get_string(m_source_index), m_flags_index, executable.get_string(m_flags_index));
|
||||
}
|
||||
|
||||
DeprecatedString CopyObjectExcludingProperties::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString CopyObjectExcludingProperties::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.appendff("CopyObjectExcludingProperties from:{}", m_from_object);
|
||||
|
@ -1396,65 +1396,65 @@ DeprecatedString CopyObjectExcludingProperties::to_deprecated_string_impl(Byteco
|
|||
builder.join(", "sv, ReadonlySpan<Register>(m_excluded_names, m_excluded_names_count));
|
||||
builder.append(']');
|
||||
}
|
||||
return builder.to_deprecated_string();
|
||||
return builder.to_byte_string();
|
||||
}
|
||||
|
||||
DeprecatedString ConcatString::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString ConcatString::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("ConcatString {}", m_lhs);
|
||||
return ByteString::formatted("ConcatString {}", m_lhs);
|
||||
}
|
||||
|
||||
DeprecatedString GetCalleeAndThisFromEnvironment::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString GetCalleeAndThisFromEnvironment::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetCalleeAndThisFromEnvironment {} -> callee: {}, this:{} ", executable.identifier_table->get(m_identifier), m_callee_reg, m_this_reg);
|
||||
return ByteString::formatted("GetCalleeAndThisFromEnvironment {} -> callee: {}, this:{} ", executable.identifier_table->get(m_identifier), m_callee_reg, m_this_reg);
|
||||
}
|
||||
|
||||
DeprecatedString GetVariable::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString GetVariable::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetVariable {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
|
||||
return ByteString::formatted("GetVariable {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
|
||||
}
|
||||
|
||||
DeprecatedString GetGlobal::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString GetGlobal::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetGlobal {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
|
||||
return ByteString::formatted("GetGlobal {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
|
||||
}
|
||||
|
||||
DeprecatedString GetLocal::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString GetLocal::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetLocal {}", m_index);
|
||||
return ByteString::formatted("GetLocal {}", m_index);
|
||||
}
|
||||
|
||||
DeprecatedString DeleteVariable::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString DeleteVariable::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("DeleteVariable {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
|
||||
return ByteString::formatted("DeleteVariable {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
|
||||
}
|
||||
|
||||
DeprecatedString CreateLexicalEnvironment::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString CreateLexicalEnvironment::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "CreateLexicalEnvironment"sv;
|
||||
}
|
||||
|
||||
DeprecatedString CreateVariable::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString CreateVariable::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
auto mode_string = m_mode == EnvironmentMode::Lexical ? "Lexical" : "Variable";
|
||||
return DeprecatedString::formatted("CreateVariable env:{} immutable:{} global:{} {} ({})", mode_string, m_is_immutable, m_is_global, m_identifier, executable.identifier_table->get(m_identifier));
|
||||
return ByteString::formatted("CreateVariable env:{} immutable:{} global:{} {} ({})", mode_string, m_is_immutable, m_is_global, m_identifier, executable.identifier_table->get(m_identifier));
|
||||
}
|
||||
|
||||
DeprecatedString EnterObjectEnvironment::to_deprecated_string_impl(Executable const&) const
|
||||
ByteString EnterObjectEnvironment::to_byte_string_impl(Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("EnterObjectEnvironment");
|
||||
return ByteString::formatted("EnterObjectEnvironment");
|
||||
}
|
||||
|
||||
DeprecatedString SetVariable::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString SetVariable::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
auto initialization_mode_name = m_initialization_mode == InitializationMode::Initialize ? "Initialize" : "Set";
|
||||
auto mode_string = m_mode == EnvironmentMode::Lexical ? "Lexical" : "Variable";
|
||||
return DeprecatedString::formatted("SetVariable env:{} init:{} {} ({})", mode_string, initialization_mode_name, m_identifier, executable.identifier_table->get(m_identifier));
|
||||
return ByteString::formatted("SetVariable env:{} init:{} {} ({})", mode_string, initialization_mode_name, m_identifier, executable.identifier_table->get(m_identifier));
|
||||
}
|
||||
|
||||
DeprecatedString SetLocal::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString SetLocal::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("SetLocal {}", m_index);
|
||||
return ByteString::formatted("SetLocal {}", m_index);
|
||||
}
|
||||
|
||||
static StringView property_kind_to_string(PropertyKind kind)
|
||||
|
@ -1476,80 +1476,80 @@ static StringView property_kind_to_string(PropertyKind kind)
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
DeprecatedString PutById::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString PutById::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
auto kind = property_kind_to_string(m_kind);
|
||||
return DeprecatedString::formatted("PutById kind:{} base:{}, property:{} ({})", kind, m_base, m_property, executable.identifier_table->get(m_property));
|
||||
return ByteString::formatted("PutById kind:{} base:{}, property:{} ({})", kind, m_base, m_property, executable.identifier_table->get(m_property));
|
||||
}
|
||||
|
||||
DeprecatedString PutByIdWithThis::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString PutByIdWithThis::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
auto kind = property_kind_to_string(m_kind);
|
||||
return DeprecatedString::formatted("PutByIdWithThis kind:{} base:{}, property:{} ({}) this_value:{}", kind, m_base, m_property, executable.identifier_table->get(m_property), m_this_value);
|
||||
return ByteString::formatted("PutByIdWithThis kind:{} base:{}, property:{} ({}) this_value:{}", kind, m_base, m_property, executable.identifier_table->get(m_property), m_this_value);
|
||||
}
|
||||
|
||||
DeprecatedString PutPrivateById::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString PutPrivateById::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
auto kind = property_kind_to_string(m_kind);
|
||||
return DeprecatedString::formatted("PutPrivateById kind:{} base:{}, property:{} ({})", kind, m_base, m_property, executable.identifier_table->get(m_property));
|
||||
return ByteString::formatted("PutPrivateById kind:{} base:{}, property:{} ({})", kind, m_base, m_property, executable.identifier_table->get(m_property));
|
||||
}
|
||||
|
||||
DeprecatedString GetById::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString GetById::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetById {} ({})", m_property, executable.identifier_table->get(m_property));
|
||||
return ByteString::formatted("GetById {} ({})", m_property, executable.identifier_table->get(m_property));
|
||||
}
|
||||
|
||||
DeprecatedString GetByIdWithThis::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString GetByIdWithThis::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetByIdWithThis {} ({}) this_value:{}", m_property, executable.identifier_table->get(m_property), m_this_value);
|
||||
return ByteString::formatted("GetByIdWithThis {} ({}) this_value:{}", m_property, executable.identifier_table->get(m_property), m_this_value);
|
||||
}
|
||||
|
||||
DeprecatedString GetPrivateById::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString GetPrivateById::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetPrivateById {} ({})", m_property, executable.identifier_table->get(m_property));
|
||||
return ByteString::formatted("GetPrivateById {} ({})", m_property, executable.identifier_table->get(m_property));
|
||||
}
|
||||
|
||||
DeprecatedString HasPrivateId::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString HasPrivateId::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("HasPrivateId {} ({})", m_property, executable.identifier_table->get(m_property));
|
||||
return ByteString::formatted("HasPrivateId {} ({})", m_property, executable.identifier_table->get(m_property));
|
||||
}
|
||||
|
||||
DeprecatedString DeleteById::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString DeleteById::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("DeleteById {} ({})", m_property, executable.identifier_table->get(m_property));
|
||||
return ByteString::formatted("DeleteById {} ({})", m_property, executable.identifier_table->get(m_property));
|
||||
}
|
||||
|
||||
DeprecatedString DeleteByIdWithThis::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString DeleteByIdWithThis::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("DeleteByIdWithThis {} ({}) this_value:{}", m_property, executable.identifier_table->get(m_property), m_this_value);
|
||||
return ByteString::formatted("DeleteByIdWithThis {} ({}) this_value:{}", m_property, executable.identifier_table->get(m_property), m_this_value);
|
||||
}
|
||||
|
||||
DeprecatedString Jump::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString Jump::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
if (m_true_target.has_value())
|
||||
return DeprecatedString::formatted("Jump {}", *m_true_target);
|
||||
return DeprecatedString::formatted("Jump <empty>");
|
||||
return ByteString::formatted("Jump {}", *m_true_target);
|
||||
return ByteString::formatted("Jump <empty>");
|
||||
}
|
||||
|
||||
DeprecatedString JumpConditional::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString JumpConditional::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
auto true_string = m_true_target.has_value() ? DeprecatedString::formatted("{}", *m_true_target) : "<empty>";
|
||||
auto false_string = m_false_target.has_value() ? DeprecatedString::formatted("{}", *m_false_target) : "<empty>";
|
||||
return DeprecatedString::formatted("JumpConditional true:{} false:{}", true_string, false_string);
|
||||
auto true_string = m_true_target.has_value() ? ByteString::formatted("{}", *m_true_target) : "<empty>";
|
||||
auto false_string = m_false_target.has_value() ? ByteString::formatted("{}", *m_false_target) : "<empty>";
|
||||
return ByteString::formatted("JumpConditional true:{} false:{}", true_string, false_string);
|
||||
}
|
||||
|
||||
DeprecatedString JumpNullish::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString JumpNullish::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
auto true_string = m_true_target.has_value() ? DeprecatedString::formatted("{}", *m_true_target) : "<empty>";
|
||||
auto false_string = m_false_target.has_value() ? DeprecatedString::formatted("{}", *m_false_target) : "<empty>";
|
||||
return DeprecatedString::formatted("JumpNullish null:{} nonnull:{}", true_string, false_string);
|
||||
auto true_string = m_true_target.has_value() ? ByteString::formatted("{}", *m_true_target) : "<empty>";
|
||||
auto false_string = m_false_target.has_value() ? ByteString::formatted("{}", *m_false_target) : "<empty>";
|
||||
return ByteString::formatted("JumpNullish null:{} nonnull:{}", true_string, false_string);
|
||||
}
|
||||
|
||||
DeprecatedString JumpUndefined::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString JumpUndefined::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
auto true_string = m_true_target.has_value() ? DeprecatedString::formatted("{}", *m_true_target) : "<empty>";
|
||||
auto false_string = m_false_target.has_value() ? DeprecatedString::formatted("{}", *m_false_target) : "<empty>";
|
||||
return DeprecatedString::formatted("JumpUndefined undefined:{} not undefined:{}", true_string, false_string);
|
||||
auto true_string = m_true_target.has_value() ? ByteString::formatted("{}", *m_true_target) : "<empty>";
|
||||
auto false_string = m_false_target.has_value() ? ByteString::formatted("{}", *m_false_target) : "<empty>";
|
||||
return ByteString::formatted("JumpUndefined undefined:{} not undefined:{}", true_string, false_string);
|
||||
}
|
||||
|
||||
static StringView call_type_to_string(CallType type)
|
||||
|
@ -1565,30 +1565,30 @@ static StringView call_type_to_string(CallType type)
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
DeprecatedString Call::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString Call::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
auto type = call_type_to_string(m_type);
|
||||
if (m_builtin.has_value())
|
||||
return DeprecatedString::formatted("Call{} callee:{}, this:{}, first_arg:{} (builtin {})", type, m_callee, m_this_value, m_first_argument, m_builtin.value());
|
||||
return ByteString::formatted("Call{} callee:{}, this:{}, first_arg:{} (builtin {})", type, m_callee, m_this_value, m_first_argument, m_builtin.value());
|
||||
if (m_expression_string.has_value())
|
||||
return DeprecatedString::formatted("Call{} callee:{}, this:{}, first_arg:{} ({})", type, m_callee, m_this_value, m_first_argument, executable.get_string(m_expression_string.value()));
|
||||
return DeprecatedString::formatted("Call{} callee:{}, this:{}, first_arg:{}", type, m_callee, m_first_argument, m_this_value);
|
||||
return ByteString::formatted("Call{} callee:{}, this:{}, first_arg:{} ({})", type, m_callee, m_this_value, m_first_argument, executable.get_string(m_expression_string.value()));
|
||||
return ByteString::formatted("Call{} callee:{}, this:{}, first_arg:{}", type, m_callee, m_first_argument, m_this_value);
|
||||
}
|
||||
|
||||
DeprecatedString CallWithArgumentArray::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString CallWithArgumentArray::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
auto type = call_type_to_string(m_type);
|
||||
if (m_expression_string.has_value())
|
||||
return DeprecatedString::formatted("CallWithArgumentArray{} callee:{}, this:{}, arguments:[...acc] ({})", type, m_callee, m_this_value, executable.get_string(m_expression_string.value()));
|
||||
return DeprecatedString::formatted("CallWithArgumentArray{} callee:{}, this:{}, arguments:[...acc]", type, m_callee, m_this_value);
|
||||
return ByteString::formatted("CallWithArgumentArray{} callee:{}, this:{}, arguments:[...acc] ({})", type, m_callee, m_this_value, executable.get_string(m_expression_string.value()));
|
||||
return ByteString::formatted("CallWithArgumentArray{} callee:{}, this:{}, arguments:[...acc]", type, m_callee, m_this_value);
|
||||
}
|
||||
|
||||
DeprecatedString SuperCallWithArgumentArray::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString SuperCallWithArgumentArray::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "SuperCallWithArgumentArray arguments:[...acc]"sv;
|
||||
}
|
||||
|
||||
DeprecatedString NewFunction::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString NewFunction::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append("NewFunction"sv);
|
||||
|
@ -1598,215 +1598,215 @@ DeprecatedString NewFunction::to_deprecated_string_impl(Bytecode::Executable con
|
|||
builder.appendff(" lhs_name:{}"sv, m_lhs_name.value());
|
||||
if (m_home_object.has_value())
|
||||
builder.appendff(" home_object:{}"sv, m_home_object.value());
|
||||
return builder.to_deprecated_string();
|
||||
return builder.to_byte_string();
|
||||
}
|
||||
|
||||
DeprecatedString NewClass::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString NewClass::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
auto name = m_class_expression.name();
|
||||
builder.appendff("NewClass '{}'"sv, name.is_null() ? ""sv : name);
|
||||
if (m_lhs_name.has_value())
|
||||
builder.appendff(" lhs_name:{}"sv, m_lhs_name.value());
|
||||
return builder.to_deprecated_string();
|
||||
return builder.to_byte_string();
|
||||
}
|
||||
|
||||
DeprecatedString Return::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString Return::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "Return";
|
||||
}
|
||||
|
||||
DeprecatedString Increment::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString Increment::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "Increment";
|
||||
}
|
||||
|
||||
DeprecatedString Decrement::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString Decrement::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "Decrement";
|
||||
}
|
||||
|
||||
DeprecatedString Throw::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString Throw::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "Throw";
|
||||
}
|
||||
|
||||
DeprecatedString ThrowIfNotObject::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString ThrowIfNotObject::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "ThrowIfNotObject";
|
||||
}
|
||||
|
||||
DeprecatedString ThrowIfNullish::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString ThrowIfNullish::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "ThrowIfNullish";
|
||||
}
|
||||
|
||||
DeprecatedString EnterUnwindContext::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString EnterUnwindContext::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("EnterUnwindContext entry:{}", m_entry_point);
|
||||
return ByteString::formatted("EnterUnwindContext entry:{}", m_entry_point);
|
||||
}
|
||||
|
||||
DeprecatedString ScheduleJump::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString ScheduleJump::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("ScheduleJump {}", m_target);
|
||||
return ByteString::formatted("ScheduleJump {}", m_target);
|
||||
}
|
||||
|
||||
DeprecatedString LeaveLexicalEnvironment::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString LeaveLexicalEnvironment::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "LeaveLexicalEnvironment"sv;
|
||||
}
|
||||
|
||||
DeprecatedString LeaveUnwindContext::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString LeaveUnwindContext::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "LeaveUnwindContext";
|
||||
}
|
||||
|
||||
DeprecatedString ContinuePendingUnwind::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString ContinuePendingUnwind::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("ContinuePendingUnwind resume:{}", m_resume_target);
|
||||
return ByteString::formatted("ContinuePendingUnwind resume:{}", m_resume_target);
|
||||
}
|
||||
|
||||
DeprecatedString Yield::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString Yield::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
if (m_continuation_label.has_value())
|
||||
return DeprecatedString::formatted("Yield continuation:@{}", m_continuation_label->block().name());
|
||||
return DeprecatedString::formatted("Yield return");
|
||||
return ByteString::formatted("Yield continuation:@{}", m_continuation_label->block().name());
|
||||
return ByteString::formatted("Yield return");
|
||||
}
|
||||
|
||||
DeprecatedString Await::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString Await::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("Await continuation:@{}", m_continuation_label.block().name());
|
||||
return ByteString::formatted("Await continuation:@{}", m_continuation_label.block().name());
|
||||
}
|
||||
|
||||
DeprecatedString GetByValue::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString GetByValue::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetByValue base:{}", m_base);
|
||||
return ByteString::formatted("GetByValue base:{}", m_base);
|
||||
}
|
||||
|
||||
DeprecatedString GetByValueWithThis::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString GetByValueWithThis::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetByValueWithThis base:{} this_value:{}", m_base, m_this_value);
|
||||
return ByteString::formatted("GetByValueWithThis base:{} this_value:{}", m_base, m_this_value);
|
||||
}
|
||||
|
||||
DeprecatedString PutByValue::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString PutByValue::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
auto kind = property_kind_to_string(m_kind);
|
||||
return DeprecatedString::formatted("PutByValue kind:{} base:{}, property:{}", kind, m_base, m_property);
|
||||
return ByteString::formatted("PutByValue kind:{} base:{}, property:{}", kind, m_base, m_property);
|
||||
}
|
||||
|
||||
DeprecatedString PutByValueWithThis::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString PutByValueWithThis::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
auto kind = property_kind_to_string(m_kind);
|
||||
return DeprecatedString::formatted("PutByValueWithThis kind:{} base:{}, property:{} this_value:{}", kind, m_base, m_property, m_this_value);
|
||||
return ByteString::formatted("PutByValueWithThis kind:{} base:{}, property:{} this_value:{}", kind, m_base, m_property, m_this_value);
|
||||
}
|
||||
|
||||
DeprecatedString DeleteByValue::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString DeleteByValue::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("DeleteByValue base:{}", m_base);
|
||||
return ByteString::formatted("DeleteByValue base:{}", m_base);
|
||||
}
|
||||
|
||||
DeprecatedString DeleteByValueWithThis::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString DeleteByValueWithThis::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("DeleteByValueWithThis base:{} this_value:{}", m_base, m_this_value);
|
||||
return ByteString::formatted("DeleteByValueWithThis base:{} this_value:{}", m_base, m_this_value);
|
||||
}
|
||||
|
||||
DeprecatedString GetIterator::to_deprecated_string_impl(Executable const&) const
|
||||
ByteString GetIterator::to_byte_string_impl(Executable const&) const
|
||||
{
|
||||
auto hint = m_hint == IteratorHint::Sync ? "sync" : "async";
|
||||
return DeprecatedString::formatted("GetIterator hint:{}", hint);
|
||||
return ByteString::formatted("GetIterator hint:{}", hint);
|
||||
}
|
||||
|
||||
DeprecatedString GetMethod::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString GetMethod::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetMethod {} ({})", m_property, executable.identifier_table->get(m_property));
|
||||
return ByteString::formatted("GetMethod {} ({})", m_property, executable.identifier_table->get(m_property));
|
||||
}
|
||||
|
||||
DeprecatedString GetObjectPropertyIterator::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString GetObjectPropertyIterator::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "GetObjectPropertyIterator";
|
||||
}
|
||||
|
||||
DeprecatedString IteratorClose::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString IteratorClose::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
if (!m_completion_value.has_value())
|
||||
return DeprecatedString::formatted("IteratorClose completion_type={} completion_value=<empty>", to_underlying(m_completion_type));
|
||||
return ByteString::formatted("IteratorClose completion_type={} completion_value=<empty>", to_underlying(m_completion_type));
|
||||
|
||||
auto completion_value_string = m_completion_value->to_string_without_side_effects();
|
||||
return DeprecatedString::formatted("IteratorClose completion_type={} completion_value={}", to_underlying(m_completion_type), completion_value_string);
|
||||
return ByteString::formatted("IteratorClose completion_type={} completion_value={}", to_underlying(m_completion_type), completion_value_string);
|
||||
}
|
||||
|
||||
DeprecatedString AsyncIteratorClose::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString AsyncIteratorClose::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
if (!m_completion_value.has_value())
|
||||
return DeprecatedString::formatted("AsyncIteratorClose completion_type={} completion_value=<empty>", to_underlying(m_completion_type));
|
||||
return ByteString::formatted("AsyncIteratorClose completion_type={} completion_value=<empty>", to_underlying(m_completion_type));
|
||||
|
||||
auto completion_value_string = m_completion_value->to_string_without_side_effects();
|
||||
return DeprecatedString::formatted("AsyncIteratorClose completion_type={} completion_value={}", to_underlying(m_completion_type), completion_value_string);
|
||||
return ByteString::formatted("AsyncIteratorClose completion_type={} completion_value={}", to_underlying(m_completion_type), completion_value_string);
|
||||
}
|
||||
|
||||
DeprecatedString IteratorNext::to_deprecated_string_impl(Executable const&) const
|
||||
ByteString IteratorNext::to_byte_string_impl(Executable const&) const
|
||||
{
|
||||
return "IteratorNext";
|
||||
}
|
||||
|
||||
DeprecatedString ResolveThisBinding::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString ResolveThisBinding::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "ResolveThisBinding"sv;
|
||||
}
|
||||
|
||||
DeprecatedString ResolveSuperBase::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString ResolveSuperBase::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "ResolveSuperBase"sv;
|
||||
}
|
||||
|
||||
DeprecatedString GetNewTarget::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString GetNewTarget::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "GetNewTarget"sv;
|
||||
}
|
||||
|
||||
DeprecatedString GetImportMeta::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString GetImportMeta::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "GetImportMeta"sv;
|
||||
}
|
||||
|
||||
DeprecatedString TypeofVariable::to_deprecated_string_impl(Bytecode::Executable const& executable) const
|
||||
ByteString TypeofVariable::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
return DeprecatedString::formatted("TypeofVariable {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
|
||||
return ByteString::formatted("TypeofVariable {} ({})", m_identifier, executable.identifier_table->get(m_identifier));
|
||||
}
|
||||
|
||||
DeprecatedString TypeofLocal::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString TypeofLocal::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("TypeofLocal {}", m_index);
|
||||
return ByteString::formatted("TypeofLocal {}", m_index);
|
||||
}
|
||||
|
||||
DeprecatedString ToNumeric::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString ToNumeric::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "ToNumeric"sv;
|
||||
}
|
||||
|
||||
DeprecatedString BlockDeclarationInstantiation::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString BlockDeclarationInstantiation::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "BlockDeclarationInstantiation"sv;
|
||||
}
|
||||
|
||||
DeprecatedString ImportCall::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString ImportCall::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("ImportCall specifier:{} options:{}"sv, m_specifier, m_options);
|
||||
return ByteString::formatted("ImportCall specifier:{} options:{}"sv, m_specifier, m_options);
|
||||
}
|
||||
|
||||
DeprecatedString Catch::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString Catch::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return "Catch"sv;
|
||||
}
|
||||
|
||||
DeprecatedString GetObjectFromIteratorRecord::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString GetObjectFromIteratorRecord::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetObjectFromIteratorRecord object:{} <- iterator_record:{}", m_object, m_iterator_record);
|
||||
return ByteString::formatted("GetObjectFromIteratorRecord object:{} <- iterator_record:{}", m_object, m_iterator_record);
|
||||
}
|
||||
|
||||
DeprecatedString GetNextMethodFromIteratorRecord::to_deprecated_string_impl(Bytecode::Executable const&) const
|
||||
ByteString GetNextMethodFromIteratorRecord::to_byte_string_impl(Bytecode::Executable const&) const
|
||||
{
|
||||
return DeprecatedString::formatted("GetNextMethodFromIteratorRecord next_method:{} <- iterator_record:{}", m_next_method, m_iterator_record);
|
||||
return ByteString::formatted("GetNextMethodFromIteratorRecord next_method:{} <- iterator_record:{}", m_next_method, m_iterator_record);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register src() const { return m_src; }
|
||||
|
||||
|
@ -56,7 +56,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Value value() const { return m_value; }
|
||||
|
||||
|
@ -73,7 +73,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register dst() const { return m_dst; }
|
||||
|
||||
|
@ -105,22 +105,22 @@ private:
|
|||
O(RightShift, right_shift) \
|
||||
O(UnsignedRightShift, unsigned_right_shift)
|
||||
|
||||
#define JS_DECLARE_COMMON_BINARY_OP(OpTitleCase, op_snake_case) \
|
||||
class OpTitleCase final : public Instruction { \
|
||||
public: \
|
||||
explicit OpTitleCase(Register lhs_reg) \
|
||||
: Instruction(Type::OpTitleCase, sizeof(*this)) \
|
||||
, m_lhs_reg(lhs_reg) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const; \
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const; \
|
||||
\
|
||||
Register lhs() const { return m_lhs_reg; } \
|
||||
\
|
||||
private: \
|
||||
Register m_lhs_reg; \
|
||||
#define JS_DECLARE_COMMON_BINARY_OP(OpTitleCase, op_snake_case) \
|
||||
class OpTitleCase final : public Instruction { \
|
||||
public: \
|
||||
explicit OpTitleCase(Register lhs_reg) \
|
||||
: Instruction(Type::OpTitleCase, sizeof(*this)) \
|
||||
, m_lhs_reg(lhs_reg) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const; \
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const; \
|
||||
\
|
||||
Register lhs() const { return m_lhs_reg; } \
|
||||
\
|
||||
private: \
|
||||
Register m_lhs_reg; \
|
||||
};
|
||||
|
||||
JS_ENUMERATE_COMMON_BINARY_OPS(JS_DECLARE_COMMON_BINARY_OP)
|
||||
|
@ -133,16 +133,16 @@ JS_ENUMERATE_COMMON_BINARY_OPS(JS_DECLARE_COMMON_BINARY_OP)
|
|||
O(UnaryMinus, unary_minus) \
|
||||
O(Typeof, typeof_)
|
||||
|
||||
#define JS_DECLARE_COMMON_UNARY_OP(OpTitleCase, op_snake_case) \
|
||||
class OpTitleCase final : public Instruction { \
|
||||
public: \
|
||||
OpTitleCase() \
|
||||
: Instruction(Type::OpTitleCase, sizeof(*this)) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const; \
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const; \
|
||||
#define JS_DECLARE_COMMON_UNARY_OP(OpTitleCase, op_snake_case) \
|
||||
class OpTitleCase final : public Instruction { \
|
||||
public: \
|
||||
OpTitleCase() \
|
||||
: Instruction(Type::OpTitleCase, sizeof(*this)) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const; \
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const; \
|
||||
};
|
||||
|
||||
JS_ENUMERATE_COMMON_UNARY_OPS(JS_DECLARE_COMMON_UNARY_OP)
|
||||
|
@ -157,7 +157,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
StringTableIndex index() const { return m_string; }
|
||||
|
||||
|
@ -173,7 +173,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class NewRegExp final : public Instruction {
|
||||
|
@ -187,7 +187,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
StringTableIndex source_index() const { return m_source_index; }
|
||||
StringTableIndex flags_index() const { return m_flags_index; }
|
||||
|
@ -202,22 +202,22 @@ private:
|
|||
#define JS_ENUMERATE_NEW_BUILTIN_ERROR_OPS(O) \
|
||||
O(TypeError)
|
||||
|
||||
#define JS_DECLARE_NEW_BUILTIN_ERROR_OP(ErrorName) \
|
||||
class New##ErrorName final : public Instruction { \
|
||||
public: \
|
||||
explicit New##ErrorName(StringTableIndex error_string) \
|
||||
: Instruction(Type::New##ErrorName, sizeof(*this)) \
|
||||
, m_error_string(error_string) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const; \
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const; \
|
||||
\
|
||||
StringTableIndex error_string() const { return m_error_string; } \
|
||||
\
|
||||
private: \
|
||||
StringTableIndex m_error_string; \
|
||||
#define JS_DECLARE_NEW_BUILTIN_ERROR_OP(ErrorName) \
|
||||
class New##ErrorName final : public Instruction { \
|
||||
public: \
|
||||
explicit New##ErrorName(StringTableIndex error_string) \
|
||||
: Instruction(Type::New##ErrorName, sizeof(*this)) \
|
||||
, m_error_string(error_string) \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const; \
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const; \
|
||||
\
|
||||
StringTableIndex error_string() const { return m_error_string; } \
|
||||
\
|
||||
private: \
|
||||
StringTableIndex m_error_string; \
|
||||
};
|
||||
|
||||
JS_ENUMERATE_NEW_BUILTIN_ERROR_OPS(JS_DECLARE_NEW_BUILTIN_ERROR_OP)
|
||||
|
@ -236,7 +236,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
size_t length_impl(size_t excluded_names_count) const
|
||||
{
|
||||
|
@ -262,7 +262,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Crypto::SignedBigInteger const& bigint() const { return m_bigint; }
|
||||
|
||||
|
@ -288,7 +288,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
size_t length_impl(size_t element_count) const
|
||||
{
|
||||
|
@ -323,7 +323,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
ReadonlySpan<Value> values() const { return m_values.span(); }
|
||||
|
||||
|
@ -341,7 +341,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register lhs() const { return m_lhs; }
|
||||
bool is_spread() const { return m_is_spread; }
|
||||
|
@ -361,7 +361,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register specifier() const { return m_specifier; }
|
||||
Register options() const { return m_options; }
|
||||
|
@ -379,7 +379,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class ConcatString final : public Instruction {
|
||||
|
@ -391,7 +391,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register lhs() const { return m_lhs; }
|
||||
|
||||
|
@ -412,7 +412,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class EnterObjectEnvironment final : public Instruction {
|
||||
|
@ -423,7 +423,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class Catch final : public Instruction {
|
||||
|
@ -434,7 +434,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class CreateVariable final : public Instruction {
|
||||
|
@ -450,7 +450,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex identifier() const { return m_identifier; }
|
||||
EnvironmentMode mode() const { return m_mode; }
|
||||
|
@ -482,7 +482,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex identifier() const { return m_identifier; }
|
||||
EnvironmentMode mode() const { return m_mode; }
|
||||
|
@ -505,7 +505,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
size_t index() const { return m_index; }
|
||||
|
||||
|
@ -525,7 +525,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex identifier() const { return m_identifier; }
|
||||
u32 cache_index() const { return m_cache_index; }
|
||||
|
@ -549,7 +549,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex identifier() const { return m_identifier; }
|
||||
u32 cache_index() const { return m_cache_index; }
|
||||
|
@ -569,7 +569,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex identifier() const { return m_identifier; }
|
||||
u32 cache_index() const { return m_cache_index; }
|
||||
|
@ -588,7 +588,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
size_t index() const { return m_index; }
|
||||
|
||||
|
@ -605,7 +605,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex identifier() const { return m_identifier; }
|
||||
|
||||
|
@ -623,7 +623,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex property() const { return m_property; }
|
||||
u32 cache_index() const { return m_cache_index; }
|
||||
|
@ -644,7 +644,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex property() const { return m_property; }
|
||||
Register this_value() const { return m_this_value; }
|
||||
|
@ -665,7 +665,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex property() const { return m_property; }
|
||||
|
||||
|
@ -682,7 +682,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex property() const { return m_property; }
|
||||
|
||||
|
@ -711,7 +711,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register base() const { return m_base; }
|
||||
IdentifierTableIndex property() const { return m_property; }
|
||||
|
@ -738,7 +738,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register base() const { return m_base; }
|
||||
Register this_value() const { return m_this_value; }
|
||||
|
@ -765,7 +765,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register base() const { return m_base; }
|
||||
IdentifierTableIndex property() const { return m_property; }
|
||||
|
@ -785,7 +785,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex property() const { return m_property; }
|
||||
|
||||
|
@ -803,7 +803,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register this_value() const { return m_this_value; }
|
||||
IdentifierTableIndex property() const { return m_property; }
|
||||
|
@ -822,7 +822,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register base() const { return m_base; }
|
||||
|
||||
|
@ -840,7 +840,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register base() const { return m_base; }
|
||||
Register this_value() const { return m_this_value; }
|
||||
|
@ -861,7 +861,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register base() const { return m_base; }
|
||||
Register property() const { return m_property; }
|
||||
|
@ -885,7 +885,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register base() const { return m_base; }
|
||||
Register property() const { return m_property; }
|
||||
|
@ -908,7 +908,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register base() const { return m_base; }
|
||||
|
||||
|
@ -929,7 +929,7 @@ public:
|
|||
Register this_value() const { return m_this_value; }
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
private:
|
||||
Register m_base;
|
||||
|
@ -955,7 +955,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
auto& true_target() const { return m_true_target; }
|
||||
auto& false_target() const { return m_false_target; }
|
||||
|
@ -973,7 +973,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class JumpNullish final : public Jump {
|
||||
|
@ -984,7 +984,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class JumpUndefined final : public Jump {
|
||||
|
@ -995,7 +995,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
enum class CallType {
|
||||
|
@ -1029,7 +1029,7 @@ public:
|
|||
Optional<Builtin> const& builtin() const { return m_builtin; }
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
private:
|
||||
Register m_callee;
|
||||
|
@ -1058,7 +1058,7 @@ public:
|
|||
Optional<StringTableIndex> const& expression_string() const { return m_expression_string; }
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
private:
|
||||
Register m_callee;
|
||||
|
@ -1076,7 +1076,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
bool is_synthetic() const { return m_is_synthetic; }
|
||||
|
||||
|
@ -1094,7 +1094,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
ClassExpression const& class_expression() const { return m_class_expression; }
|
||||
Optional<IdentifierTableIndex> const& lhs_name() const { return m_lhs_name; }
|
||||
|
@ -1115,7 +1115,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
FunctionExpression const& function_node() const { return m_function_node; }
|
||||
Optional<IdentifierTableIndex> const& lhs_name() const { return m_lhs_name; }
|
||||
|
@ -1136,7 +1136,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
ScopeNode const& scope_node() const { return m_scope_node; }
|
||||
|
||||
|
@ -1154,7 +1154,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class Increment final : public Instruction {
|
||||
|
@ -1165,7 +1165,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class Decrement final : public Instruction {
|
||||
|
@ -1176,7 +1176,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class ToNumeric final : public Instruction {
|
||||
|
@ -1187,7 +1187,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class Throw final : public Instruction {
|
||||
|
@ -1200,7 +1200,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class ThrowIfNotObject final : public Instruction {
|
||||
|
@ -1211,7 +1211,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class ThrowIfNullish final : public Instruction {
|
||||
|
@ -1222,7 +1222,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class EnterUnwindContext final : public Instruction {
|
||||
|
@ -1236,7 +1236,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
auto& entry_point() const { return m_entry_point; }
|
||||
|
||||
|
@ -1266,7 +1266,7 @@ public:
|
|||
Label target() const { return m_target; }
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
private:
|
||||
Label m_target;
|
||||
|
@ -1280,7 +1280,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class LeaveUnwindContext final : public Instruction {
|
||||
|
@ -1291,7 +1291,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class ContinuePendingUnwind final : public Instruction {
|
||||
|
@ -1305,7 +1305,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
auto& resume_target() const { return m_resume_target; }
|
||||
|
||||
|
@ -1329,7 +1329,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
auto& continuation() const { return m_continuation_label; }
|
||||
|
||||
|
@ -1348,7 +1348,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
auto& continuation() const { return m_continuation_label; }
|
||||
|
||||
|
@ -1365,7 +1365,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IteratorHint hint() const { return m_hint; }
|
||||
|
||||
|
@ -1383,7 +1383,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register object() const { return m_object; }
|
||||
Register iterator_record() const { return m_iterator_record; }
|
||||
|
@ -1403,7 +1403,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Register next_method() const { return m_next_method; }
|
||||
Register iterator_record() const { return m_iterator_record; }
|
||||
|
@ -1422,7 +1422,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex property() const { return m_property; }
|
||||
|
||||
|
@ -1438,7 +1438,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class IteratorClose final : public Instruction {
|
||||
|
@ -1451,7 +1451,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Completion::Type completion_type() const { return m_completion_type; }
|
||||
Optional<Value> const& completion_value() const { return m_completion_value; }
|
||||
|
@ -1471,7 +1471,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
Completion::Type completion_type() const { return m_completion_type; }
|
||||
Optional<Value> const& completion_value() const { return m_completion_value; }
|
||||
|
@ -1489,7 +1489,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class ResolveThisBinding final : public Instruction {
|
||||
|
@ -1500,7 +1500,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class ResolveSuperBase final : public Instruction {
|
||||
|
@ -1511,7 +1511,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class GetNewTarget final : public Instruction {
|
||||
|
@ -1522,7 +1522,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class GetImportMeta final : public Instruction {
|
||||
|
@ -1533,7 +1533,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
};
|
||||
|
||||
class TypeofVariable final : public Instruction {
|
||||
|
@ -1545,7 +1545,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
IdentifierTableIndex identifier() const { return m_identifier; }
|
||||
|
||||
|
@ -1562,7 +1562,7 @@ public:
|
|||
}
|
||||
|
||||
ThrowCompletionOr<void> execute_impl(Bytecode::Interpreter&) const;
|
||||
DeprecatedString to_deprecated_string_impl(Bytecode::Executable const&) const;
|
||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||
|
||||
size_t index() const { return m_index; }
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/DistinctNumeric.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibRegex/RegexParser.h>
|
||||
|
@ -17,7 +17,7 @@ AK_TYPEDEF_DISTINCT_NUMERIC_GENERAL(size_t, RegexTableIndex, Comparison);
|
|||
|
||||
struct ParsedRegex {
|
||||
regex::Parser::Result regex;
|
||||
DeprecatedString pattern;
|
||||
ByteString pattern;
|
||||
regex::RegexOptions<ECMAScriptFlags> flags;
|
||||
};
|
||||
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
|
||||
namespace JS::Bytecode {
|
||||
|
||||
StringTableIndex StringTable::insert(DeprecatedString string)
|
||||
StringTableIndex StringTable::insert(ByteString string)
|
||||
{
|
||||
m_strings.append(move(string));
|
||||
return m_strings.size() - 1;
|
||||
}
|
||||
|
||||
DeprecatedString const& StringTable::get(StringTableIndex index) const
|
||||
ByteString const& StringTable::get(StringTableIndex index) const
|
||||
{
|
||||
return m_strings[index.value()];
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/DistinctNumeric.h>
|
||||
#include <AK/Vector.h>
|
||||
|
||||
|
@ -21,13 +21,13 @@ class StringTable {
|
|||
public:
|
||||
StringTable() = default;
|
||||
|
||||
StringTableIndex insert(DeprecatedString);
|
||||
DeprecatedString const& get(StringTableIndex) const;
|
||||
StringTableIndex insert(ByteString);
|
||||
ByteString const& get(StringTableIndex) const;
|
||||
void dump() const;
|
||||
bool is_empty() const { return m_strings.is_empty(); }
|
||||
|
||||
private:
|
||||
Vector<DeprecatedString> m_strings;
|
||||
Vector<ByteString> m_strings;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue