Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index cad7c570eba1a1b542bfda4254bf2e057bc9fadb..c21e0d47723f44504351c59c0a96e7493fe734a1 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.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) { |