1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

LibJS/Bytecode: Fix bad serialization of Postfix{Increment,Decrement}

We were serializing the dst operand twice in both instructions.
This commit is contained in:
Andreas Kling 2024-03-03 09:04:30 +01:00
parent 4bce61e508
commit 0c18450c4f

View file

@ -2000,7 +2000,7 @@ ByteString PostfixIncrement::to_byte_string_impl(Bytecode::Executable const& exe
{
return ByteString::formatted("PostfixIncrement {}, {}",
format_operand("dst"sv, m_dst, executable),
format_operand("src"sv, m_dst, executable));
format_operand("src"sv, m_src, executable));
}
ByteString Decrement::to_byte_string_impl(Bytecode::Executable const& executable) const
@ -2012,7 +2012,7 @@ ByteString PostfixDecrement::to_byte_string_impl(Bytecode::Executable const& exe
{
return ByteString::formatted("PostfixDecrement {}, {}",
format_operand("dst"sv, m_dst, executable),
format_operand("src"sv, m_dst, executable));
format_operand("src"sv, m_src, executable));
}
ByteString Throw::to_byte_string_impl(Bytecode::Executable const& executable) const