| 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 SsaBuilderTask extends CompilerTask { | 5 class SsaBuilderTask extends CompilerTask { |
| 6 SsaBuilderTask(Compiler compiler) : super(compiler); | 6 SsaBuilderTask(Compiler compiler) : super(compiler); |
| 7 String get name() => 'SSA builder'; | 7 String get name() => 'SSA builder'; |
| 8 | 8 |
| 9 HGraph build(Node tree, Map<Node, Element> elements) { | 9 HGraph build(Node tree, Map<Node, Element> elements) { |
| 10 return measure(() { | 10 return measure(() { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 visitNodeList(NodeList node) { | 167 visitNodeList(NodeList node) { |
| 168 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { | 168 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { |
| 169 visit(link.head); | 169 visit(link.head); |
| 170 } | 170 } |
| 171 } | 171 } |
| 172 | 172 |
| 173 visitOperator(Operator node) { | 173 visitOperator(Operator node) { |
| 174 compiler.unimplemented("SsaBuilder.visitOperator"); | 174 compiler.unimplemented("SsaBuilder.visitOperator"); |
| 175 } | 175 } |
| 176 | 176 |
| 177 visitParameter(Parameter node) { | |
| 178 compiler.unimplemented("SsaBuilder.visitParameter"); | |
| 179 } | |
| 180 | |
| 181 visitReturn(Return node) { | 177 visitReturn(Return node) { |
| 182 visit(node.expression); | 178 visit(node.expression); |
| 183 var value = pop(); | 179 var value = pop(); |
| 184 add(new HReturn(value)); | 180 add(new HReturn(value)); |
| 185 graph.setSuccessors(block, <HBasicBlock>[graph.exit]); | 181 graph.setSuccessors(block, <HBasicBlock>[graph.exit]); |
| 186 } | 182 } |
| 187 | 183 |
| 188 visitTypeAnnotation(TypeAnnotation node) { | 184 visitTypeAnnotation(TypeAnnotation node) { |
| 189 // We currently ignore type annotations for generating code. | 185 // We currently ignore type annotations for generating code. |
| 190 } | 186 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 208 if (definition is Identifier) { | 204 if (definition is Identifier) { |
| 209 compiler.unimplemented( | 205 compiler.unimplemented( |
| 210 "SsaBuilder.visitVariableDefinitions without initial value"); | 206 "SsaBuilder.visitVariableDefinitions without initial value"); |
| 211 } else { | 207 } else { |
| 212 assert(definition is SendSet); | 208 assert(definition is SendSet); |
| 213 updateDefinition(definition); | 209 updateDefinition(definition); |
| 214 } | 210 } |
| 215 } | 211 } |
| 216 } | 212 } |
| 217 } | 213 } |
| OLD | NEW |