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

Side by Side Diff: src/compiler/node-properties.cc

Issue 1179543002: [turbofan] Make IfException projections consume effects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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 #include "src/compiler/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 #include "src/compiler/graph.h" 6 #include "src/compiler/graph.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 #include "src/compiler/operator-properties.h" 8 #include "src/compiler/operator-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 208
209 // static 209 // static
210 void NodeProperties::CollectControlProjections(Node* node, Node** projections, 210 void NodeProperties::CollectControlProjections(Node* node, Node** projections,
211 size_t projection_count) { 211 size_t projection_count) {
212 #ifdef DEBUG 212 #ifdef DEBUG
213 DCHECK_LE(static_cast<int>(projection_count), node->UseCount()); 213 DCHECK_LE(static_cast<int>(projection_count), node->UseCount());
214 std::memset(projections, 0, sizeof(*projections) * projection_count); 214 std::memset(projections, 0, sizeof(*projections) * projection_count);
215 #endif 215 #endif
216 size_t if_value_index = 0; 216 size_t if_value_index = 0;
217 for (Node* const use : node->uses()) { 217 for (Edge const edge : node->use_edges()) {
218 if (!IsControlEdge(edge)) continue;
219 Node* use = edge.from();
218 size_t index; 220 size_t index;
219 switch (use->opcode()) { 221 switch (use->opcode()) {
220 case IrOpcode::kIfTrue: 222 case IrOpcode::kIfTrue:
221 DCHECK_EQ(IrOpcode::kBranch, node->opcode()); 223 DCHECK_EQ(IrOpcode::kBranch, node->opcode());
222 index = 0; 224 index = 0;
223 break; 225 break;
224 case IrOpcode::kIfFalse: 226 case IrOpcode::kIfFalse:
225 DCHECK_EQ(IrOpcode::kBranch, node->opcode()); 227 DCHECK_EQ(IrOpcode::kBranch, node->opcode());
226 index = 1; 228 index = 1;
227 break; 229 break;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // static 272 // static
271 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { 273 bool NodeProperties::IsInputRange(Edge edge, int first, int num) {
272 if (num == 0) return false; 274 if (num == 0) return false;
273 int const index = edge.index(); 275 int const index = edge.index();
274 return first <= index && index < first + num; 276 return first <= index && index < first + num;
275 } 277 }
276 278
277 } // namespace compiler 279 } // namespace compiler
278 } // namespace internal 280 } // namespace internal
279 } // namespace v8 281 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | test/unittests/compiler/common-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698