| 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 Interceptors { | 5 class Interceptors { |
| 6 Compiler compiler; | 6 Compiler compiler; |
| 7 Interceptors(Compiler this.compiler); | 7 Interceptors(Compiler this.compiler); |
| 8 | 8 |
| 9 SourceString mapOperatorToMethodName(Operator op) { | 9 SourceString mapOperatorToMethodName(Operator op) { |
| 10 String name = op.source.stringValue; | 10 String name = op.source.stringValue; |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 HBasicBlock conditionExitBlock = close(new HLoopBranch(popBoolified())); | 715 HBasicBlock conditionExitBlock = close(new HLoopBranch(popBoolified())); |
| 716 | 716 |
| 717 Map conditionDefinitions = localsHandler.getDefinitionsCopy(); | 717 Map conditionDefinitions = localsHandler.getDefinitionsCopy(); |
| 718 | 718 |
| 719 // The body. | 719 // The body. |
| 720 HBasicBlock bodyBlock = addNewBlock(); | 720 HBasicBlock bodyBlock = addNewBlock(); |
| 721 conditionExitBlock.addSuccessor(bodyBlock); | 721 conditionExitBlock.addSuccessor(bodyBlock); |
| 722 open(bodyBlock); | 722 open(bodyBlock); |
| 723 visit(body); | 723 visit(body); |
| 724 if (isAborted()) { | 724 if (isAborted()) { |
| 725 compiler.unimplemented("SsaBuilder for loop with aborting body"); | 725 compiler.unimplemented("SsaBuilder for loop with aborting body", |
| 726 node: body); |
| 726 } | 727 } |
| 727 bodyBlock = close(new HGoto()); | 728 bodyBlock = close(new HGoto()); |
| 728 | 729 |
| 729 // Update. | 730 // Update. |
| 730 // We create an update block, even when we are in a while loop. There the | 731 // We create an update block, even when we are in a while loop. There the |
| 731 // update block is the jump-target for continue statements. We could avoid | 732 // update block is the jump-target for continue statements. We could avoid |
| 732 // the creation if there is no continue, but for now we always create it. | 733 // the creation if there is no continue, but for now we always create it. |
| 733 HBasicBlock updateBlock = addNewBlock(); | 734 HBasicBlock updateBlock = addNewBlock(); |
| 734 bodyBlock.addSuccessor(updateBlock); | 735 bodyBlock.addSuccessor(updateBlock); |
| 735 open(updateBlock); | 736 open(updateBlock); |
| (...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1799 } | 1800 } |
| 1800 | 1801 |
| 1801 visitCatchBlock(CatchBlock node) { | 1802 visitCatchBlock(CatchBlock node) { |
| 1802 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node); | 1803 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node); |
| 1803 } | 1804 } |
| 1804 | 1805 |
| 1805 visitTypedef(Typedef node) { | 1806 visitTypedef(Typedef node) { |
| 1806 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); | 1807 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); |
| 1807 } | 1808 } |
| 1808 } | 1809 } |
| OLD | NEW |