| Index: src/full-codegen/mips/full-codegen-mips.cc
|
| diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc
|
| index 290c27401899fc1c49cf8bbaf41ae59abba9a363..38799bf8eff67896bdb6fcf05d792abf52c4db43 100644
|
| --- a/src/full-codegen/mips/full-codegen-mips.cc
|
| +++ b/src/full-codegen/mips/full-codegen-mips.cc
|
| @@ -210,11 +210,17 @@ void FullCodeGenerator::Generate() {
|
| if (info->scope()->new_target_var() != nullptr) {
|
| __ push(a3); // Preserve new target.
|
| }
|
| - FastNewFunctionContextStub stub(isolate());
|
| - __ li(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots));
|
| - __ CallStub(&stub);
|
| - // Result of FastNewFunctionContextStub is always in new space.
|
| - need_write_barrier = false;
|
| + if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
|
| + FastNewFunctionContextStub stub(isolate());
|
| + __ li(FastNewFunctionContextDescriptor::SlotsRegister(),
|
| + Operand(slots));
|
| + __ CallStub(&stub);
|
| + // Result of FastNewFunctionContextStub is always in new space.
|
| + need_write_barrier = false;
|
| + } else {
|
| + __ push(a1);
|
| + __ CallRuntime(Runtime::kNewFunctionContext);
|
| + }
|
| if (info->scope()->new_target_var() != nullptr) {
|
| __ pop(a3); // Restore new target.
|
| }
|
|
|