| 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 visitBasicBlock(successors[1]); | 390 visitBasicBlock(successors[1]); |
| 391 parameterNames.remove(node.exception.element); | 391 parameterNames.remove(node.exception.element); |
| 392 indent--; | 392 indent--; |
| 393 } | 393 } |
| 394 | 394 |
| 395 if (node.finallyBlock != null) { | 395 if (node.finallyBlock != null) { |
| 396 addIndentation(); | 396 addIndentation(); |
| 397 buffer.add('} finally {\n'); | 397 buffer.add('} finally {\n'); |
| 398 indent++; | 398 indent++; |
| 399 visitBasicBlock(node.finallyBlock); | 399 visitBasicBlock(node.finallyBlock); |
| 400 indent--; |
| 400 } | 401 } |
| 401 indent--; | |
| 402 addIndentation(); | 402 addIndentation(); |
| 403 buffer.add('}\n'); | 403 buffer.add('}\n'); |
| 404 |
| 405 visitBasicBlock(node.joinBlock); |
| 404 } | 406 } |
| 405 | 407 |
| 406 visitIf(HIf node) { | 408 visitIf(HIf node) { |
| 407 startIf(node); | 409 startIf(node); |
| 408 assert(!node.generateAtUseSite()); | 410 assert(!node.generateAtUseSite()); |
| 409 startThen(node); | 411 startThen(node); |
| 410 visitBasicBlock(node.thenBlock); | 412 visitBasicBlock(node.thenBlock); |
| 411 endThen(node); | 413 endThen(node); |
| 412 if (node.hasElse) { | 414 if (node.hasElse) { |
| 413 startElse(node); | 415 startElse(node); |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 startBailoutSwitch(); | 1264 startBailoutSwitch(); |
| 1263 } | 1265 } |
| 1264 } | 1266 } |
| 1265 | 1267 |
| 1266 void endElse(HIf node) { | 1268 void endElse(HIf node) { |
| 1267 if (node.elseBlock.hasBailouts()) { | 1269 if (node.elseBlock.hasBailouts()) { |
| 1268 endBailoutSwitch(); | 1270 endBailoutSwitch(); |
| 1269 } | 1271 } |
| 1270 } | 1272 } |
| 1271 } | 1273 } |
| OLD | NEW |