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
This commit is contained in:
mvstanton@chromium.org 2013-03-12 15:37:23 +00:00
parent 1c6d5e4cf4
commit cf373b5690
2 changed files with 6 additions and 4 deletions

View File

@ -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_);

View File

@ -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)");
}