| 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 SsaCodeGeneratorTask extends CompilerTask { | 5 class SsaCodeGeneratorTask extends CompilerTask { |
| 6 final JavaScriptBackend backend; | 6 final JavaScriptBackend backend; |
| 7 SsaCodeGeneratorTask(JavaScriptBackend backend) | 7 SsaCodeGeneratorTask(JavaScriptBackend backend) |
| 8 : this.backend = backend, | 8 : this.backend = backend, |
| 9 super(backend.compiler); | 9 super(backend.compiler); |
| 10 String get name() => 'SSA code generator'; | 10 String get name() => 'SSA code generator'; |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 addIndented("try {\n"); | 719 addIndented("try {\n"); |
| 720 indent++; | 720 indent++; |
| 721 generateStatements(info.body); | 721 generateStatements(info.body); |
| 722 indent--; | 722 indent--; |
| 723 addIndented("}"); | 723 addIndented("}"); |
| 724 if (info.catchBlock !== null) { | 724 if (info.catchBlock !== null) { |
| 725 // Printing the catch part. | 725 // Printing the catch part. |
| 726 HParameterValue exception = info.catchVariable; | 726 HParameterValue exception = info.catchVariable; |
| 727 String name = temporary(exception); | 727 String name = temporary(exception); |
| 728 parameterNames[exception.element] = name; | 728 parameterNames[exception.element] = name; |
| 729 buffer.add('catch ($name) {\n'); | 729 buffer.add(' catch ($name) {\n'); |
| 730 indent++; | 730 indent++; |
| 731 generateStatements(info.catchBlock); | 731 generateStatements(info.catchBlock); |
| 732 parameterNames.remove(exception.element); | 732 parameterNames.remove(exception.element); |
| 733 indent--; | 733 indent--; |
| 734 addIndented('}'); | 734 addIndented('}'); |
| 735 } | 735 } |
| 736 if (info.finallyBlock != null) { | 736 if (info.finallyBlock != null) { |
| 737 buffer.add(" finally {\n"); | 737 buffer.add(" finally {\n"); |
| 738 indent++; | 738 indent++; |
| 739 generateStatements(info.finallyBlock); | 739 generateStatements(info.finallyBlock); |
| (...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2632 startBailoutSwitch(); | 2632 startBailoutSwitch(); |
| 2633 } | 2633 } |
| 2634 } | 2634 } |
| 2635 | 2635 |
| 2636 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 2636 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 2637 if (labeledBlockInfo.body.start.hasGuards()) { | 2637 if (labeledBlockInfo.body.start.hasGuards()) { |
| 2638 endBailoutSwitch(); | 2638 endBailoutSwitch(); |
| 2639 } | 2639 } |
| 2640 } | 2640 } |
| 2641 } | 2641 } |
| OLD | NEW |