Revert a mistake in Node::CollectProjections.
Fix for a bug I introduced in r23270. BUG= R=titzer@chromium.org Review URL: https://codereview.chromium.org/500023004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
40d581f7f1
commit
d90290bdae
@ -284,9 +284,8 @@ void InstructionSelector::InitializeCallBuffer(Node* call, CallBuffer* buffer,
|
||||
if (buffer->descriptor->ReturnCount() == 1) {
|
||||
buffer->output_nodes.push_back(call);
|
||||
} else {
|
||||
buffer->output_nodes.resize(buffer->descriptor->ReturnCount(), NULL);
|
||||
call->CollectProjections(&buffer->output_nodes);
|
||||
DCHECK(buffer->output_nodes.size() <=
|
||||
static_cast<size_t>(buffer->descriptor->ReturnCount()));
|
||||
}
|
||||
|
||||
// Filter out the outputs that aren't live because no projection uses them.
|
||||
|
@ -11,10 +11,16 @@ namespace internal {
|
||||
namespace compiler {
|
||||
|
||||
void Node::CollectProjections(NodeVector* projections) {
|
||||
for (size_t i = 0; i < projections->size(); i++) {
|
||||
(*projections)[i] = NULL;
|
||||
}
|
||||
for (UseIter i = uses().begin(); i != uses().end(); ++i) {
|
||||
if ((*i)->opcode() != IrOpcode::kProjection) continue;
|
||||
DCHECK_GE(OpParameter<int32_t>(*i), 0);
|
||||
projections->push_back(*i);
|
||||
int32_t index = OpParameter<int32_t>(*i);
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, projections->size());
|
||||
DCHECK_EQ(NULL, (*projections)[index]);
|
||||
(*projections)[index] = *i;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user