mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 15:49:15 +00:00
LibJS/Bytecode: Un-templatize throw_if_needed_for_call()
This commit is contained in:
parent
72c31fdd01
commit
bcf7cdb679
Notes:
sideshowbarker
2024-07-17 01:06:10 +09:00
Author: https://github.com/awesomekling
Commit: bcf7cdb679
Pull-request: https://github.com/SerenityOS/serenity/pull/21619
Reviewed-by: https://github.com/Hendiadyoin1
3 changed files with 11 additions and 17 deletions
|
@ -1131,7 +1131,7 @@ ThrowCompletionOr<void> Call::execute_impl(Bytecode::Interpreter& interpreter) c
|
|||
auto& vm = interpreter.vm();
|
||||
auto callee = interpreter.reg(m_callee);
|
||||
|
||||
TRY(throw_if_needed_for_call(interpreter, *this, callee));
|
||||
TRY(throw_if_needed_for_call(interpreter, callee, call_type(), expression_string()));
|
||||
|
||||
MarkedVector<Value> argument_values(vm.heap());
|
||||
argument_values.ensure_capacity(m_argument_count);
|
||||
|
@ -1145,7 +1145,7 @@ ThrowCompletionOr<void> Call::execute_impl(Bytecode::Interpreter& interpreter) c
|
|||
ThrowCompletionOr<void> CallWithArgumentArray::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
auto callee = interpreter.reg(m_callee);
|
||||
TRY(throw_if_needed_for_call(interpreter, *this, callee));
|
||||
TRY(throw_if_needed_for_call(interpreter, callee, call_type(), expression_string()));
|
||||
auto argument_values = argument_list_evaluation(interpreter);
|
||||
interpreter.accumulator() = TRY(perform_call(interpreter, interpreter.reg(m_this_value), call_type(), callee, move(argument_values)));
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue