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 #ifndef V8_COMPILER_NODE_H_ | 5 #ifndef V8_COMPILER_NODE_H_ |
6 #define V8_COMPILER_NODE_H_ | 6 #define V8_COMPILER_NODE_H_ |
7 | 7 |
8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
10 #include "src/types-inl.h" | 10 #include "src/types-inl.h" |
11 #include "src/zone-containers.h" | 11 #include "src/zone-containers.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 namespace compiler { | 15 namespace compiler { |
16 | 16 |
17 // Forward declarations. | 17 // Forward declarations. |
18 class Edge; | 18 class Edge; |
19 class Graph; | 19 class Graph; |
20 | 20 |
21 | 21 |
22 // Marks are used during traversal of the graph to distinguish states of nodes. | 22 // Marks are used during traversal of the graph to distinguish states of nodes. |
23 // Each node has a mark which is a monotonically increasing integer, and a | 23 // Each node has a mark which is a monotonically increasing integer, and a |
24 // {NodeMarker} has a range of values that indicate states of a node. | 24 // {NodeMarker} has a range of values that indicate states of a node. |
25 typedef uint32_t Mark; | 25 typedef uint32_t Mark; |
26 | 26 |
27 | 27 |
28 // NodeIds are identifying numbers for nodes that can be used to index auxiliary | 28 // NodeIds are identifying numbers for nodes that can be used to index auxiliary |
29 // out-of-line data associated with each node. | 29 // out-of-line data associated with each node. |
30 typedef int32_t NodeId; | 30 typedef uint32_t NodeId; |
31 | 31 |
32 | 32 |
33 // A Node is the basic primitive of graphs. Nodes are chained together by | 33 // A Node is the basic primitive of graphs. Nodes are chained together by |
34 // input/use chains but by default otherwise contain only an identifying number | 34 // input/use chains but by default otherwise contain only an identifying number |
35 // which specific applications of graphs and nodes can use to index auxiliary | 35 // which specific applications of graphs and nodes can use to index auxiliary |
36 // out-of-line data, especially transient data. | 36 // out-of-line data, especially transient data. |
37 // | 37 // |
38 // In addition Nodes only contain a mutable Operator that may change during | 38 // In addition Nodes only contain a mutable Operator that may change during |
39 // compilation, e.g. during lowering passes. Other information that needs to be | 39 // compilation, e.g. during lowering passes. Other information that needs to be |
40 // associated with Nodes during compilation must be stored out-of-line indexed | 40 // associated with Nodes during compilation must be stored out-of-line indexed |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 } | 551 } |
552 | 552 |
553 | 553 |
554 Node::Uses::const_iterator Node::Uses::end() const { return const_iterator(); } | 554 Node::Uses::const_iterator Node::Uses::end() const { return const_iterator(); } |
555 | 555 |
556 } // namespace compiler | 556 } // namespace compiler |
557 } // namespace internal | 557 } // namespace internal |
558 } // namespace v8 | 558 } // namespace v8 |
559 | 559 |
560 #endif // V8_COMPILER_NODE_H_ | 560 #endif // V8_COMPILER_NODE_H_ |
OLD | NEW |