mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +00:00
LibJS: Pass call/construct argument lists as ReadonlySpan<Value>
(Instead of MarkedVector<Value>.) This is a step towards not storing argument lists in MarkedVector<Value> at all. Note that they still end up in MarkedVectors since that's what ExecutionContext has.
This commit is contained in:
parent
9fa6628efa
commit
ece961f882
29 changed files with 119 additions and 112 deletions
|
@ -2505,7 +2505,10 @@ ThrowCompletionOr<Value> Value::invoke_internal(VM& vm, PropertyKey const& prope
|
|||
auto function = TRY(get(vm, property_key));
|
||||
|
||||
// 3. Return ? Call(func, V, argumentsList).
|
||||
return call(vm, function, *this, move(arguments));
|
||||
ReadonlySpan<Value> argument_list;
|
||||
if (arguments.has_value())
|
||||
argument_list = arguments.value().span();
|
||||
return call(vm, function, *this, argument_list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue