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

Side by Side Diff: src/compiler/verifier.cc

Issue 1162633002: [turbofan] Enforce stricter constraints on Throw nodes. (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
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | no next file » | 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 #include "src/compiler/verifier.h" 5 #include "src/compiler/verifier.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <sstream> 10 #include <sstream>
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // Type is empty. 263 // Type is empty.
264 CheckNotTyped(node); 264 CheckNotTyped(node);
265 break; 265 break;
266 case IrOpcode::kLoop: 266 case IrOpcode::kLoop:
267 case IrOpcode::kMerge: 267 case IrOpcode::kMerge:
268 CHECK_EQ(control_count, input_count); 268 CHECK_EQ(control_count, input_count);
269 // Type is empty. 269 // Type is empty.
270 CheckNotTyped(node); 270 CheckNotTyped(node);
271 break; 271 break;
272 case IrOpcode::kDeoptimize: 272 case IrOpcode::kDeoptimize:
273 // Deoptimize uses are End.
274 for (auto use : node->uses()) {
275 CHECK_EQ(IrOpcode::kEnd, use->opcode());
276 }
277 // Type is empty.
278 CheckNotTyped(node);
279 case IrOpcode::kReturn: 273 case IrOpcode::kReturn:
280 // Return uses are End. 274 case IrOpcode::kThrow:
275 // Deoptimize, Return and Throw uses are End.
281 for (auto use : node->uses()) { 276 for (auto use : node->uses()) {
282 CHECK_EQ(IrOpcode::kEnd, use->opcode()); 277 CHECK_EQ(IrOpcode::kEnd, use->opcode());
283 } 278 }
284 // Type is empty. 279 // Type is empty.
285 CheckNotTyped(node); 280 CheckNotTyped(node);
286 break; 281 break;
287 case IrOpcode::kThrow:
288 // TODO(rossberg): what are the constraints on these?
289 // Type is empty.
290 CheckNotTyped(node);
291 break;
292 case IrOpcode::kTerminate: 282 case IrOpcode::kTerminate:
293 // Terminates take one loop and effect. 283 // Terminates take one loop and effect.
294 CHECK_EQ(1, control_count); 284 CHECK_EQ(1, control_count);
295 CHECK_EQ(1, effect_count); 285 CHECK_EQ(1, effect_count);
296 CHECK_EQ(2, input_count); 286 CHECK_EQ(2, input_count);
297 CHECK_EQ(IrOpcode::kLoop, 287 CHECK_EQ(IrOpcode::kLoop,
298 NodeProperties::GetControlInput(node)->opcode()); 288 NodeProperties::GetControlInput(node)->opcode());
299 // Terminate uses are End. 289 // Terminate uses are End.
300 for (auto use : node->uses()) { 290 for (auto use : node->uses()) {
301 CHECK_EQ(IrOpcode::kEnd, use->opcode()); 291 CHECK_EQ(IrOpcode::kEnd, use->opcode());
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 // Check inputs for all nodes in the block. 1102 // Check inputs for all nodes in the block.
1113 for (size_t i = 0; i < block->NodeCount(); i++) { 1103 for (size_t i = 0; i < block->NodeCount(); i++) {
1114 Node* node = block->NodeAt(i); 1104 Node* node = block->NodeAt(i);
1115 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 1105 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
1116 } 1106 }
1117 } 1107 }
1118 } 1108 }
1119 } // namespace compiler 1109 } // namespace compiler
1120 } // namespace internal 1110 } // namespace internal
1121 } // namespace v8 1111 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698