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

Side by Side Diff: src/compiler/all-nodes.h

Issue 879583002: [turbofan] Remove GenericAlgorithm from verifier and graph replay. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « BUILD.gn ('k') | src/compiler/all-nodes.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef V8_COMPILER_ALL_NODES_H_
6 #define V8_COMPILER_ALL_NODES_H_
7
8 #include "src/compiler/graph.h"
9 #include "src/compiler/node.h"
10 #include "src/v8.h"
11 #include "src/zone-containers.h"
12
13 namespace v8 {
14 namespace internal {
15 namespace compiler {
16
17 // A helper utility that traverses the graph and gathers all nodes reachable
18 // from end.
19 class AllNodes {
Michael Starzinger 2015/01/26 17:16:56 I think this class should live in the graph.h file
20 public:
21 // Constructor. Traverses the graph and builds the {live} and {gray} sets.
22 AllNodes(Zone* local_zone, const Graph* graph);
23
24 bool IsLive(Node* node) {
25 return node != nullptr && node->id() < static_cast<int>(state.size()) &&
26 state[node->id()] == kLive;
27 }
28
29 NodeVector live; // Nodes reachable from end.
30 NodeVector gray; // Nodes themselves not reachable from end, but that
31 // appear in use lists of live nodes.
32
33 private:
34 enum State { kDead, kGray, kLive };
35
36 ZoneVector<State> state;
37 };
38 }
39 }
40 } // namespace v8::internal::compiler
41
42 #endif // V8_COMPILER_ALL_NODES_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/compiler/all-nodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698