OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/graph.h" | 5 #include "src/compiler/graph.h" |
6 | 6 |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 #include "src/compiler/generic-node-inl.h" | 8 #include "src/compiler/generic-node-inl.h" |
9 #include "src/compiler/graph-inl.h" | 9 #include "src/compiler/graph-inl.h" |
10 #include "src/compiler/node.h" | 10 #include "src/compiler/node.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 void Graph::Decorate(Node* node) { | 25 void Graph::Decorate(Node* node) { |
26 for (ZoneVector<GraphDecorator*>::iterator i = decorators_.begin(); | 26 for (ZoneVector<GraphDecorator*>::iterator i = decorators_.begin(); |
27 i != decorators_.end(); ++i) { | 27 i != decorators_.end(); ++i) { |
28 (*i)->Decorate(node); | 28 (*i)->Decorate(node); |
29 } | 29 } |
30 } | 30 } |
31 | 31 |
32 | 32 |
33 Node* Graph::NewNode(const Operator* op, int input_count, Node** inputs, | 33 Node* Graph::NewNode(const Operator* op, int input_count, Node** inputs, |
34 bool incomplete) { | 34 bool incomplete) { |
35 DCHECK_LE(op->InputCount(), input_count); | 35 DCHECK_LE(op->ValueInputCount(), input_count); |
36 Node* result = Node::New(this, input_count, inputs, incomplete); | 36 Node* result = Node::New(this, input_count, inputs, incomplete); |
37 result->Initialize(op); | 37 result->Initialize(op); |
38 if (!incomplete) { | 38 if (!incomplete) { |
39 Decorate(result); | 39 Decorate(result); |
40 } | 40 } |
41 return result; | 41 return result; |
42 } | 42 } |
43 | 43 |
44 } // namespace compiler | 44 } // namespace compiler |
45 } // namespace internal | 45 } // namespace internal |
46 } // namespace v8 | 46 } // namespace v8 |
OLD | NEW |