| 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 Interceptors { | 5 class Interceptors { |
| 6 Compiler compiler; | 6 Compiler compiler; |
| 7 Interceptors(Compiler this.compiler); | 7 Interceptors(Compiler this.compiler); |
| 8 | 8 |
| 9 SourceString mapOperatorToMethodName(Operator op) { | 9 SourceString mapOperatorToMethodName(Operator op) { |
| 10 String name = op.source.stringValue; | 10 String name = op.source.stringValue; |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 | 1182 |
| 1183 visitThrow(Throw node) { | 1183 visitThrow(Throw node) { |
| 1184 if (node.expression === null) { | 1184 if (node.expression === null) { |
| 1185 compiler.unimplemented("SsaBuilder: throw without expression"); | 1185 compiler.unimplemented("SsaBuilder: throw without expression"); |
| 1186 } | 1186 } |
| 1187 visit(node.expression); | 1187 visit(node.expression); |
| 1188 close(new HThrow(pop())); | 1188 close(new HThrow(pop())); |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 visitTypeAnnotation(TypeAnnotation node) { | 1191 visitTypeAnnotation(TypeAnnotation node) { |
| 1192 // We currently ignore type annotations for generating code. | 1192 compiler.internalError('visiting type annotation in SSA builder', |
| 1193 node: node); |
| 1193 } | 1194 } |
| 1194 | 1195 |
| 1195 visitVariableDefinitions(VariableDefinitions node) { | 1196 visitVariableDefinitions(VariableDefinitions node) { |
| 1196 for (Link<Node> link = node.definitions.nodes; | 1197 for (Link<Node> link = node.definitions.nodes; |
| 1197 !link.isEmpty(); | 1198 !link.isEmpty(); |
| 1198 link = link.tail) { | 1199 link = link.tail) { |
| 1199 Node definition = link.head; | 1200 Node definition = link.head; |
| 1200 if (definition is Identifier) { | 1201 if (definition is Identifier) { |
| 1201 HInstruction initialValue = new HLiteral(null, HType.UNKNOWN); | 1202 HInstruction initialValue = new HLiteral(null, HType.UNKNOWN); |
| 1202 add(initialValue); | 1203 add(initialValue); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 } | 1404 } |
| 1404 | 1405 |
| 1405 visitCatchBlock(CatchBlock node) { | 1406 visitCatchBlock(CatchBlock node) { |
| 1406 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node); | 1407 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node); |
| 1407 } | 1408 } |
| 1408 | 1409 |
| 1409 visitTypedef(Typedef node) { | 1410 visitTypedef(Typedef node) { |
| 1410 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); | 1411 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); |
| 1411 } | 1412 } |
| 1412 } | 1413 } |
| OLD | NEW |