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 58806f208b87865d86833851683a8c978478e23f..eccc93e9e2ab2b89cedd04754e78a78d4fcae1d7 100644 |
--- a/src/crankshaft/ia32/lithium-codegen-ia32.cc |
+++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc |
@@ -176,15 +176,17 @@ void LCodeGen::DoPrologue(LPrologue* instr) { |
__ CallRuntime(Runtime::kNewScriptContext); |
deopt_mode = Safepoint::kLazyDeopt; |
} else { |
- if (slots <= FastNewFunctionContextStub::kMaximumSlots) { |
- FastNewFunctionContextStub stub(isolate()); |
+ if (slots <= FastNewFunctionContextStub::MaximumSlots()) { |
+ FastNewFunctionContextStub stub(isolate(), |
+ info()->scope()->scope_type()); |
__ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
Immediate(slots)); |
__ CallStub(&stub); |
// Result of FastNewFunctionContextStub is always in new space. |
need_write_barrier = false; |
} else { |
- __ push(edi); |
+ __ Push(edi); |
+ __ Push(Smi::FromInt(info()->scope()->scope_type())); |
__ CallRuntime(Runtime::kNewFunctionContext); |
} |
} |