mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
LibJS: Remove unused this
value from CallConstruct instruction
There's no `this` value prior in the caller context, and this was never actually used by CallConstruct.
This commit is contained in:
parent
6b883c5ccb
commit
5cdbb8b140
Notes:
github-actions[bot]
2025-04-08 16:54:36 +00:00
Author: https://github.com/awesomekling
Commit: 5cdbb8b140
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4283
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/trflynn89
3 changed files with 4 additions and 10 deletions
|
@ -2630,7 +2630,7 @@ ThrowCompletionOr<void> CallConstruct::execute_impl(Bytecode::Interpreter& inter
|
|||
auto argument_values = interpreter.allocate_argument_values(m_argument_count);
|
||||
for (size_t i = 0; i < m_argument_count; ++i)
|
||||
argument_values[i] = interpreter.get(m_arguments[i]);
|
||||
interpreter.set(dst(), TRY(perform_call(interpreter, interpreter.get(m_this_value), CallType::Construct, callee, argument_values)));
|
||||
interpreter.set(dst(), TRY(perform_call(interpreter, Value(), CallType::Construct, callee, argument_values)));
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -3424,10 +3424,9 @@ ByteString Call::to_byte_string_impl(Bytecode::Executable const& executable) con
|
|||
ByteString CallConstruct::to_byte_string_impl(Bytecode::Executable const& executable) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.appendff("CallConstruct {}, {}, {}, "sv,
|
||||
builder.appendff("CallConstruct {}, {}, "sv,
|
||||
format_operand("dst"sv, m_dst, executable),
|
||||
format_operand("callee"sv, m_callee, executable),
|
||||
format_operand("this"sv, m_this_value, executable));
|
||||
format_operand("callee"sv, m_callee, executable));
|
||||
|
||||
builder.append(format_operand_list("args"sv, { m_arguments, m_argument_count }, executable));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue