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

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

Issue 1366543003: Reland "[turbofan] Checking of input counts on node creation" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Created 5 years, 2 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/basic-block-instrumentor.cc ('k') | src/compiler/graph.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 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_GRAPH_H_ 5 #ifndef V8_COMPILER_GRAPH_H_
6 #define V8_COMPILER_GRAPH_H_ 6 #define V8_COMPILER_GRAPH_H_
7 7
8 #include "src/zone.h" 8 #include "src/zone.h"
9 #include "src/zone-containers.h" 9 #include "src/zone-containers.h"
10 10
(...skipping 16 matching lines...) Expand all
27 // NodeIds are identifying numbers for nodes that can be used to index auxiliary 27 // NodeIds are identifying numbers for nodes that can be used to index auxiliary
28 // out-of-line data associated with each node. 28 // out-of-line data associated with each node.
29 typedef uint32_t NodeId; 29 typedef uint32_t NodeId;
30 30
31 31
32 class Graph : public ZoneObject { 32 class Graph : public ZoneObject {
33 public: 33 public:
34 explicit Graph(Zone* zone); 34 explicit Graph(Zone* zone);
35 35
36 // Base implementation used by all factory methods. 36 // Base implementation used by all factory methods.
37 Node* NewNodeUnchecked(const Operator* op, int input_count, Node** inputs,
38 bool incomplete = false);
39
40 // Factory that checks the input count.
37 Node* NewNode(const Operator* op, int input_count, Node** inputs, 41 Node* NewNode(const Operator* op, int input_count, Node** inputs,
38 bool incomplete = false); 42 bool incomplete = false);
39 43
40 // Factories for nodes with static input counts. 44 // Factories for nodes with static input counts.
41 Node* NewNode(const Operator* op) { 45 Node* NewNode(const Operator* op) {
42 return NewNode(op, 0, static_cast<Node**>(nullptr)); 46 return NewNode(op, 0, static_cast<Node**>(nullptr));
43 } 47 }
44 Node* NewNode(const Operator* op, Node* n1) { return NewNode(op, 1, &n1); } 48 Node* NewNode(const Operator* op, Node* n1) { return NewNode(op, 1, &n1); }
45 Node* NewNode(const Operator* op, Node* n1, Node* n2) { 49 Node* NewNode(const Operator* op, Node* n1, Node* n2) {
46 Node* nodes[] = {n1, n2}; 50 Node* nodes[] = {n1, n2};
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 public: 125 public:
122 virtual ~GraphDecorator() {} 126 virtual ~GraphDecorator() {}
123 virtual void Decorate(Node* node) = 0; 127 virtual void Decorate(Node* node) = 0;
124 }; 128 };
125 129
126 } // namespace compiler 130 } // namespace compiler
127 } // namespace internal 131 } // namespace internal
128 } // namespace v8 132 } // namespace v8
129 133
130 #endif // V8_COMPILER_GRAPH_H_ 134 #endif // V8_COMPILER_GRAPH_H_
OLDNEW
« no previous file with comments | « src/compiler/basic-block-instrumentor.cc ('k') | src/compiler/graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698