Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index cc2604c7f2ce07e48f168e7bccd6cc4a3b139230..48b2d2680f361d261dc8ca57878f029cc3a6d54e 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -201,14 +201,15 @@ void FullCodeGenerator::Generate() { |
if (info->scope()->new_target_var() != nullptr) { |
__ Push(x3); // Preserve new target. |
} |
- 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); |
} |
if (info->scope()->new_target_var() != nullptr) { |