Index: src/compiler/graph.cc |
diff --git a/src/compiler/graph.cc b/src/compiler/graph.cc |
index 7b5f228aa163ffd1a4ddc02d218cf095efedb6a0..19e9c7fec6b1e6d81c7efd7fd0cd27dd0ad29b2d 100644 |
--- a/src/compiler/graph.cc |
+++ b/src/compiler/graph.cc |
@@ -21,14 +21,20 @@ namespace compiler { |
Graph::Graph(Zone* zone) : GenericGraph<Node>(zone), decorators_(zone) {} |
-Node* Graph::NewNode(const Operator* op, int input_count, Node** inputs) { |
- DCHECK_LE(op->InputCount(), input_count); |
- Node* result = Node::New(this, input_count, inputs); |
- result->Initialize(op); |
+void Graph::Decorate(Node* node) { |
for (ZoneVector<GraphDecorator*>::iterator i = decorators_.begin(); |
i != decorators_.end(); ++i) { |
- (*i)->Decorate(result); |
+ (*i)->Decorate(node); |
} |
+} |
+ |
+ |
+Node* Graph::NewNode( |
+ const Operator* op, int input_count, Node** inputs, bool incomplete) { |
+ DCHECK_LE(op->InputCount(), input_count); |
+ Node* result = Node::New(this, input_count, inputs); |
+ result->Initialize(op); |
+ if (!incomplete) Decorate(result); |
return result; |
} |