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