| Index: src/crankshaft/arm/lithium-codegen-arm.cc
|
| diff --git a/src/crankshaft/arm/lithium-codegen-arm.cc b/src/crankshaft/arm/lithium-codegen-arm.cc
|
| index da3ab6b58fa93a0f1009069e030be357870e9d0c..6a552d7a382e649dc015d081045fca117e483929 100644
|
| --- a/src/crankshaft/arm/lithium-codegen-arm.cc
|
| +++ b/src/crankshaft/arm/lithium-codegen-arm.cc
|
| @@ -164,11 +164,17 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
|
| __ CallRuntime(Runtime::kNewScriptContext);
|
| deopt_mode = Safepoint::kLazyDeopt;
|
| } else {
|
| - FastNewFunctionContextStub stub(isolate());
|
| - __ mov(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());
|
| + __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
|
| + Operand(slots));
|
| + __ CallStub(&stub);
|
| + // Result of FastNewFunctionContextStub is always in new space.
|
| + need_write_barrier = false;
|
| + } else {
|
| + __ push(r1);
|
| + __ CallRuntime(Runtime::kNewFunctionContext);
|
| + }
|
| }
|
| RecordSafepoint(deopt_mode);
|
|
|
|
|