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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 } | 423 } |
424 } | 424 } |
425 | 425 |
426 void visitBasicBlock(HBasicBlock block) { | 426 void visitBasicBlock(HBasicBlock block) { |
427 // Abort traversal if we are leaving the currently active sub-graph. | 427 // Abort traversal if we are leaving the currently active sub-graph. |
428 if (!subGraph.contains(block)) return; | 428 if (!subGraph.contains(block)) return; |
429 | 429 |
430 if (block.isLoopHeader()) { | 430 if (block.isLoopHeader()) { |
431 blocks.addLast(block); | 431 blocks.addLast(block); |
432 } else if (block.isLabeledBlock() | 432 } else if (block.isLabeledBlock() |
433 && (blocks.isEmpty || !identical(blocks.last(), block))) { | 433 && (blocks.isEmpty || !identical(blocks.last, block))) { |
434 HLabeledBlockInformation info = block.blockFlow.body; | 434 HLabeledBlockInformation info = block.blockFlow.body; |
435 visitStatements(info.body); | 435 visitStatements(info.body); |
436 return; | 436 return; |
437 } | 437 } |
438 | 438 |
439 HInstruction instruction = block.first; | 439 HInstruction instruction = block.first; |
440 while (instruction != null) { | 440 while (instruction != null) { |
441 instruction.accept(this); | 441 instruction.accept(this); |
442 instruction = instruction.next; | 442 instruction = instruction.next; |
443 } | 443 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 hasComplexBailoutTargets = true; | 537 hasComplexBailoutTargets = true; |
538 } | 538 } |
539 } else { | 539 } else { |
540 hasComplexBailoutTargets = true; | 540 hasComplexBailoutTargets = true; |
541 blocks.forEach((HBasicBlock block) { | 541 blocks.forEach((HBasicBlock block) { |
542 block.bailoutTargets.add(target); | 542 block.bailoutTargets.add(target); |
543 }); | 543 }); |
544 } | 544 } |
545 } | 545 } |
546 } | 546 } |
OLD | NEW |