| 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 part of ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 class BailoutInfo { | 7 class BailoutInfo { |
| 8 int instructionId; | 8 int instructionId; |
| 9 int bailoutId; | 9 int bailoutId; |
| 10 BailoutInfo(this.instructionId, this.bailoutId); | 10 BailoutInfo(this.instructionId, this.bailoutId); |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 if (body is HLabeledBlockInformation) { | 495 if (body is HLabeledBlockInformation) { |
| 496 currentBlockInformation = body; | 496 currentBlockInformation = body; |
| 497 HLabeledBlockInformation info = body; | 497 HLabeledBlockInformation info = body; |
| 498 visitStatements(info.body, newFlow: true); | 498 visitStatements(info.body, newFlow: true); |
| 499 } else if (body is HLoopBlockInformation) { | 499 } else if (body is HLoopBlockInformation) { |
| 500 currentBlockInformation = body; | 500 currentBlockInformation = body; |
| 501 HLoopBlockInformation info = body; | 501 HLoopBlockInformation info = body; |
| 502 if (info.initializer != null) { | 502 if (info.initializer != null) { |
| 503 visitExpression(info.initializer); | 503 visitExpression(info.initializer); |
| 504 } | 504 } |
| 505 blocks.addLast(info.loopHeader); | 505 blocks.add(info.loopHeader); |
| 506 if (!info.isDoWhile()) { | 506 if (!info.isDoWhile()) { |
| 507 visitExpression(info.condition); | 507 visitExpression(info.condition); |
| 508 } | 508 } |
| 509 visitStatements(info.body, newFlow: false); | 509 visitStatements(info.body, newFlow: false); |
| 510 if (info.isDoWhile()) { | 510 if (info.isDoWhile()) { |
| 511 visitExpression(info.condition); | 511 visitExpression(info.condition); |
| 512 } | 512 } |
| 513 if (info.updates != null) { | 513 if (info.updates != null) { |
| 514 visitExpression(info.updates); | 514 visitExpression(info.updates); |
| 515 } | 515 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 545 void visitExpression(HSubExpressionBlockInformation info) { | 545 void visitExpression(HSubExpressionBlockInformation info) { |
| 546 visitSubGraph(info.subExpression); | 546 visitSubGraph(info.subExpression); |
| 547 } | 547 } |
| 548 | 548 |
| 549 /** | 549 /** |
| 550 * Visit the statements in [info]. If [newFlow] is true, we add the | 550 * Visit the statements in [info]. If [newFlow] is true, we add the |
| 551 * first block of [statements] to the list of [blocks]. | 551 * first block of [statements] to the list of [blocks]. |
| 552 */ | 552 */ |
| 553 void visitStatements(HSubGraphBlockInformation info, {bool newFlow}) { | 553 void visitStatements(HSubGraphBlockInformation info, {bool newFlow}) { |
| 554 SubGraph graph = info.subGraph; | 554 SubGraph graph = info.subGraph; |
| 555 if (newFlow) blocks.addLast(graph.start); | 555 if (newFlow) blocks.add(graph.start); |
| 556 visitSubGraph(graph); | 556 visitSubGraph(graph); |
| 557 if (newFlow) blocks.removeLast(); | 557 if (newFlow) blocks.removeLast(); |
| 558 } | 558 } |
| 559 | 559 |
| 560 void visitSubGraph(SubGraph graph) { | 560 void visitSubGraph(SubGraph graph) { |
| 561 SubGraph oldSubGraph = subGraph; | 561 SubGraph oldSubGraph = subGraph; |
| 562 subGraph = graph; | 562 subGraph = graph; |
| 563 visitBasicBlock(graph.start); | 563 visitBasicBlock(graph.start); |
| 564 subGraph = oldSubGraph; | 564 subGraph = oldSubGraph; |
| 565 } | 565 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 hasComplexBailoutTargets = true; | 625 hasComplexBailoutTargets = true; |
| 626 } | 626 } |
| 627 } else { | 627 } else { |
| 628 hasComplexBailoutTargets = true; | 628 hasComplexBailoutTargets = true; |
| 629 blocks.forEach((HBasicBlock block) { | 629 blocks.forEach((HBasicBlock block) { |
| 630 block.bailoutTargets.add(target); | 630 block.bailoutTargets.add(target); |
| 631 }); | 631 }); |
| 632 } | 632 } |
| 633 } | 633 } |
| 634 } | 634 } |
| OLD | NEW |