Use an efficient graph constant in CodeStubGraphBuilderBase::BuildGraph().

Improve printing for HReturn.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12585004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1c6d5e4c
......@@ -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_);
......
......@@ -1034,6 +1034,9 @@ void HIsNilAndBranch::PrintDataTo(StringStream* stream) {
void HReturn::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream);
stream->Add(" (pop ");
parameter_count()->PrintNameTo(stream);
stream->Add(" values)");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment