| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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(Node tree, HGraph graph) { | 9 String generate(Node tree, HGraph graph) { |
| 10 return measure(() { | 10 return measure(() { |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 244 |
| 245 visitReturn(HReturn node) { | 245 visitReturn(HReturn node) { |
| 246 buffer.add('return '); | 246 buffer.add('return '); |
| 247 use(node.inputs[0]); | 247 use(node.inputs[0]); |
| 248 } | 248 } |
| 249 | 249 |
| 250 visitSubtract(HSubtract node) { | 250 visitSubtract(HSubtract node) { |
| 251 invoke(const SourceString('\$sub'), node.inputs); | 251 invoke(const SourceString('\$sub'), node.inputs); |
| 252 } | 252 } |
| 253 | 253 |
| 254 visitThrow(HThrow node) { |
| 255 buffer.add('throw '); |
| 256 use(node.inputs[0]); |
| 257 } |
| 258 |
| 254 visitTruncatingDivide(HTruncatingDivide node) { | 259 visitTruncatingDivide(HTruncatingDivide node) { |
| 255 invoke(const SourceString('\$tdiv'), node.inputs); | 260 invoke(const SourceString('\$tdiv'), node.inputs); |
| 256 } | 261 } |
| 257 | 262 |
| 258 void addIndentation() { | 263 void addIndentation() { |
| 259 for (int i = 0; i < indent; i++) { | 264 for (int i = 0; i < indent; i++) { |
| 260 buffer.add(' '); | 265 buffer.add(' '); |
| 261 } | 266 } |
| 262 } | 267 } |
| 263 } | 268 } |
| OLD | NEW |