Revision: 23360
Author: [email protected]
Date: Mon Aug 25 14:28:15 2014 UTC
Log: Revert a mistake in Node::CollectProjections.
Fix for a bug I introduced in r23270.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/500023004
https://code.google.com/p/v8/source/detail?r=23360
Modified:
/branches/bleeding_edge/src/compiler/instruction-selector.cc
/branches/bleeding_edge/src/compiler/node.cc
=======================================
--- /branches/bleeding_edge/src/compiler/instruction-selector.cc Mon Aug 25
07:02:19 2014 UTC
+++ /branches/bleeding_edge/src/compiler/instruction-selector.cc Mon Aug 25
14:28:15 2014 UTC
@@ -284,9 +284,8 @@
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.
=======================================
--- /branches/bleeding_edge/src/compiler/node.cc Thu Aug 21 11:56:46 2014
UTC
+++ /branches/bleeding_edge/src/compiler/node.cc Mon Aug 25 14:28:15 2014
UTC
@@ -11,10 +11,16 @@
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;
}
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.