| 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 c8134ffd9b46d57b7a74912f30ad517e33041b97..5ff766b4b4621579c33e40daddf4628a4dd5e1f3 100644
|
| --- a/src/full-codegen/mips64/full-codegen-mips64.cc
|
| +++ b/src/full-codegen/mips64/full-codegen-mips64.cc
|
| @@ -295,32 +295,26 @@ void FullCodeGenerator::Generate() {
|
| if (arguments != NULL) {
|
| // Function uses arguments object.
|
| Comment cmnt(masm_, "[ Allocate arguments object");
|
| + DCHECK(a1.is(ArgumentsAccessNewDescriptor::function()));
|
| if (!function_in_register_a1) {
|
| // Load this again, if it's used by the local context below.
|
| - __ ld(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
| - } else {
|
| - __ mov(a3, a1);
|
| + __ ld(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
| }
|
| // Receiver is just before the parameters on the caller's stack.
|
| int num_parameters = info->scope()->num_parameters();
|
| int offset = num_parameters * kPointerSize;
|
| - __ Daddu(a2, fp,
|
| - Operand(StandardFrameConstants::kCallerSPOffset + offset));
|
| - __ li(a1, Operand(Smi::FromInt(num_parameters)));
|
| - __ Push(a3, a2, a1);
|
| + __ li(ArgumentsAccessNewDescriptor::parameter_count(),
|
| + Operand(Smi::FromInt(num_parameters)));
|
| + __ Daddu(ArgumentsAccessNewDescriptor::parameter_pointer(), fp,
|
| + Operand(StandardFrameConstants::kCallerSPOffset + offset));
|
|
|
| // Arguments to ArgumentsAccessStub:
|
| - // function, receiver address, parameter count.
|
| - // The stub will rewrite receiever and parameter count if the previous
|
| - // stack frame was an arguments adapter frame.
|
| - ArgumentsAccessStub::Type type;
|
| - if (is_strict(language_mode()) || !has_simple_parameters()) {
|
| - type = ArgumentsAccessStub::NEW_STRICT;
|
| - } else if (literal()->has_duplicate_parameters()) {
|
| - type = ArgumentsAccessStub::NEW_SLOPPY_SLOW;
|
| - } else {
|
| - type = ArgumentsAccessStub::NEW_SLOPPY_FAST;
|
| - }
|
| + // function, parameter pointer, parameter count.
|
| + // The stub will rewrite parameter pointer and parameter count if the
|
| + // previous stack frame was an arguments adapter frame.
|
| + bool is_unmapped = is_strict(language_mode()) || !has_simple_parameters();
|
| + ArgumentsAccessStub::Type type = ArgumentsAccessStub::ComputeType(
|
| + is_unmapped, literal()->has_duplicate_parameters());
|
| ArgumentsAccessStub stub(isolate(), type);
|
| __ CallStub(&stub);
|
|
|
|
|