| 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 resolution; | 5 part of resolution; |
| 6 | 6 |
| 7 abstract class TreeElements { | 7 abstract class TreeElements { |
| 8 Element operator[](Node node); | 8 Element operator[](Node node); |
| 9 Selector getSelector(Send send); | 9 Selector getSelector(Send send); |
| 10 DartType getType(Node node); | 10 DartType getType(Node node); |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 } else if (element.isClass()) { | 1114 } else if (element.isClass()) { |
| 1115 ClassElement cls = element; | 1115 ClassElement cls = element; |
| 1116 cls.ensureResolved(compiler); | 1116 cls.ensureResolved(compiler); |
| 1117 Link<DartType> arguments = | 1117 Link<DartType> arguments = |
| 1118 resolveTypeArguments(node, cls.typeVariables, scope, | 1118 resolveTypeArguments(node, cls.typeVariables, scope, |
| 1119 onFailure, whenResolved); | 1119 onFailure, whenResolved); |
| 1120 if (cls.typeVariables.isEmpty && arguments.isEmpty) { | 1120 if (cls.typeVariables.isEmpty && arguments.isEmpty) { |
| 1121 // Use the canonical type if it has no type parameters. | 1121 // Use the canonical type if it has no type parameters. |
| 1122 type = cls.computeType(compiler); | 1122 type = cls.computeType(compiler); |
| 1123 } else { | 1123 } else { |
| 1124 type = new InterfaceType(cls, arguments); | 1124 type = new InterfaceType(cls.declaration, arguments); |
| 1125 } | 1125 } |
| 1126 } else if (element.isTypedef()) { | 1126 } else if (element.isTypedef()) { |
| 1127 TypedefElement typdef = element; | 1127 TypedefElement typdef = element; |
| 1128 // TODO(ahe): Should be [ensureResolved]. | 1128 // TODO(ahe): Should be [ensureResolved]. |
| 1129 compiler.resolveTypedef(typdef); | 1129 compiler.resolveTypedef(typdef); |
| 1130 typdef.computeType(compiler); | 1130 typdef.computeType(compiler); |
| 1131 Link<DartType> arguments = resolveTypeArguments( | 1131 Link<DartType> arguments = resolveTypeArguments( |
| 1132 node, typdef.typeVariables, | 1132 node, typdef.typeVariables, |
| 1133 scope, onFailure, whenResolved); | 1133 scope, onFailure, whenResolved); |
| 1134 if (typdef.typeVariables.isEmpty && arguments.isEmpty) { | 1134 if (typdef.typeVariables.isEmpty && arguments.isEmpty) { |
| (...skipping 1984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3119 return e; | 3119 return e; |
| 3120 } | 3120 } |
| 3121 | 3121 |
| 3122 /// Assumed to be called by [resolveRedirectingFactory]. | 3122 /// Assumed to be called by [resolveRedirectingFactory]. |
| 3123 Element visitReturn(Return node) { | 3123 Element visitReturn(Return node) { |
| 3124 Node expression = node.expression; | 3124 Node expression = node.expression; |
| 3125 return finishConstructorReference(visit(expression), | 3125 return finishConstructorReference(visit(expression), |
| 3126 expression, expression); | 3126 expression, expression); |
| 3127 } | 3127 } |
| 3128 } | 3128 } |
| OLD | NEW |