Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: src/compiler/js-generic-lowering.cc

Issue 2177273002: Make FastNewFunctionContextStub take slots parameter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/code-stubs.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698