| Index: src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| index a5478df1c984b67611fc6f597919a57ba24a1607..b07dc256f50446611b1f41c4836f7a3a49528d2b 100644
|
| --- a/src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| +++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| @@ -595,11 +595,16 @@ void LCodeGen::DoPrologue(LPrologue* instr) {
|
| __ CallRuntime(Runtime::kNewScriptContext);
|
| deopt_mode = Safepoint::kLazyDeopt;
|
| } else {
|
| - FastNewFunctionContextStub stub(isolate());
|
| - __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), 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(), slots);
|
| + __ CallStub(&stub);
|
| + // Result of FastNewFunctionContextStub is always in new space.
|
| + need_write_barrier = false;
|
| + } else {
|
| + __ Push(x1);
|
| + __ CallRuntime(Runtime::kNewFunctionContext);
|
| + }
|
| }
|
| RecordSafepoint(deopt_mode);
|
| // Context is returned in x0. It replaces the context passed to us. It's
|
|
|