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

Side by Side Diff: lib/compiler/implementation/ssa/bailout.dart

Issue 10693059: remove HIf.hasElse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/builder.dart » ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class BailoutInfo { 5 class BailoutInfo {
6 int instructionId; 6 int instructionId;
7 int bailoutId; 7 int bailoutId;
8 BailoutInfo(this.instructionId, this.bailoutId); 8 BailoutInfo(this.instructionId, this.bailoutId);
9 } 9 }
10 10
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 visitBasicBlock(continuation); 447 visitBasicBlock(continuation);
448 } 448 }
449 } 449 }
450 } 450 }
451 451
452 void visitIf(HIf instruction) { 452 void visitIf(HIf instruction) {
453 int preVisitedBlocks = 0; 453 int preVisitedBlocks = 0;
454 HIfBlockInformation info = instruction.blockInformation.body; 454 HIfBlockInformation info = instruction.blockInformation.body;
455 visitStatements(info.thenGraph); 455 visitStatements(info.thenGraph);
456 preVisitedBlocks++; 456 preVisitedBlocks++;
457 if (instruction.hasElse) { 457 visitStatements(info.elseGraph);
458 visitStatements(info.elseGraph); 458 preVisitedBlocks++;
459 preVisitedBlocks++;
460 }
461 459
462 HBasicBlock joinBlock = instruction.joinBlock; 460 HBasicBlock joinBlock = instruction.joinBlock;
463 if (joinBlock !== null 461 if (joinBlock !== null
464 && joinBlock.dominator !== instruction.block) { 462 && joinBlock.dominator !== instruction.block) {
465 // The join block is dominated by a block in one of the branches. 463 // The join block is dominated by a block in one of the branches.
466 // The subgraph traversal never reached it, so we visit it here 464 // The subgraph traversal never reached it, so we visit it here
467 // instead. 465 // instead.
468 visitBasicBlock(joinBlock); 466 visitBasicBlock(joinBlock);
469 } 467 }
470 468
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 hasComplexTypeGuards = true; 520 hasComplexTypeGuards = true;
523 } 521 }
524 } else { 522 } else {
525 hasComplexTypeGuards = true; 523 hasComplexTypeGuards = true;
526 blocks.forEach((HBasicBlock block) { 524 blocks.forEach((HBasicBlock block) {
527 block.guards.add(guard); 525 block.guards.add(guard);
528 }); 526 });
529 } 527 }
530 } 528 }
531 } 529 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698