Index: src/compiler/js-generic-lowering.cc |
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc |
index e07daf0c721936cd951d196b1af7b75eecf47611..0f9defd4ce5be39ff2f21a8f5cbec1a53dfda466 100644 |
--- a/src/compiler/js-generic-lowering.cc |
+++ b/src/compiler/js-generic-lowering.cc |
@@ -446,14 +446,9 @@ void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { |
int const slot_count = OpParameter<int>(node->op()); |
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
- // Use the FastNewFunctionContextStub only for function contexts up maximum |
- // size. |
- if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) { |
- Callable callable = CodeFactory::FastNewContext(isolate(), slot_count); |
- ReplaceWithStubCall(node, callable, flags); |
- } else { |
- ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext); |
- } |
+ Callable callable = CodeFactory::FastNewFunctionContext(isolate()); |
+ node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count)); |
+ ReplaceWithStubCall(node, callable, flags); |
} |