Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 12210142: Implement is-checks against type variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Restore comment. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2432 matching lines...) Expand 10 before | Expand all | Expand 10 after
2443 if (type == null) return null; 2443 if (type == null) return null;
2444 if (inCheckContext) { 2444 if (inCheckContext) {
2445 compiler.enqueuer.resolution.registerIsCheck(type); 2445 compiler.enqueuer.resolution.registerIsCheck(type);
2446 } 2446 }
2447 if (typeRequired || inCheckContext) { 2447 if (typeRequired || inCheckContext) {
2448 if (type is InterfaceType) { 2448 if (type is InterfaceType) {
2449 InterfaceType itf = type; 2449 InterfaceType itf = type;
2450 itf.typeArguments.forEach((DartType argument) { 2450 itf.typeArguments.forEach((DartType argument) {
2451 analyzeTypeArgument(type, argument); 2451 analyzeTypeArgument(type, argument);
2452 }); 2452 });
2453 } else if (type is TypeVariableType) {
2454 ClassElement currentClass = enclosingElement.getEnclosingClass();
ahe 2013/02/14 16:58:33 I think this is shadowing a field (which contains
karlklose 2013/02/18 16:02:01 Done, removed.
2455 compiler.world.registerTypeVariableCheck(currentClass);
ngeoffray 2013/02/18 09:27:58 Register in resolver world?
karlklose 2013/02/18 16:02:01 Why? This is done to add the class to the set of c
ngeoffray 2013/02/19 09:00:41 If codegen doesn't need to know what classes make
karlklose 2013/02/19 12:39:28 I moved this set to the backend.
2453 } 2456 }
2454 // TODO(ngeoffray): Also handle cases like: 2457 // TODO(ngeoffray): Also handle T a (in checked mode).
2455 // 1) a is T
2456 // 2) T a (in checked mode).
2457 } 2458 }
2458 return type; 2459 return type;
2459 } 2460 }
2460 2461
2461 visitModifiers(Modifiers node) { 2462 visitModifiers(Modifiers node) {
2462 // TODO(ngeoffray): Implement this. 2463 // TODO(ngeoffray): Implement this.
2463 unimplemented(node, 'modifiers'); 2464 unimplemented(node, 'modifiers');
2464 } 2465 }
2465 2466
2466 visitLiteralList(LiteralList node) { 2467 visitLiteralList(LiteralList node) {
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
3657 return e; 3658 return e;
3658 } 3659 }
3659 3660
3660 /// Assumed to be called by [resolveRedirectingFactory]. 3661 /// Assumed to be called by [resolveRedirectingFactory].
3661 Element visitReturn(Return node) { 3662 Element visitReturn(Return node) {
3662 Node expression = node.expression; 3663 Node expression = node.expression;
3663 return finishConstructorReference(visit(expression), 3664 return finishConstructorReference(visit(expression),
3664 expression, expression); 3665 expression, expression);
3665 } 3666 }
3666 } 3667 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698