Index: src/crankshaft/x64/lithium-codegen-x64.cc |
diff --git a/src/crankshaft/x64/lithium-codegen-x64.cc b/src/crankshaft/x64/lithium-codegen-x64.cc |
index 0f18b720fbee03e2d1f9e551bd21b8cda5de6c95..6ee6ffa5a17356babbe6e843bf285a9246f99caa 100644 |
--- a/src/crankshaft/x64/lithium-codegen-x64.cc |
+++ b/src/crankshaft/x64/lithium-codegen-x64.cc |
@@ -179,14 +179,16 @@ 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()); |
__ Set(FastNewFunctionContextDescriptor::SlotsRegister(), slots); |
__ CallStub(&stub); |
// Result of FastNewFunctionContextStub is always in new space. |
need_write_barrier = false; |
} else { |
__ Push(rdi); |
+ __ Push(Smi::FromInt(info()->scope()->scope_type())); |
__ CallRuntime(Runtime::kNewFunctionContext); |
} |
} |