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

Unified Diff: src/code-stubs-hydrogen.cc

Issue 12585004: Use an efficient graph constant in CodeStubGraphBuilderBase::BuildGraph(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index ab2fb08a44c12e85491f7b67fd527b802fc2a0f7..bb8bfe3fdc4447e90683ffc8df0cf77514ae1cd5 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -132,14 +132,13 @@ bool CodeStubGraphBuilderBase::BuildGraph() {
// it's essential to bind this value to the environment in case of deopt
start_environment->Bind(param_count, stack_parameter_count);
AddInstruction(stack_parameter_count);
+ arguments_length_ = stack_parameter_count;
} else {
ASSERT(descriptor_->environment_length() == param_count);
- stack_parameter_count = AddInstruction(new(zone)
- HConstant(-1, Representation::Integer32()));
+ stack_parameter_count = graph()->GetConstantMinus1();
+ arguments_length_ = graph()->GetConstant0();
}
- arguments_length_ = stack_parameter_count;
-
context_ = new(zone) HContext();
AddInstruction(context_);
start_environment->BindContext(context_);
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698