| 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 visitBasicBlock(successors[0]); | 452 visitBasicBlock(successors[0]); |
| 453 indent--; | 453 indent--; |
| 454 | 454 |
| 455 if (node.finallyBlock != successors[1]) { | 455 if (node.finallyBlock != successors[1]) { |
| 456 // Printing the catch part. | 456 // Printing the catch part. |
| 457 addIndentation(); | 457 addIndentation(); |
| 458 String name = temporary(node.exception); | 458 String name = temporary(node.exception); |
| 459 parameterNames[node.exception.element] = name; | 459 parameterNames[node.exception.element] = name; |
| 460 buffer.add('} catch ($name) {\n'); | 460 buffer.add('} catch ($name) {\n'); |
| 461 indent++; | 461 indent++; |
| 462 addIndentation(); | |
| 463 visitBasicBlock(successors[1]); | 462 visitBasicBlock(successors[1]); |
| 464 parameterNames.remove(node.exception.element); | 463 parameterNames.remove(node.exception.element); |
| 465 indent--; | 464 indent--; |
| 466 } | 465 } |
| 467 | 466 |
| 468 if (node.finallyBlock != null) { | 467 if (node.finallyBlock != null) { |
| 469 addIndentation(); | 468 addIndentation(); |
| 470 buffer.add('} finally {\n'); | 469 buffer.add('} finally {\n'); |
| 471 indent++; | 470 indent++; |
| 472 visitBasicBlock(node.finallyBlock); | 471 visitBasicBlock(node.finallyBlock); |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 startBailoutSwitch(); | 1407 startBailoutSwitch(); |
| 1409 } | 1408 } |
| 1410 } | 1409 } |
| 1411 | 1410 |
| 1412 void endElse(HIf node) { | 1411 void endElse(HIf node) { |
| 1413 if (node.elseBlock.hasBailouts()) { | 1412 if (node.elseBlock.hasBailouts()) { |
| 1414 endBailoutSwitch(); | 1413 endBailoutSwitch(); |
| 1415 } | 1414 } |
| 1416 } | 1415 } |
| 1417 } | 1416 } |
| OLD | NEW |