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

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

Issue 2216353002: [turbofan] Also inline into try blocks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@p5-base
Patch Set: Created 4 years, 4 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 | « no previous file | src/compiler/all-nodes.cc » ('j') | src/compiler/js-inlining.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_ALL_NODES_H_ 5 #ifndef V8_COMPILER_ALL_NODES_H_
6 #define V8_COMPILER_ALL_NODES_H_ 6 #define V8_COMPILER_ALL_NODES_H_
7 7
8 #include "src/compiler/node.h" 8 #include "src/compiler/node.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 // A helper utility that traverses the graph and gathers all nodes reachable 15 // A helper utility that traverses the graph and gathers all nodes reachable
16 // from end. 16 // from end.
17 class AllNodes { 17 class AllNodes {
18 public: 18 public:
19 // Constructor. Traverses the graph and builds the {live} sets. 19 // Constructor. Traverses the graph and builds the {live} sets.
20 AllNodes(Zone* local_zone, const Graph* graph); 20 AllNodes(Zone* local_zone, const Graph* graph);
21 // Constructor. Traverses the graph and builds the {live} set reachable from
22 // a node in the graph.
23 AllNodes(Zone* local_zone, Node* end, const Graph* graph);
21 24
22 bool IsLive(Node* node) { 25 bool IsLive(Node* node) {
23 if (!node) return false; 26 if (!node) return false;
24 size_t id = node->id(); 27 size_t id = node->id();
25 return id < is_live.size() && is_live[id]; 28 return id < is_live.size() && is_live[id];
26 } 29 }
27 30
28 NodeVector live; // Nodes reachable from end. 31 NodeVector live; // Nodes reachable from end.
29 32
30 private: 33 private:
34 void Mark(Zone* local_zone, Node* end, const Graph* graph);
35
31 BoolVector is_live; 36 BoolVector is_live;
32 }; 37 };
33 38
34 } // namespace compiler 39 } // namespace compiler
35 } // namespace internal 40 } // namespace internal
36 } // namespace v8 41 } // namespace v8
37 42
38 #endif // V8_COMPILER_ALL_NODES_H_ 43 #endif // V8_COMPILER_ALL_NODES_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/all-nodes.cc » ('j') | src/compiler/js-inlining.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698