OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_MARKER_H_ | 5 #ifndef V8_COMPILER_NODE_MARKER_H_ |
6 #define V8_COMPILER_NODE_MARKER_H_ | 6 #define V8_COMPILER_NODE_MARKER_H_ |
7 | 7 |
8 #include "src/base/macros.h" | 8 #include "src/base/macros.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 11 matching lines...) Expand all Loading... |
22 typedef uint32_t Mark; | 22 typedef uint32_t Mark; |
23 | 23 |
24 | 24 |
25 // Base class for templatized NodeMarkers. | 25 // Base class for templatized NodeMarkers. |
26 class NodeMarkerBase { | 26 class NodeMarkerBase { |
27 public: | 27 public: |
28 NodeMarkerBase(Graph* graph, uint32_t num_states); | 28 NodeMarkerBase(Graph* graph, uint32_t num_states); |
29 | 29 |
30 Mark Get(Node* node); | 30 Mark Get(Node* node); |
31 void Set(Node* node, Mark mark); | 31 void Set(Node* node, Mark mark); |
| 32 void Reset(Graph* graph); |
32 | 33 |
33 private: | 34 private: |
34 Mark mark_min_; | 35 Mark mark_min_; |
35 Mark mark_max_; | 36 Mark mark_max_; |
36 | 37 |
37 DISALLOW_COPY_AND_ASSIGN(NodeMarkerBase); | 38 DISALLOW_COPY_AND_ASSIGN(NodeMarkerBase); |
38 }; | 39 }; |
39 | 40 |
40 | 41 |
41 // A NodeMarker uses monotonically increasing marks to assign local "states" | 42 // A NodeMarker uses monotonically increasing marks to assign local "states" |
(...skipping 11 matching lines...) Expand all Loading... |
53 void Set(Node* node, State state) { | 54 void Set(Node* node, State state) { |
54 NodeMarkerBase::Set(node, static_cast<Mark>(state)); | 55 NodeMarkerBase::Set(node, static_cast<Mark>(state)); |
55 } | 56 } |
56 }; | 57 }; |
57 | 58 |
58 } // namespace compiler | 59 } // namespace compiler |
59 } // namespace internal | 60 } // namespace internal |
60 } // namespace v8 | 61 } // namespace v8 |
61 | 62 |
62 #endif // V8_COMPILER_NODE_MARKER_H_ | 63 #endif // V8_COMPILER_NODE_MARKER_H_ |
OLD | NEW |