| Index: src/full-codegen/mips64/full-codegen-mips64.cc
|
| diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc
|
| index 1539cc4fe0a78d5de52f2769e0a96d291640d0b8..438f76c5168ba64fc32cdc7121e51c028f4128b9 100644
|
| --- a/src/full-codegen/mips64/full-codegen-mips64.cc
|
| +++ b/src/full-codegen/mips64/full-codegen-mips64.cc
|
| @@ -285,11 +285,23 @@
|
| if (is_strict(language_mode()) || !has_simple_parameters()) {
|
| FastNewStrictArgumentsStub stub(isolate());
|
| __ CallStub(&stub);
|
| - } else if (literal()->has_duplicate_parameters()) {
|
| - __ Push(a1);
|
| - __ CallRuntime(Runtime::kNewSloppyArguments_Generic);
|
| } else {
|
| - FastNewSloppyArgumentsStub stub(isolate());
|
| + DCHECK(a1.is(ArgumentsAccessNewDescriptor::function()));
|
| + // Receiver is just before the parameters on the caller's stack.
|
| + int num_parameters = info->scope()->num_parameters();
|
| + int offset = num_parameters * kPointerSize;
|
| + __ li(ArgumentsAccessNewDescriptor::parameter_count(),
|
| + Operand(Smi::FromInt(num_parameters)));
|
| + __ Daddu(ArgumentsAccessNewDescriptor::parameter_pointer(), fp,
|
| + Operand(StandardFrameConstants::kCallerSPOffset + offset));
|
| +
|
| + // Arguments to ArgumentsAccessStub:
|
| + // function, parameter pointer, parameter count.
|
| + // The stub will rewrite parameter pointer and parameter count if the
|
| + // previous stack frame was an arguments adapter frame.
|
| + ArgumentsAccessStub::Type type = ArgumentsAccessStub::ComputeType(
|
| + literal()->has_duplicate_parameters());
|
| + ArgumentsAccessStub stub(isolate(), type);
|
| __ CallStub(&stub);
|
| }
|
|
|
|
|