Drop unnecessary MacroAssembler::kCountIncludesReceiver

Change-Id: Id873b66e5170445a40b8c6319874b319c7cdd6d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5593070
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#94220}
This commit is contained in:
Toon Verwaest authored and V8 LUCI CQ committed 2024-06-04 07:22:08 +00:00
1 parent 87a7bcc525
commit 492a1d8e2a
22 files changed
+69 -131

No files matched your search

@@ -557,8 +557,7 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
__ masm()->LeaveFrame(StackFrame::BASELINE);
// Drop receiver + arguments.
__ masm()
-> DropArguments(params_size, MacroAssembler::kCountIncludesReceiver);
__ masm()->DropArguments(params_size);
__ masm()->Ret();
}
@@ -643,7 +643,7 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
__ masm()->LeaveFrame(StackFrame::BASELINE);
// Drop receiver + arguments.
__ masm()->DropArguments(params_size, MacroAssembler::kCountIncludesReceiver);
__ masm()->DropArguments(params_size);
__ masm()->Ret();
}
@@ -541,8 +541,7 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
__ masm()->LeaveFrame(StackFrame::BASELINE);
// Drop receiver + arguments.
__ masm()->DropArguments(params_size, scratch,
MacroAssembler::kCountIncludesReceiver);
__ masm()->DropArguments(params_size, scratch);
__ masm()->Ret();
}
@@ -581,8 +581,7 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
__ masm()->LeaveFrame(StackFrame::BASELINE);
// Drop receiver + arguments.
__ masm()->DropArguments(params_size, scratch,
MacroAssembler::kCountIncludesReceiver);
__ masm()->DropArguments(params_size, scratch);
__ masm()->Ret();
}
+6 -9
View File
@@ -130,7 +130,7 @@ void Generate_JSBuiltinsConstructStubHelper(MacroAssembler* masm) {
}
// Remove caller arguments from the stack and return.
__ DropArguments(scratch, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(scratch);
__ Jump(lr);
__ bind(&stack_overflow);
@@ -262,7 +262,7 @@ void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
__ LeaveFrame(StackFrame::CONSTRUCT);
// Remove caller arguments from the stack and return.
__ DropArguments(r1, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(r1);
__ Jump(lr);
__ bind(&check_receiver);
@@ -824,7 +824,7 @@ static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1,
__ LeaveFrame(StackFrame::INTERPRETED);
// Drop receiver + arguments.
__ DropArguments(params_size, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(params_size);
}
// Advance the current bytecode offset. This simulates what all bytecode
@@ -2058,8 +2058,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ ldr(r5, MemOperand(sp, kSystemPointerSize), ge); // thisArg
__ cmp(r0, Operand(JSParameterCount(2)), ge);
__ ldr(r2, MemOperand(sp, 2 * kSystemPointerSize), ge); // argArray
__ DropArgumentsAndPushNewReceiver(r0, r5,
MacroAssembler::kCountIncludesReceiver);
__ DropArgumentsAndPushNewReceiver(r0, r5);
}
// ----------- S t a t e -------------
@@ -2134,8 +2133,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ ldr(r5, MemOperand(sp, 2 * kSystemPointerSize), ge); // thisArgument
__ cmp(r0, Operand(JSParameterCount(3)), ge);
__ ldr(r2, MemOperand(sp, 3 * kSystemPointerSize), ge); // argumentsList
__ DropArgumentsAndPushNewReceiver(r0, r5,
MacroAssembler::kCountIncludesReceiver);
__ DropArgumentsAndPushNewReceiver(r0, r5);
}
// ----------- S t a t e -------------
@@ -2176,8 +2174,7 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ ldr(r2, MemOperand(sp, 2 * kSystemPointerSize), ge); // argumentsList
__ cmp(r0, Operand(JSParameterCount(3)), ge);
__ ldr(r3, MemOperand(sp, 3 * kSystemPointerSize), ge); // new.target
__ DropArgumentsAndPushNewReceiver(r0, r4,
MacroAssembler::kCountIncludesReceiver);
__ DropArgumentsAndPushNewReceiver(r0, r4);
}
// ----------- S t a t e -------------
+7 -7
View File
@@ -167,7 +167,7 @@ void Generate_JSBuiltinsConstructStubHelper(MacroAssembler* masm) {
}
// Remove caller arguments from the stack and return.
__ DropArguments(x1, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(x1);
__ Ret();
__ Bind(&stack_overflow);
@@ -339,7 +339,7 @@ void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
// Leave construct frame.
__ LeaveFrame(StackFrame::CONSTRUCT);
// Remove caller arguments from the stack and return.
__ DropArguments(x1, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(x1);
__ Ret();
// Otherwise we do a smi check and fall through to check if the return value
@@ -2372,7 +2372,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ Peek(arg_array, 2 * kSystemPointerSize);
__ bind(&done);
}
__ DropArguments(argc, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(argc);
__ PushArgument(this_arg);
// ----------- S t a t e -------------
@@ -2508,7 +2508,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ Peek(arguments_list, 3 * kSystemPointerSize);
__ bind(&done);
}
__ DropArguments(argc, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(argc);
__ PushArgument(this_argument);
// ----------- S t a t e -------------
@@ -2565,7 +2565,7 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ bind(&done);
}
__ DropArguments(argc, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(argc);
// Push receiver (undefined).
__ PushArgument(undefined_value);
@@ -4005,7 +4005,7 @@ void Generate_WasmResumeHelper(MacroAssembler* masm, wasm::OnResume on_resume) {
__ Bind(&suspend, BranchTargetIdentifier::kBtiJump);
__ LeaveFrame(StackFrame::STACK_SWITCH);
// Pop receiver + parameter.
__ DropArguments(2, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(2);
__ Ret(lr);
}
} // namespace
@@ -4381,7 +4381,7 @@ void JSToWasmWrapperHelper(MacroAssembler* masm, bool stack_switch) {
// instance and result array without suspend or
// or promise resolve/reject params for callback.
constexpr int64_t stack_arguments_in = 2;
__ DropArguments(stack_arguments_in, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(stack_arguments_in);
__ Ret();
// Catch handler for the stack-switching wrapper: reject the promise with the
+6 -10
View File
@@ -127,7 +127,7 @@ void Generate_JSBuiltinsConstructStubHelper(MacroAssembler* masm) {
}
// Remove caller arguments from the stack and return.
__ DropArguments(edx, ecx, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(edx, ecx);
__ ret(0);
__ bind(&stack_overflow);
@@ -265,7 +265,7 @@ void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
__ LeaveFrame(StackFrame::CONSTRUCT);
// Remove caller arguments from the stack and return.
__ DropArguments(edx, ecx, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(edx, ecx);
__ ret(0);
// Otherwise we do a smi check and fall through to check if the return value
@@ -756,8 +756,7 @@ static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1,
__ leave();
// Drop receiver + arguments.
__ DropArguments(params_size, scratch2,
MacroAssembler::kCountIncludesReceiver);
__ DropArguments(params_size, scratch2);
}
// Advance the current bytecode offset. This simulates what all bytecode
@@ -2121,8 +2120,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&no_arg_array);
}
__ bind(&no_this_arg);
__ DropArgumentsAndPushNewReceiver(eax, edi, ecx,
MacroAssembler::kCountIncludesReceiver);
__ DropArgumentsAndPushNewReceiver(eax, edi, ecx);
// Restore receiver to edi.
__ movd(edi, xmm0);
@@ -2228,8 +2226,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
// Spill argumentsList to use edx as a scratch register.
__ movd(xmm0, edx);
__ DropArgumentsAndPushNewReceiver(eax, ecx, edx,
MacroAssembler::kCountIncludesReceiver);
__ DropArgumentsAndPushNewReceiver(eax, ecx, edx);
// Restore argumentsList.
__ movd(edx, xmm0);
@@ -2285,8 +2282,7 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ movd(xmm0, ecx);
__ DropArgumentsAndPushNewReceiver(
eax, masm->RootAsOperand(RootIndex::kUndefinedValue), ecx,
MacroAssembler::kCountIncludesReceiver);
eax, masm->RootAsOperand(RootIndex::kUndefinedValue), ecx);
// Restore argumentsList.
__ movd(ecx, xmm0);
+6 -10
View File
@@ -128,7 +128,7 @@ void Generate_JSBuiltinsConstructStubHelper(MacroAssembler* masm) {
}
// Remove caller arguments from the stack and return.
__ DropArguments(rbx, rcx, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(rbx, rcx);
__ ret(0);
@@ -268,7 +268,7 @@ void Builtins::Generate_JSConstructStubGeneric(MacroAssembler* masm) {
__ movq(rbx, Operand(rbp, ConstructFrameConstants::kLengthOffset));
__ LeaveFrame(StackFrame::CONSTRUCT);
// Remove caller arguments from the stack and return.
__ DropArguments(rbx, rcx, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(rbx, rcx);
__ ret(0);
// If the result is a smi, it is *not* an object in the ECMA sense.
@@ -961,8 +961,7 @@ static void LeaveInterpreterFrame(MacroAssembler* masm, Register scratch1,
__ leave();
// Drop receiver + arguments.
__ DropArguments(params_size, scratch2,
MacroAssembler::kCountIncludesReceiver);
__ DropArguments(params_size, scratch2);
}
// Tail-call |function_id| if |actual_state| == |expected_state|
@@ -2106,8 +2105,7 @@ void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
__ bind(&no_arg_array);
}
__ bind(&no_this_arg);
__ DropArgumentsAndPushNewReceiver(rax, rdx, rcx,
MacroAssembler::kCountIncludesReceiver);
__ DropArgumentsAndPushNewReceiver(rax, rdx, rcx);
}
// ----------- S t a t e -------------
@@ -2209,8 +2207,7 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
__ j(below, &done, Label::kNear);
__ movq(rbx, args[3]); // argumentsList
__ bind(&done);
__ DropArgumentsAndPushNewReceiver(rax, rdx, rcx,
MacroAssembler::kCountIncludesReceiver);
__ DropArgumentsAndPushNewReceiver(rax, rdx, rcx);
}
// ----------- S t a t e -------------
@@ -2259,8 +2256,7 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
__ movq(rdx, args[3]); // new.target
__ bind(&done);
__ DropArgumentsAndPushNewReceiver(
rax, masm->RootAsOperand(RootIndex::kUndefinedValue), rcx,
MacroAssembler::kCountIncludesReceiver);
rax, masm->RootAsOperand(RootIndex::kUndefinedValue), rcx);
}
// ----------- S t a t e -------------
+4 -15
View File
@@ -1375,26 +1375,15 @@ void MacroAssembler::StubPrologue(StackFrame::Type type) {
void MacroAssembler::Prologue() { PushStandardFrame(r1); }
void MacroAssembler::DropArguments(Register count, ArgumentsCountMode mode) {
int receiver_bytes = (mode == kCountExcludesReceiver) ? kPointerSize : 0;
void MacroAssembler::DropArguments(Register count) {
add(sp, sp, Operand(count, LSL, kPointerSizeLog2), LeaveCC);
if (receiver_bytes != 0) {
add(sp, sp, Operand(receiver_bytes), LeaveCC);
}
}
void MacroAssembler::DropArgumentsAndPushNewReceiver(Register argc,
Register receiver,
ArgumentsCountMode mode) {
Register receiver) {
DCHECK(!AreAliased(argc, receiver));
if (mode == kCountExcludesReceiver) {
// Drop arguments without receiver and override old receiver.
DropArguments(argc, kCountIncludesReceiver);
str(receiver, MemOperand(sp, 0));
} else {
DropArguments(argc, mode);
push(receiver);
}
DropArguments(argc);
push(receiver);
}
void MacroAssembler::EnterFrame(StackFrame::Type type,
+2 -4
View File
@@ -78,10 +78,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public MacroAssemblerBase {
void StubPrologue(StackFrame::Type type);
void Prologue();
enum ArgumentsCountMode { kCountIncludesReceiver, kCountExcludesReceiver };
void DropArguments(Register count, ArgumentsCountMode mode);
void DropArgumentsAndPushNewReceiver(Register argc, Register receiver,
ArgumentsCountMode mode);
void DropArguments(Register count);
void DropArgumentsAndPushNewReceiver(Register argc, Register receiver);
// Push a standard frame, consisting of lr, fp, context and JS function
void PushStandardFrame(Register function_reg);
+2 -11
View File
@@ -1443,13 +1443,8 @@ void MacroAssembler::Drop(const Register& count, uint64_t unit_size) {
Add(sp, sp, size);
}
void MacroAssembler::DropArguments(const Register& count,
ArgumentsCountMode mode) {
void MacroAssembler::DropArguments(const Register& count) {
int extra_slots = 1; // Padding slot.
if (mode == kCountExcludesReceiver) {
// Add a slot for the receiver.
++extra_slots;
}
UseScratchRegisterScope temps(this);
Register tmp = temps.AcquireX();
Add(tmp, count, extra_slots);
@@ -1457,11 +1452,7 @@ void MacroAssembler::DropArguments(const Register& count,
Drop(tmp, kXRegSize);
}
void MacroAssembler::DropArguments(int64_t count, ArgumentsCountMode mode) {
if (mode == kCountExcludesReceiver) {
// Add a slot for the receiver.
++count;
}
void MacroAssembler::DropArguments(int64_t count) {
Drop(RoundUp(count, 2), kXRegSize);
}
+2 -7
View File
@@ -825,13 +825,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public MacroAssemblerBase {
// Drop 'count' arguments from the stack, rounded up to a multiple of two,
// without actually accessing memory.
// We assume the size of the arguments is the pointer size.
// An optional mode argument is passed, which can indicate we need to
// explicitly add the receiver to the count.
enum ArgumentsCountMode { kCountIncludesReceiver, kCountExcludesReceiver };
inline void DropArguments(const Register& count,
ArgumentsCountMode mode = kCountIncludesReceiver);
inline void DropArguments(int64_t count,
ArgumentsCountMode mode = kCountIncludesReceiver);
inline void DropArguments(const Register& count);
inline void DropArguments(int64_t count);
// Drop 'count' slots from stack, rounded up to a multiple of two, without
// actually accessing memory.
+8 -13
View File
@@ -1085,39 +1085,34 @@ void MacroAssembler::Prologue() {
push(kJavaScriptCallArgCountRegister); // Actual argument count.
}
void MacroAssembler::DropArguments(Register count, ArgumentsCountMode mode) {
int receiver_bytes =
(mode == kCountExcludesReceiver) ? kSystemPointerSize : 0;
lea(esp, Operand(esp, count, times_system_pointer_size, receiver_bytes));
void MacroAssembler::DropArguments(Register count) {
lea(esp, Operand(esp, count, times_system_pointer_size, 0));
}
void MacroAssembler::DropArguments(Register count, Register scratch,
ArgumentsCountMode mode) {
void MacroAssembler::DropArguments(Register count, Register scratch) {
DCHECK(!AreAliased(count, scratch));
PopReturnAddressTo(scratch);
DropArguments(count, mode);
DropArguments(count);
PushReturnAddressFrom(scratch);
}
void MacroAssembler::DropArgumentsAndPushNewReceiver(Register argc,
Register receiver,
Register scratch,
ArgumentsCountMode mode) {
Register scratch) {
DCHECK(!AreAliased(argc, receiver, scratch));
PopReturnAddressTo(scratch);
DropArguments(argc, mode);
DropArguments(argc);
Push(receiver);
PushReturnAddressFrom(scratch);
}
void MacroAssembler::DropArgumentsAndPushNewReceiver(Register argc,
Operand receiver,
Register scratch,
ArgumentsCountMode mode) {
Register scratch) {
DCHECK(!AreAliased(argc, scratch));
DCHECK(!receiver.is_reg(scratch));
PopReturnAddressTo(scratch);
DropArguments(argc, mode);
DropArguments(argc);
Push(receiver);
PushReturnAddressFrom(scratch);
}
+4 -8
View File
@@ -257,14 +257,11 @@ class V8_EXPORT_PRIVATE MacroAssembler
void Prologue();
// Helpers for argument handling
enum ArgumentsCountMode { kCountIncludesReceiver, kCountExcludesReceiver };
void DropArguments(Register count, Register scratch, ArgumentsCountMode mode);
void DropArguments(Register count, Register scratch);
void DropArgumentsAndPushNewReceiver(Register argc, Register receiver,
Register scratch,
ArgumentsCountMode mode);
Register scratch);
void DropArgumentsAndPushNewReceiver(Register argc, Operand receiver,
Register scratch,
ArgumentsCountMode mode);
Register scratch);
void Lzcnt(Register dst, Register src) { Lzcnt(dst, Operand(src)); }
void Lzcnt(Register dst, Operand src);
@@ -676,8 +673,7 @@ class V8_EXPORT_PRIVATE MacroAssembler
protected:
// Drops arguments assuming that the return address was already popped.
void DropArguments(Register count,
ArgumentsCountMode mode = kCountExcludesReceiver);
void DropArguments(Register count);
private:
// Helper functions for generating invokes.
+8 -13
View File
@@ -2754,39 +2754,34 @@ void MacroAssembler::DropUnderReturnAddress(int stack_elements,
PushReturnAddressFrom(scratch);
}
void MacroAssembler::DropArguments(Register count, ArgumentsCountMode mode) {
int receiver_bytes =
(mode == kCountExcludesReceiver) ? kSystemPointerSize : 0;
leaq(rsp, Operand(rsp, count, times_system_pointer_size, receiver_bytes));
void MacroAssembler::DropArguments(Register count) {
leaq(rsp, Operand(rsp, count, times_system_pointer_size, 0));
}
void MacroAssembler::DropArguments(Register count, Register scratch,
ArgumentsCountMode mode) {
void MacroAssembler::DropArguments(Register count, Register scratch) {
DCHECK(!AreAliased(count, scratch));
PopReturnAddressTo(scratch);
DropArguments(count, mode);
DropArguments(count);
PushReturnAddressFrom(scratch);
}
void MacroAssembler::DropArgumentsAndPushNewReceiver(Register argc,
Register receiver,
Register scratch,
ArgumentsCountMode mode) {
Register scratch) {
DCHECK(!AreAliased(argc, receiver, scratch));
PopReturnAddressTo(scratch);
DropArguments(argc, mode);
DropArguments(argc);
Push(receiver);
PushReturnAddressFrom(scratch);
}
void MacroAssembler::DropArgumentsAndPushNewReceiver(Register argc,
Operand receiver,
Register scratch,
ArgumentsCountMode mode) {
Register scratch) {
DCHECK(!AreAliased(argc, scratch));
DCHECK(!receiver.AddressUsesRegister(scratch));
PopReturnAddressTo(scratch);
DropArguments(argc, mode);
DropArguments(argc);
Push(receiver);
PushReturnAddressFrom(scratch);
}
+4 -8
View File
@@ -536,14 +536,11 @@ class V8_EXPORT_PRIVATE MacroAssembler
void Prologue();
// Helpers for argument handling
enum ArgumentsCountMode { kCountIncludesReceiver, kCountExcludesReceiver };
void DropArguments(Register count, Register scratch, ArgumentsCountMode mode);
void DropArguments(Register count, Register scratch);
void DropArgumentsAndPushNewReceiver(Register argc, Register receiver,
Register scratch,
ArgumentsCountMode mode);
Register scratch);
void DropArgumentsAndPushNewReceiver(Register argc, Operand receiver,
Register scratch,
ArgumentsCountMode mode);
Register scratch);
// Calls Abort(msg) if the condition cc is not satisfied.
// Use --debug_code to enable.
@@ -1111,8 +1108,7 @@ class V8_EXPORT_PRIVATE MacroAssembler
Register GetSmiConstant(Tagged<Smi> value);
// Drops arguments assuming that the return address was already popped.
void DropArguments(Register count,
ArgumentsCountMode mode = kCountExcludesReceiver);
void DropArguments(Register count);
private:
// Helper functions for generating invokes.
@@ -3968,7 +3968,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) {
__ cmp(argc_reg, Operand(parameter_slots));
__ mov(argc_reg, Operand(parameter_slots), LeaveCC, lt);
}
__ DropArguments(argc_reg, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(argc_reg);
} else if (additional_pop_count->IsImmediate()) {
DCHECK_EQ(Constant::kInt32, g.ToConstant(additional_pop_count).type());
int additional_count = g.ToConstant(additional_pop_count).ToInt32();
@@ -4215,8 +4215,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) {
__ j(greater, &mismatch_return, Label::kNear);
__ Ret(parameter_slots * kSystemPointerSize, scratch_reg);
__ bind(&mismatch_return);
__ DropArguments(argc_reg, scratch_reg,
MacroAssembler::kCountIncludesReceiver);
__ DropArguments(argc_reg, scratch_reg);
// We use a return instead of a jump for better return address prediction.
__ Ret();
} else if (additional_pop_count->IsImmediate()) {
@@ -7478,8 +7478,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) {
__ j(greater, &mismatch_return, Label::kNear);
__ Ret(parameter_slots * kSystemPointerSize, scratch_reg);
__ bind(&mismatch_return);
__ DropArguments(argc_reg, scratch_reg,
MacroAssembler::kCountIncludesReceiver);
__ DropArguments(argc_reg, scratch_reg);
// We use a return instead of a jump for better return address prediction.
__ Ret();
} else if (additional_pop_count->IsImmediate()) {
+1 -1
View File
@@ -918,7 +918,7 @@ void Return::GenerateCode(MaglevAssembler* masm, const ProcessingState& state) {
__ bind(&corrected_args_count);
// Drop receiver + arguments according to dynamic arguments size.
__ DropArguments(params_size, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(params_size);
__ Ret();
}
+1 -1
View File
@@ -859,7 +859,7 @@ void Return::GenerateCode(MaglevAssembler* masm, const ProcessingState& state) {
__ LeaveFrame(StackFrame::MAGLEV);
// Drop receiver + arguments according to dynamic arguments size.
__ DropArguments(params_size, MacroAssembler::kCountIncludesReceiver);
__ DropArguments(params_size);
__ Ret();
}
+1 -2
View File
@@ -851,8 +851,7 @@ void Return::GenerateCode(MaglevAssembler* masm, const ProcessingState& state) {
__ bind(&drop_dynamic_arg_size);
// Drop receiver + arguments according to dynamic arguments size.
__ DropArguments(actual_params_size, r9,
MacroAssembler::kCountIncludesReceiver);
__ DropArguments(actual_params_size, r9);
__ Ret();
}