| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |