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

Unified Diff: src/compiler/verifier.cc

Issue 437183002: Make start node a value input to parameter nodes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add start node as input to parameter nodes. Created 6 years, 4 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 | « src/compiler/structured-machine-assembler.cc ('k') | test/cctest/compiler/graph-builder-tester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/verifier.cc
diff --git a/src/compiler/verifier.cc b/src/compiler/verifier.cc
index 64eb72e7d645b2352e02c1d2e858d2817fba1269..1606b7b3bec9470ebfcc2430dfbc435883751993 100644
--- a/src/compiler/verifier.cc
+++ b/src/compiler/verifier.cc
@@ -102,7 +102,8 @@ GenericGraphVisit::Control Verifier::Visitor::Pre(Node* node) {
Node::Uses uses = node->uses();
for (Node::Uses::iterator it = uses.begin(); it != uses.end(); ++it) {
CHECK(!NodeProperties::IsValueEdge(it.edge()) ||
- (*it)->opcode() == IrOpcode::kProjection);
+ (*it)->opcode() == IrOpcode::kProjection ||
+ (*it)->opcode() == IrOpcode::kParameter);
}
}
@@ -148,10 +149,18 @@ GenericGraphVisit::Control Verifier::Visitor::Pre(Node* node) {
case IrOpcode::kThrow:
// TODO(rossberg): what are the constraints on these?
break;
- case IrOpcode::kParameter:
- // Parameters have no inputs.
- CHECK_EQ(0, input_count);
+ case IrOpcode::kParameter: {
+ // Parameters have the start node as inputs.
+ CHECK_EQ(1, input_count);
+ CHECK_EQ(IrOpcode::kStart,
+ NodeProperties::GetValueInput(node, 0)->opcode());
+ // Parameter has an input that produces enough values.
+ int index = static_cast<Operator1<int>*>(node->op())->parameter();
+ Node* input = NodeProperties::GetValueInput(node, 0);
+ // Currently, parameter indices start at -1 instead of 0.
+ CHECK_GT(NodeProperties::GetValueOutputCount(input), index + 1);
break;
+ }
case IrOpcode::kInt32Constant:
case IrOpcode::kInt64Constant:
case IrOpcode::kFloat64Constant:
« no previous file with comments | « src/compiler/structured-machine-assembler.cc ('k') | test/cctest/compiler/graph-builder-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698