diff options
author | Hendiadyoin1 <leon.a@serenityos.org> | 2022-08-31 14:18:27 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-31 15:22:36 +0100 |
commit | 25be67299ea915da2f9978c95f5df135a0785f4b (patch) | |
tree | 8689a905e738791fbef99e866b4d35ccc5513f32 /Userland/Libraries/LibJS/Bytecode | |
parent | 4370e8f80af19c9b0db6fc37cad6d1cd272d7b50 (diff) | |
download | serenity-25be67299ea915da2f9978c95f5df135a0785f4b.zip |
LibJS: Use builder.join in `to_string_impl()`s where applicable
Diffstat (limited to 'Userland/Libraries/LibJS/Bytecode')
-rw-r--r-- | Userland/Libraries/LibJS/Bytecode/Op.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/Op.cpp b/Userland/Libraries/LibJS/Bytecode/Op.cpp index 6bd57635e0..b931410d70 100644 --- a/Userland/Libraries/LibJS/Bytecode/Op.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Op.cpp @@ -890,11 +890,7 @@ String CopyObjectExcludingProperties::to_string_impl(Bytecode::Executable const& builder.appendff("CopyObjectExcludingProperties from:{}", m_from_object); if (m_excluded_names_count != 0) { builder.append(" excluding:["sv); - for (size_t i = 0; i < m_excluded_names_count; ++i) { - builder.appendff("{}", m_excluded_names[i]); - if (i != m_excluded_names_count - 1) - builder.append(','); - } + builder.join(", "sv, Span<Register const>(m_excluded_names, m_excluded_names_count)); builder.append(']'); } 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); if (m_argument_count != 0) { builder.append(", arguments:["sv); - for (size_t i = 0; i < m_argument_count; ++i) { - builder.appendff("{}", m_arguments[i]); - if (i != m_argument_count - 1) - builder.append(','); - } + builder.join(", "sv, Span<Register const>(m_arguments, m_argument_count)); builder.append(']'); } return builder.to_string(); |