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

Side by Side Diff: src/compiler/graph-reducer.h

Issue 1178403004: [turbofan] Use appropriate type for NodeId. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix useless static_cast. Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/compiler/graph.cc ('k') | src/compiler/graph-reducer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_GRAPH_REDUCER_H_ 5 #ifndef V8_COMPILER_GRAPH_REDUCER_H_
6 #define V8_COMPILER_GRAPH_REDUCER_H_ 6 #define V8_COMPILER_GRAPH_REDUCER_H_
7 7
8 #include "src/compiler/node-marker.h" 8 #include "src/compiler/node-marker.h"
9 #include "src/zone-containers.h" 9 #include "src/zone-containers.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 namespace compiler { 13 namespace compiler {
14 14
15 // Forward declarations. 15 // Forward declarations.
16 class Graph; 16 class Graph;
17 class Node; 17 class Node;
18 18
19 19
20 // NodeIds are identifying numbers for nodes that can be used to index auxiliary 20 // NodeIds are identifying numbers for nodes that can be used to index auxiliary
21 // out-of-line data associated with each node. 21 // out-of-line data associated with each node.
22 typedef int32_t NodeId; 22 typedef uint32_t NodeId;
23 23
24 24
25 // Represents the result of trying to reduce a node in the graph. 25 // Represents the result of trying to reduce a node in the graph.
26 class Reduction final { 26 class Reduction final {
27 public: 27 public:
28 explicit Reduction(Node* replacement = nullptr) : replacement_(replacement) {} 28 explicit Reduction(Node* replacement = nullptr) : replacement_(replacement) {}
29 29
30 Node* replacement() const { return replacement_; } 30 Node* replacement() const { return replacement_; }
31 bool Changed() const { return replacement() != nullptr; } 31 bool Changed() const { return replacement() != nullptr; }
32 32
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 ZoneStack<NodeState> stack_; 179 ZoneStack<NodeState> stack_;
180 180
181 DISALLOW_COPY_AND_ASSIGN(GraphReducer); 181 DISALLOW_COPY_AND_ASSIGN(GraphReducer);
182 }; 182 };
183 183
184 } // namespace compiler 184 } // namespace compiler
185 } // namespace internal 185 } // namespace internal
186 } // namespace v8 186 } // namespace v8
187 187
188 #endif // V8_COMPILER_GRAPH_REDUCER_H_ 188 #endif // V8_COMPILER_GRAPH_REDUCER_H_
OLDNEW
« no previous file with comments | « src/compiler/graph.cc ('k') | src/compiler/graph-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698