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 a0bbb23273a5e52d7677272c5961c0f8821bfb48..7d80a03cf2ee0eb109479b6ef5d54e9ce904ae18 100644 |
--- a/src/full-codegen/x87/full-codegen-x87.cc |
+++ b/src/full-codegen/x87/full-codegen-x87.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. |
} |