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

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

Issue 1991203002: [generators] Replace some runtime functions with Turbofan JS operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/bytecode-graph-builder.cc ('k') | src/compiler/js-generic-lowering.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
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class Editor { 67 class Editor {
68 public: 68 public:
69 virtual ~Editor() {} 69 virtual ~Editor() {}
70 70
71 // Replace {node} with {replacement}. 71 // Replace {node} with {replacement}.
72 virtual void Replace(Node* node, Node* replacement) = 0; 72 virtual void Replace(Node* node, Node* replacement) = 0;
73 // Revisit the {node} again later. 73 // Revisit the {node} again later.
74 virtual void Revisit(Node* node) = 0; 74 virtual void Revisit(Node* node) = 0;
75 // Replace value uses of {node} with {value} and effect uses of {node} with 75 // Replace value uses of {node} with {value} and effect uses of {node} with
76 // {effect}. If {effect == nullptr}, then use the effect input to {node}. 76 // {effect}. If {effect == nullptr}, then use the effect input to {node}.
77 // All 77 // All control uses will be relaxed assuming {node} cannot throw.
78 // control uses will be relaxed assuming {node} cannot throw.
79 virtual void ReplaceWithValue(Node* node, Node* value, Node* effect, 78 virtual void ReplaceWithValue(Node* node, Node* value, Node* effect,
80 Node* control) = 0; 79 Node* control) = 0;
81 }; 80 };
82 81
83 explicit AdvancedReducer(Editor* editor) : editor_(editor) {} 82 explicit AdvancedReducer(Editor* editor) : editor_(editor) {}
84 83
85 protected: 84 protected:
86 // Helper functions for subclasses to produce reductions for a node. 85 // Helper functions for subclasses to produce reductions for a node.
87 static Reduction Replace(Node* node) { return Reducer::Replace(node); } 86 static Reduction Replace(Node* node) { return Reducer::Replace(node); }
88 87
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 ZoneStack<NodeState> stack_; 175 ZoneStack<NodeState> stack_;
177 176
178 DISALLOW_COPY_AND_ASSIGN(GraphReducer); 177 DISALLOW_COPY_AND_ASSIGN(GraphReducer);
179 }; 178 };
180 179
181 } // namespace compiler 180 } // namespace compiler
182 } // namespace internal 181 } // namespace internal
183 } // namespace v8 182 } // namespace v8
184 183
185 #endif // V8_COMPILER_GRAPH_REDUCER_H_ 184 #endif // V8_COMPILER_GRAPH_REDUCER_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698