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

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

Issue 26651006: Switch dart2js 'typedef name = mixinApplication' to 'class name = mixinApplication'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Support modifiers. Created 7 years, 2 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 3668 matching lines...) Expand 10 before | Expand all | Expand 10 after
3679 compiler.reportError(mixinNode, 3679 compiler.reportError(mixinNode,
3680 MessageKind.CANNOT_MIXIN, {'type': mixinType}); 3680 MessageKind.CANNOT_MIXIN, {'type': mixinType});
3681 } 3681 }
3682 return mixinType; 3682 return mixinType;
3683 } 3683 }
3684 3684
3685 DartType visitNamedMixinApplication(NamedMixinApplication node) { 3685 DartType visitNamedMixinApplication(NamedMixinApplication node) {
3686 compiler.ensure(element != null); 3686 compiler.ensure(element != null);
3687 compiler.ensure(element.resolutionState == STATE_STARTED); 3687 compiler.ensure(element.resolutionState == STATE_STARTED);
3688 3688
3689 if (identical(node.classKeyword.stringValue, 'typedef')) {
3690 // TODO(aprelev@gmail.com): Remove this deprecation diagnostic
3691 // together with corresponding TODO in parser.dart.
3692 compiler.reportWarning(node.classKeyword,
3693 MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX.message());
ahe 2013/10/11 08:32:27 You should use compiler.reportWarningCode instead,
aam-me 2013/10/11 11:21:32 Ah, I understand. Thanks for the explanation. Swit
3694 }
3695
3689 InterfaceType type = element.computeType(compiler); 3696 InterfaceType type = element.computeType(compiler);
3690 scope = new TypeDeclarationScope(scope, element); 3697 scope = new TypeDeclarationScope(scope, element);
3691 resolveTypeVariableBounds(node.typeParameters); 3698 resolveTypeVariableBounds(node.typeParameters);
3692 3699
3693 // Generate anonymous mixin application elements for the 3700 // Generate anonymous mixin application elements for the
3694 // intermediate mixin applications (excluding the last). 3701 // intermediate mixin applications (excluding the last).
3695 DartType supertype = resolveSupertype(element, node.superclass); 3702 DartType supertype = resolveSupertype(element, node.superclass);
3696 Link<Node> link = node.mixins.nodes; 3703 Link<Node> link = node.mixins.nodes;
3697 while (!link.tail.isEmpty) { 3704 while (!link.tail.isEmpty) {
3698 supertype = applyMixin(supertype, checkMixinType(link.head), link.head); 3705 supertype = applyMixin(supertype, checkMixinType(link.head), link.head);
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
4520 return finishConstructorReference(visit(expression), 4527 return finishConstructorReference(visit(expression),
4521 expression, expression); 4528 expression, expression);
4522 } 4529 }
4523 } 4530 }
4524 4531
4525 /// Looks up [name] in [scope] and unwraps the result. 4532 /// Looks up [name] in [scope] and unwraps the result.
4526 Element lookupInScope(Compiler compiler, Node node, 4533 Element lookupInScope(Compiler compiler, Node node,
4527 Scope scope, SourceString name) { 4534 Scope scope, SourceString name) {
4528 return Elements.unwrap(scope.lookup(name), compiler, node); 4535 return Elements.unwrap(scope.lookup(name), compiler, node);
4529 } 4536 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698