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 part of ssa; | 5 part of ssa; |
6 | 6 |
7 /** | 7 /** |
8 * A special element for the extra parameter taken by intercepted | 8 * A special element for the extra parameter taken by intercepted |
9 * methods. We need to override [Element.computeType] because our | 9 * methods. We need to override [Element.computeType] because our |
10 * optimizers may look at its declared type. | 10 * optimizers may look at its declared type. |
(...skipping 4775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4786 stack.add(stringBuilder.result); | 4786 stack.add(stringBuilder.result); |
4787 } | 4787 } |
4788 | 4788 |
4789 void visitLiteralNull(LiteralNull node) { | 4789 void visitLiteralNull(LiteralNull node) { |
4790 stack.add(graph.addConstantNull(compiler)); | 4790 stack.add(graph.addConstantNull(compiler)); |
4791 } | 4791 } |
4792 | 4792 |
4793 visitNodeList(NodeList node) { | 4793 visitNodeList(NodeList node) { |
4794 for (Link<Node> link = node.nodes; !link.isEmpty; link = link.tail) { | 4794 for (Link<Node> link = node.nodes; !link.isEmpty; link = link.tail) { |
4795 if (isAborted()) { | 4795 if (isAborted()) { |
4796 compiler.reportWarning(link.head, 'dead code'); | 4796 compiler.reportWarning(link.head, |
| 4797 MessageKind.GENERIC, {'text': 'dead code'}); |
4797 } else { | 4798 } else { |
4798 visit(link.head); | 4799 visit(link.head); |
4799 } | 4800 } |
4800 } | 4801 } |
4801 } | 4802 } |
4802 | 4803 |
4803 void visitParenthesizedExpression(ParenthesizedExpression node) { | 4804 void visitParenthesizedExpression(ParenthesizedExpression node) { |
4804 visit(node.expression); | 4805 visit(node.expression); |
4805 } | 4806 } |
4806 | 4807 |
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6406 DartType unaliased = type.unalias(builder.compiler); | 6407 DartType unaliased = type.unalias(builder.compiler); |
6407 if (unaliased is TypedefType) throw 'unable to unalias $type'; | 6408 if (unaliased is TypedefType) throw 'unable to unalias $type'; |
6408 unaliased.accept(this, builder); | 6409 unaliased.accept(this, builder); |
6409 } | 6410 } |
6410 | 6411 |
6411 void visitDynamicType(DynamicType type, SsaFromAstMixin builder) { | 6412 void visitDynamicType(DynamicType type, SsaFromAstMixin builder) { |
6412 ClassElement cls = builder.compiler.findHelper('DynamicRuntimeType'); | 6413 ClassElement cls = builder.compiler.findHelper('DynamicRuntimeType'); |
6413 builder.push(new HDynamicType(type, new TypeMask.exact(cls))); | 6414 builder.push(new HDynamicType(type, new TypeMask.exact(cls))); |
6414 } | 6415 } |
6415 } | 6416 } |
OLD | NEW |