| 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 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); | 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); |
| 7 String get name() => 'SSA code generator'; | 7 String get name() => 'SSA code generator'; |
| 8 | 8 |
| 9 String generate(WorkItem work, HGraph graph) { | 9 String generate(WorkItem work, HGraph graph) { |
| 10 return measure(() { | 10 return measure(() { |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 visitBasicBlock(successors[0]); | 449 visitBasicBlock(successors[0]); |
| 450 indent--; | 450 indent--; |
| 451 | 451 |
| 452 if (node.finallyBlock != successors[1]) { | 452 if (node.finallyBlock != successors[1]) { |
| 453 // Printing the catch part. | 453 // Printing the catch part. |
| 454 addIndentation(); | 454 addIndentation(); |
| 455 String name = temporary(node.exception); | 455 String name = temporary(node.exception); |
| 456 parameterNames[node.exception.element] = name; | 456 parameterNames[node.exception.element] = name; |
| 457 buffer.add('} catch ($name) {\n'); | 457 buffer.add('} catch ($name) {\n'); |
| 458 indent++; | 458 indent++; |
| 459 addIndentation(); | |
| 460 visitBasicBlock(successors[1]); | 459 visitBasicBlock(successors[1]); |
| 461 parameterNames.remove(node.exception.element); | 460 parameterNames.remove(node.exception.element); |
| 462 indent--; | 461 indent--; |
| 463 } | 462 } |
| 464 | 463 |
| 465 if (node.finallyBlock != null) { | 464 if (node.finallyBlock != null) { |
| 466 addIndentation(); | 465 addIndentation(); |
| 467 buffer.add('} finally {\n'); | 466 buffer.add('} finally {\n'); |
| 468 indent++; | 467 indent++; |
| 469 visitBasicBlock(node.finallyBlock); | 468 visitBasicBlock(node.finallyBlock); |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1398 startBailoutSwitch(); | 1397 startBailoutSwitch(); |
| 1399 } | 1398 } |
| 1400 } | 1399 } |
| 1401 | 1400 |
| 1402 void endElse(HIf node) { | 1401 void endElse(HIf node) { |
| 1403 if (node.elseBlock.hasBailouts()) { | 1402 if (node.elseBlock.hasBailouts()) { |
| 1404 endBailoutSwitch(); | 1403 endBailoutSwitch(); |
| 1405 } | 1404 } |
| 1406 } | 1405 } |
| 1407 } | 1406 } |
| OLD | NEW |