| 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 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2471 if (type == null) return null; | 2471 if (type == null) return null; |
| 2472 if (inCheckContext) { | 2472 if (inCheckContext) { |
| 2473 compiler.enqueuer.resolution.registerIsCheck(type); | 2473 compiler.enqueuer.resolution.registerIsCheck(type); |
| 2474 } | 2474 } |
| 2475 if (typeRequired || inCheckContext) { | 2475 if (typeRequired || inCheckContext) { |
| 2476 if (type is InterfaceType) { | 2476 if (type is InterfaceType) { |
| 2477 InterfaceType itf = type; | 2477 InterfaceType itf = type; |
| 2478 itf.typeArguments.forEach((DartType argument) { | 2478 itf.typeArguments.forEach((DartType argument) { |
| 2479 analyzeTypeArgument(type, argument); | 2479 analyzeTypeArgument(type, argument); |
| 2480 }); | 2480 }); |
| 2481 } else if (type is TypeVariableType) { |
| 2482 compiler.world.registerTypeVariableCheck(currentClass); |
| 2483 compiler.backend.registerRuntimeType(); |
| 2481 } | 2484 } |
| 2482 // TODO(ngeoffray): Also handle cases like: | 2485 // TODO(ngeoffray): Also handle T a (in checked mode). |
| 2483 // 1) a is T | |
| 2484 // 2) T a (in checked mode). | |
| 2485 } | 2486 } |
| 2486 return type; | 2487 return type; |
| 2487 } | 2488 } |
| 2488 | 2489 |
| 2489 visitModifiers(Modifiers node) { | 2490 visitModifiers(Modifiers node) { |
| 2490 // TODO(ngeoffray): Implement this. | 2491 // TODO(ngeoffray): Implement this. |
| 2491 unimplemented(node, 'modifiers'); | 2492 unimplemented(node, 'modifiers'); |
| 2492 } | 2493 } |
| 2493 | 2494 |
| 2494 visitLiteralList(LiteralList node) { | 2495 visitLiteralList(LiteralList node) { |
| (...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3700 return e; | 3701 return e; |
| 3701 } | 3702 } |
| 3702 | 3703 |
| 3703 /// Assumed to be called by [resolveRedirectingFactory]. | 3704 /// Assumed to be called by [resolveRedirectingFactory]. |
| 3704 Element visitReturn(Return node) { | 3705 Element visitReturn(Return node) { |
| 3705 Node expression = node.expression; | 3706 Node expression = node.expression; |
| 3706 return finishConstructorReference(visit(expression), | 3707 return finishConstructorReference(visit(expression), |
| 3707 expression, expression); | 3708 expression, expression); |
| 3708 } | 3709 } |
| 3709 } | 3710 } |
| OLD | NEW |