Commit 3af53301 authored by Victor Gomes's avatar Victor Gomes Committed by Commit Bot

[codegen] Add varargs parameter to the CallWithSpreadDescriptor

The CallWithSpread builtin actually receives a variable number of arguments. This is necessary when running with the arguments reversed in the stack (v8_enable_reverse_jsargs).

Change-Id: I57f67cbef4f2eb7dbb7c245b9a070c3b44d1bfce
Bug: v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2292233
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68802}
parent 331a2938
......@@ -968,7 +968,7 @@ class CallFunctionTemplateDescriptor : public CallInterfaceDescriptor {
class CallWithSpreadDescriptor : public CallInterfaceDescriptor {
public:
DEFINE_PARAMETERS(kTarget, kArgumentsCount, kSpread)
DEFINE_PARAMETERS_VARARGS(kTarget, kArgumentsCount, kSpread)
DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kTarget
MachineType::Int32(), // kArgumentsCount
MachineType::AnyTagged()) // kSpread
......@@ -978,8 +978,8 @@ class CallWithSpreadDescriptor : public CallInterfaceDescriptor {
// TODO(jgruber): Pass the slot as UintPtr.
class CallWithSpread_WithFeedbackDescriptor : public CallInterfaceDescriptor {
public:
DEFINE_PARAMETERS(kTarget, kArgumentsCount, kSpread, kSlot,
kMaybeFeedbackVector)
DEFINE_PARAMETERS_VARARGS(kTarget, kArgumentsCount, kSpread, kSlot,
kMaybeFeedbackVector)
DEFINE_PARAMETER_TYPES(MachineType::AnyTagged(), // kTarget
MachineType::Int32(), // kArgumentsCount
MachineType::AnyTagged(), // kSpread
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment