mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 17:37:35 +00:00
LibJS: Use builder.join in to_string_impl()
s where applicable
This commit is contained in:
parent
4370e8f80a
commit
25be67299e
1 changed files with 2 additions and 10 deletions
|
@ -890,11 +890,7 @@ String CopyObjectExcludingProperties::to_string_impl(Bytecode::Executable const&
|
||||||
builder.appendff("CopyObjectExcludingProperties from:{}", m_from_object);
|
builder.appendff("CopyObjectExcludingProperties from:{}", m_from_object);
|
||||||
if (m_excluded_names_count != 0) {
|
if (m_excluded_names_count != 0) {
|
||||||
builder.append(" excluding:["sv);
|
builder.append(" excluding:["sv);
|
||||||
for (size_t i = 0; i < m_excluded_names_count; ++i) {
|
builder.join(", "sv, Span<Register const>(m_excluded_names, m_excluded_names_count));
|
||||||
builder.appendff("{}", m_excluded_names[i]);
|
|
||||||
if (i != m_excluded_names_count - 1)
|
|
||||||
builder.append(',');
|
|
||||||
}
|
|
||||||
builder.append(']');
|
builder.append(']');
|
||||||
}
|
}
|
||||||
return builder.to_string();
|
return builder.to_string();
|
||||||
|
@ -998,11 +994,7 @@ String Call::to_string_impl(Bytecode::Executable const&) const
|
||||||
builder.appendff("Call callee:{}, this:{}", m_callee, m_this_value);
|
builder.appendff("Call callee:{}, this:{}", m_callee, m_this_value);
|
||||||
if (m_argument_count != 0) {
|
if (m_argument_count != 0) {
|
||||||
builder.append(", arguments:["sv);
|
builder.append(", arguments:["sv);
|
||||||
for (size_t i = 0; i < m_argument_count; ++i) {
|
builder.join(", "sv, Span<Register const>(m_arguments, m_argument_count));
|
||||||
builder.appendff("{}", m_arguments[i]);
|
|
||||||
if (i != m_argument_count - 1)
|
|
||||||
builder.append(',');
|
|
||||||
}
|
|
||||||
builder.append(']');
|
builder.append(']');
|
||||||
}
|
}
|
||||||
return builder.to_string();
|
return builder.to_string();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue