Commit 74ca05b0 authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/s390: Omit check against kDontAdaptArgumentsSentinel

Port aa259e30

Original Commit Message:

    When kDontAdaptArgumentsSentinel is 0 (the receiver is included in the
    argument count), we don't need a dedicated check against the sentinel
    before comparing the formal parameter count to the actual argument count
    when calling a JS function.

R=pthier@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I055ce6d72da8140aa81acd41f917e1e9a7751f72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3175663Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Reviewed-by: 's avatarPatrick Thier <pthier@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77011}
parent e910fc75
......@@ -1474,9 +1474,11 @@ void MacroAssembler::InvokePrologue(Register expected_parameter_count,
// If the expected parameter count is equal to the adaptor sentinel, no need
// to push undefined value as arguments.
mov(r0, Operand(kDontAdaptArgumentsSentinel));
CmpS64(expected_parameter_count, r0);
beq(&regular_invoke);
if (kDontAdaptArgumentsSentinel != 0) {
mov(r0, Operand(kDontAdaptArgumentsSentinel));
CmpS64(expected_parameter_count, r0);
beq(&regular_invoke);
}
// If overapplication or if the actual argument count is equal to the
// formal parameter count, no need to push extra undefined values.
......
......@@ -1656,8 +1656,10 @@ void MacroAssembler::InvokePrologue(Register expected_parameter_count,
// If the expected parameter count is equal to the adaptor sentinel, no need
// to push undefined value as arguments.
CmpS64(expected_parameter_count, Operand(kDontAdaptArgumentsSentinel));
beq(&regular_invoke);
if (kDontAdaptArgumentsSentinel != 0) {
CmpS64(expected_parameter_count, Operand(kDontAdaptArgumentsSentinel));
beq(&regular_invoke);
}
// If overapplication or if the actual argument count is equal to the
// formal parameter count, no need to push extra undefined values.
......
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