Index: src/full-codegen/x87/full-codegen-x87.cc |
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc |
index 3d634e3dcebb7100c54681da5e7fb44b67201d51..9f8700dd5b25454a73fbad2974e7a4985b1131ed 100644 |
--- a/src/full-codegen/x87/full-codegen-x87.cc |
+++ b/src/full-codegen/x87/full-codegen-x87.cc |
@@ -187,8 +187,8 @@ void FullCodeGenerator::Generate() { |
if (info->scope()->new_target_var() != nullptr) { |
__ push(edx); // Preserve new target. |
} |
- 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); |
@@ -196,6 +196,7 @@ void FullCodeGenerator::Generate() { |
need_write_barrier = false; |
} else { |
__ push(edi); |
+ __ Push(Smi::FromInt(info->scope()->scope_type())); |
__ CallRuntime(Runtime::kNewFunctionContext); |
} |
if (info->scope()->new_target_var() != nullptr) { |