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 3765cd679b30d35c7600c933f3b6c49ee6700b5e..ae2d85cb23e30088ee651075cf0a06263b9abf2b 100644 |
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc |
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
@@ -618,14 +618,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()); |
__ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots); |
__ CallStub(&stub); |
// Result of FastNewFunctionContextStub is always in new space. |
need_write_barrier = false; |
} else { |
__ Push(x1); |
+ __ Push(Smi::FromInt(info()->scope()->scope_type())); |
__ CallRuntime(Runtime::kNewFunctionContext); |
} |
} |