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

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

Issue 22692002: Implement reflecting on mixin applications. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Minor bug fixes during testing. Created 7 years, 4 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 3329 matching lines...) Expand 10 before | Expand all | Expand 10 after
3340 link = link.tail; 3340 link = link.tail;
3341 } 3341 }
3342 doApplyMixinTo(element, supertype, resolveType(link.head)); 3342 doApplyMixinTo(element, supertype, resolveType(link.head));
3343 return element.computeType(compiler); 3343 return element.computeType(compiler);
3344 } 3344 }
3345 3345
3346 DartType applyMixin(DartType supertype, DartType mixinType, Node node) { 3346 DartType applyMixin(DartType supertype, DartType mixinType, Node node) {
3347 String superName = supertype.name.slowToString(); 3347 String superName = supertype.name.slowToString();
3348 String mixinName = mixinType.name.slowToString(); 3348 String mixinName = mixinType.name.slowToString();
3349 ClassElement mixinApplication = new MixinApplicationElementX( 3349 ClassElement mixinApplication = new MixinApplicationElementX(
3350 new SourceString("${superName}_${mixinName}"), 3350 new SourceString("${superName}+${mixinName}"),
3351 element.getCompilationUnit(), 3351 element.getCompilationUnit(),
3352 compiler.getNextFreeClassId(), 3352 compiler.getNextFreeClassId(),
3353 node, 3353 node,
3354 Modifiers.EMPTY); // TODO(kasperl): Should this be abstract? 3354 Modifiers.EMPTY); // TODO(kasperl): Should this be abstract?
3355 doApplyMixinTo(mixinApplication, supertype, mixinType); 3355 doApplyMixinTo(mixinApplication, supertype, mixinType);
3356 mixinApplication.resolutionState = STATE_DONE; 3356 mixinApplication.resolutionState = STATE_DONE;
3357 mixinApplication.supertypeLoadState = STATE_DONE; 3357 mixinApplication.supertypeLoadState = STATE_DONE;
3358 return mixinApplication.computeType(compiler); 3358 return mixinApplication.computeType(compiler);
3359 } 3359 }
3360 3360
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
4086 return e; 4086 return e;
4087 } 4087 }
4088 4088
4089 /// Assumed to be called by [resolveRedirectingFactory]. 4089 /// Assumed to be called by [resolveRedirectingFactory].
4090 Element visitReturn(Return node) { 4090 Element visitReturn(Return node) {
4091 Node expression = node.expression; 4091 Node expression = node.expression;
4092 return finishConstructorReference(visit(expression), 4092 return finishConstructorReference(visit(expression),
4093 expression, expression); 4093 expression, expression);
4094 } 4094 }
4095 } 4095 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart ('k') | dart/sdk/lib/_internal/lib/js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698