[cleanup] Dead code in InvokePrologue stub

kDontAdaptArgumentsSentinel is now always equal to zero.

Change-Id: I8f0a930b22cdc88279de66324c23800dd3a93bb4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3985725
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83951}
This commit is contained in:
Victor Gomes 2022-10-27 11:36:43 +02:00 committed by V8 LUCI CQ
parent f1d16aebe4
commit 212028f4eb
10 changed files with 1 additions and 65 deletions

View File

@ -1635,13 +1635,6 @@ void MacroAssembler::InvokePrologue(Register expected_parameter_count,
DCHECK_EQ(actual_parameter_count, r0);
DCHECK_EQ(expected_parameter_count, r2);
// If the expected parameter count is equal to the adaptor sentinel, no need
// to push undefined value as arguments.
if (kDontAdaptArgumentsSentinel != 0) {
cmp(expected_parameter_count, Operand(kDontAdaptArgumentsSentinel));
b(eq, &regular_invoke);
}
// If overapplication or if the actual argument count is equal to the
// formal parameter count, no need to push extra undefined values.
sub(expected_parameter_count, expected_parameter_count,

View File

@ -2506,13 +2506,6 @@ void MacroAssembler::InvokePrologue(Register formal_parameter_count,
DCHECK_EQ(actual_argument_count, x0);
DCHECK_EQ(formal_parameter_count, x2);
// If the formal parameter count is equal to the adaptor sentinel, no need
// to push undefined value as arguments.
if (kDontAdaptArgumentsSentinel != 0) {
Cmp(formal_parameter_count, Operand(kDontAdaptArgumentsSentinel));
B(eq, &regular_invoke);
}
// If overapplication or if the actual argument count is equal to the
// formal parameter count, no need to push extra undefined values.
Register extra_argument_count = x2;

View File

@ -1399,13 +1399,6 @@ void MacroAssembler::InvokePrologue(Register expected_parameter_count,
DCHECK_EQ(expected_parameter_count, ecx);
Label regular_invoke;
// If the expected parameter count is equal to the adaptor sentinel, no need
// to push undefined value as arguments.
if (kDontAdaptArgumentsSentinel != 0) {
cmp(expected_parameter_count, Immediate(kDontAdaptArgumentsSentinel));
j(equal, &regular_invoke, Label::kFar);
}
// If overapplication or if the actual argument count is equal to the
// formal parameter count, no need to push extra undefined values.
sub(expected_parameter_count, actual_parameter_count);

View File

@ -3033,13 +3033,6 @@ void MacroAssembler::InvokePrologue(Register expected_parameter_count,
DCHECK_EQ(actual_parameter_count, a0);
DCHECK_EQ(expected_parameter_count, a2);
// If the expected parameter count is equal to the adaptor sentinel, no need
// to push undefined value as arguments.
if (kDontAdaptArgumentsSentinel != 0) {
Branch(&regular_invoke, eq, expected_parameter_count,
Operand(kDontAdaptArgumentsSentinel));
}
// If overapplication or if the actual argument count is equal to the
// formal parameter count, no need to push extra undefined values.
sub_d(expected_parameter_count, expected_parameter_count,

View File

@ -4951,13 +4951,6 @@ void MacroAssembler::InvokePrologue(Register expected_parameter_count,
DCHECK_EQ(actual_parameter_count, a0);
DCHECK_EQ(expected_parameter_count, a2);
// If the expected parameter count is equal to the adaptor sentinel, no need
// to push undefined value as arguments.
if (kDontAdaptArgumentsSentinel != 0) {
Branch(&regular_invoke, eq, expected_parameter_count,
Operand(kDontAdaptArgumentsSentinel));
}
// If overapplication or if the actual argument count is equal to the
// formal parameter count, no need to push extra undefined values.
Dsubu(expected_parameter_count, expected_parameter_count,

View File

@ -1524,14 +1524,6 @@ void MacroAssembler::InvokePrologue(Register expected_parameter_count,
DCHECK_EQ(actual_parameter_count, r3);
DCHECK_EQ(expected_parameter_count, r5);
// If the expected parameter count is equal to the adaptor sentinel, no need
// to push undefined value as arguments.
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.
sub(expected_parameter_count, expected_parameter_count,

View File

@ -4791,12 +4791,6 @@ void MacroAssembler::InvokePrologue(Register expected_parameter_count,
DCHECK_EQ(actual_parameter_count, a0);
DCHECK_EQ(expected_parameter_count, a2);
// If the expected parameter count is equal to the adaptor sentinel, no need
// to push undefined value as arguments.
if (kDontAdaptArgumentsSentinel != 0) {
Branch(&regular_invoke, eq, expected_parameter_count,
Operand(kDontAdaptArgumentsSentinel));
}
// If overapplication or if the actual argument count is equal to the
// formal parameter count, no need to push extra undefined values.
SubWord(expected_parameter_count, expected_parameter_count,

View File

@ -1707,13 +1707,6 @@ void MacroAssembler::InvokePrologue(Register expected_parameter_count,
DCHECK_EQ(actual_parameter_count, r2);
DCHECK_EQ(expected_parameter_count, r4);
// If the expected parameter count is equal to the adaptor sentinel, no need
// to push undefined value as arguments.
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.
SubS64(expected_parameter_count, expected_parameter_count,

View File

@ -3002,12 +3002,6 @@ void MacroAssembler::InvokePrologue(Register expected_parameter_count,
return;
}
Label regular_invoke;
// If the expected parameter count is equal to the adaptor sentinel, no need
// to push undefined value as arguments.
if (kDontAdaptArgumentsSentinel != 0) {
cmpl(expected_parameter_count, Immediate(kDontAdaptArgumentsSentinel));
j(equal, &regular_invoke, Label::kFar);
}
// If overapplication or if the actual argument count is equal to the
// formal parameter count, no need to push extra undefined values.

View File

@ -32,9 +32,7 @@ class WasmImportWrapperCache {
uint32_t canonical_type_index, int expected_arity, Suspend suspend)
: kind(kind),
canonical_type_index(canonical_type_index),
expected_arity(expected_arity == kDontAdaptArgumentsSentinel
? 0
: expected_arity),
expected_arity(expected_arity),
suspend(suspend) {}
bool operator==(const CacheKey& rhs) const {