Index: src/mips64/full-codegen-mips64.cc |
diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc |
index 79052b958c71af7b3e089f0eaa23e42f92e281df..b3d8ec4000605e9152c38cdb4e05a8324c7f4ff7 100644 |
--- a/src/mips64/full-codegen-mips64.cc |
+++ b/src/mips64/full-codegen-mips64.cc |
@@ -245,6 +245,27 @@ void FullCodeGenerator::Generate() { |
} |
} |
} |
+ |
+ // Possibly allocate RestParameters |
+ int rest_index; |
+ Variable* rest_param = scope()->rest_parameter(&rest_index); |
+ if (rest_param) { |
+ Comment cmnt(masm_, "[ Allocate rest parametere array"); |
+ |
+ int num_parameters = info->scope()->num_parameters(); |
+ int offset = num_parameters * kPointerSize; |
+ __ Daddu(a3, fp, |
+ Operand(StandardFrameConstants::kCallerSPOffset + offset)); |
+ __ li(a2, Operand(Smi::FromInt(num_parameters))); |
+ __ li(a1, Operand(Smi::FromInt(rest_index))); |
+ __ Push(a3, a2, a1); |
+ |
+ RestParamAccessStub stub(isolate()); |
+ __ CallStub(&stub); |
+ |
+ SetVar(rest_param, v0, a1, a2); |
+ } |
+ |
Variable* arguments = scope()->arguments(); |
if (arguments != NULL) { |
// Function uses arguments object. |
@@ -268,7 +289,7 @@ void FullCodeGenerator::Generate() { |
// 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())) { |
+ if (is_strict(language_mode()) || !is_simple_parameter_list()) { |
type = ArgumentsAccessStub::NEW_STRICT; |
} else if (function()->has_duplicate_parameters()) { |
type = ArgumentsAccessStub::NEW_SLOPPY_SLOW; |