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

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

Issue 98533005: Handle @proxy classes in type checker. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years 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 Setlet<Node> get superUses; 9 Setlet<Node> get superUses;
10 10
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 element.allSupertypesAndSelf = element.origin.allSupertypesAndSelf; 751 element.allSupertypesAndSelf = element.origin.allSupertypesAndSelf;
752 // Stepwise assignment to ensure invariant. 752 // Stepwise assignment to ensure invariant.
753 element.supertypeLoadState = STATE_STARTED; 753 element.supertypeLoadState = STATE_STARTED;
754 element.supertypeLoadState = STATE_DONE; 754 element.supertypeLoadState = STATE_DONE;
755 element.resolutionState = STATE_DONE; 755 element.resolutionState = STATE_DONE;
756 // TODO(johnniwinther): Check matching type variables and 756 // TODO(johnniwinther): Check matching type variables and
757 // empty extends/implements clauses. 757 // empty extends/implements clauses.
758 } 758 }
759 for (MetadataAnnotation metadata in element.metadata) { 759 for (MetadataAnnotation metadata in element.metadata) {
760 metadata.ensureResolved(compiler); 760 metadata.ensureResolved(compiler);
761 if (!element.isProxy && metadata.value == compiler.proxyConstant) {
762 element.isProxy = true;
763 }
761 } 764 }
762 765
763 // Force resolution of metadata on non-instance members since they may be 766 // Force resolution of metadata on non-instance members since they may be
764 // inspected by the backend while emitting. Metadata on instance members is 767 // inspected by the backend while emitting. Metadata on instance members is
765 // handled as a result of processing instantiated class members in the 768 // handled as a result of processing instantiated class members in the
766 // enqueuer. 769 // enqueuer.
767 // TODO(ahe): Avoid this eager resolution. 770 // TODO(ahe): Avoid this eager resolution.
768 element.forEachMember((_, Element member) { 771 element.forEachMember((_, Element member) {
769 if (!member.isInstanceMember()) { 772 if (!member.isInstanceMember()) {
770 compiler.withCurrentElement(member, () { 773 compiler.withCurrentElement(member, () {
(...skipping 3996 matching lines...) Expand 10 before | Expand all | Expand 10 after
4767 return finishConstructorReference(visit(expression), 4770 return finishConstructorReference(visit(expression),
4768 expression, expression); 4771 expression, expression);
4769 } 4772 }
4770 } 4773 }
4771 4774
4772 /// Looks up [name] in [scope] and unwraps the result. 4775 /// Looks up [name] in [scope] and unwraps the result.
4773 Element lookupInScope(Compiler compiler, Node node, 4776 Element lookupInScope(Compiler compiler, Node node,
4774 Scope scope, String name) { 4777 Scope scope, String name) {
4775 return Elements.unwrap(scope.lookup(name), compiler, node); 4778 return Elements.unwrap(scope.lookup(name), compiler, node);
4776 } 4779 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698