Chromium Code Reviews| 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 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2490 if (inCheckContext) { | 2490 if (inCheckContext) { |
| 2491 compiler.enqueuer.resolution.registerIsCheck(type); | 2491 compiler.enqueuer.resolution.registerIsCheck(type); |
| 2492 } | 2492 } |
| 2493 if (typeRequired || inCheckContext) { | 2493 if (typeRequired || inCheckContext) { |
| 2494 if (type is InterfaceType) { | 2494 if (type is InterfaceType) { |
| 2495 InterfaceType itf = type; | 2495 InterfaceType itf = type; |
| 2496 itf.typeArguments.forEach((DartType argument) { | 2496 itf.typeArguments.forEach((DartType argument) { |
| 2497 analyzeTypeArgument(type, argument); | 2497 analyzeTypeArgument(type, argument); |
| 2498 }); | 2498 }); |
| 2499 } | 2499 } |
| 2500 // TODO(ngeoffray): Also handle cases like: | 2500 // TODO(ngeoffray): Also handle T a (in checked mode). |
|
ngeoffray
2013/02/21 10:26:18
Isn't that trivial to fix? Have the SSA builder tr
karlklose
2013/02/21 14:48:44
It probably is, but I don't want to do that in thi
| |
| 2501 // 1) a is T | |
| 2502 // 2) T a (in checked mode). | |
| 2503 } | 2501 } |
| 2504 return type; | 2502 return type; |
| 2505 } | 2503 } |
| 2506 | 2504 |
| 2507 visitModifiers(Modifiers node) { | 2505 visitModifiers(Modifiers node) { |
| 2508 // TODO(ngeoffray): Implement this. | 2506 // TODO(ngeoffray): Implement this. |
| 2509 unimplemented(node, 'modifiers'); | 2507 unimplemented(node, 'modifiers'); |
| 2510 } | 2508 } |
| 2511 | 2509 |
| 2512 visitLiteralList(LiteralList node) { | 2510 visitLiteralList(LiteralList node) { |
| (...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3718 return e; | 3716 return e; |
| 3719 } | 3717 } |
| 3720 | 3718 |
| 3721 /// Assumed to be called by [resolveRedirectingFactory]. | 3719 /// Assumed to be called by [resolveRedirectingFactory]. |
| 3722 Element visitReturn(Return node) { | 3720 Element visitReturn(Return node) { |
| 3723 Node expression = node.expression; | 3721 Node expression = node.expression; |
| 3724 return finishConstructorReference(visit(expression), | 3722 return finishConstructorReference(visit(expression), |
| 3725 expression, expression); | 3723 expression, expression); |
| 3726 } | 3724 } |
| 3727 } | 3725 } |
| OLD | NEW |