| 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 get currentElement; | 8 Element get currentElement; |
| 9 Set<Node> get superUses; | 9 Set<Node> get superUses; |
| 10 | 10 |
| (...skipping 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2244 } | 2244 } |
| 2245 } else if (target.isTypeVariable()) { | 2245 } else if (target.isTypeVariable()) { |
| 2246 ClassElement cls = target.getEnclosingClass(); | 2246 ClassElement cls = target.getEnclosingClass(); |
| 2247 assert(enclosingElement.getEnclosingClass() == cls); | 2247 assert(enclosingElement.getEnclosingClass() == cls); |
| 2248 compiler.backend.registerClassUsingVariableExpression(cls); | 2248 compiler.backend.registerClassUsingVariableExpression(cls); |
| 2249 compiler.backend.registerTypeVariableExpression(mapping); | 2249 compiler.backend.registerTypeVariableExpression(mapping); |
| 2250 } else if (target.impliesType() && !sendIsMemberAccess) { | 2250 } else if (target.impliesType() && !sendIsMemberAccess) { |
| 2251 // Set the type of the node to [Type] to mark this send as a | 2251 // Set the type of the node to [Type] to mark this send as a |
| 2252 // type literal. | 2252 // type literal. |
| 2253 mapping.setType(node, compiler.typeClass.computeType(compiler)); | 2253 mapping.setType(node, compiler.typeClass.computeType(compiler)); |
| 2254 world.registerInstantiatedClass(compiler.typeClass, mapping); | 2254 world.registerTypeLiteral(target, mapping); |
| 2255 compiler.backend.registerTypeLiteral(mapping); | |
| 2256 } | 2255 } |
| 2257 } | 2256 } |
| 2258 | 2257 |
| 2259 bool resolvedArguments = false; | 2258 bool resolvedArguments = false; |
| 2260 if (node.isOperator) { | 2259 if (node.isOperator) { |
| 2261 String operatorString = node.selector.asOperator().source.stringValue; | 2260 String operatorString = node.selector.asOperator().source.stringValue; |
| 2262 if (operatorString == 'is') { | 2261 if (operatorString == 'is') { |
| 2263 DartType type = resolveTypeRequired(node.typeAnnotationFromIsCheck); | 2262 DartType type = resolveTypeRequired(node.typeAnnotationFromIsCheck); |
| 2264 if (type != null) { | 2263 if (type != null) { |
| 2265 compiler.enqueuer.resolution.registerIsCheck(type, mapping); | 2264 compiler.enqueuer.resolution.registerIsCheck(type, mapping); |
| (...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4021 return e; | 4020 return e; |
| 4022 } | 4021 } |
| 4023 | 4022 |
| 4024 /// Assumed to be called by [resolveRedirectingFactory]. | 4023 /// Assumed to be called by [resolveRedirectingFactory]. |
| 4025 Element visitReturn(Return node) { | 4024 Element visitReturn(Return node) { |
| 4026 Node expression = node.expression; | 4025 Node expression = node.expression; |
| 4027 return finishConstructorReference(visit(expression), | 4026 return finishConstructorReference(visit(expression), |
| 4028 expression, expression); | 4027 expression, expression); |
| 4029 } | 4028 } |
| 4030 } | 4029 } |
| OLD | NEW |