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

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

Issue 16154021: Implement reflecting on uninstantiated classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update comment in second test. Created 7 years, 6 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 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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698