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 383b83605eabfe7c7cc32ccfa05fafd7a40e05f2..66517c6702c936da8269a344afa418e3ff040c8b 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -176,15 +176,12 @@ void FullCodeGenerator::Generate() { |
if (info->scope()->new_target_var() != nullptr) { |
__ push(edx); // Preserve new target. |
} |
- if (slots <= FastNewFunctionContextStub::kMaximumSlots) { |
- FastNewFunctionContextStub stub(isolate(), slots); |
- __ CallStub(&stub); |
- // Result of FastNewFunctionContextStub is always in new space. |
- need_write_barrier = false; |
- } else { |
- __ push(edi); |
- __ CallRuntime(Runtime::kNewFunctionContext); |
- } |
+ FastNewFunctionContextStub stub(isolate()); |
+ __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
+ Immediate(slots)); |
+ __ CallStub(&stub); |
+ // Result of FastNewFunctionContextStub is always in new space. |
+ need_write_barrier = false; |
if (info->scope()->new_target_var() != nullptr) { |
__ pop(edx); // Restore new target. |
} |