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

Side by Side Diff: lib/compiler/implementation/elements/elements.dart

Issue 9980004: Look up the correct constructor for default classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 8 years, 8 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
« no previous file with comments | « no previous file | lib/compiler/implementation/lib/io.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #library('elements'); 5 #library('elements');
6 6
7 #import('../tree/tree.dart'); 7 #import('../tree/tree.dart');
8 #import('../scanner/scannerlib.dart'); 8 #import('../scanner/scannerlib.dart');
9 #import('../leg.dart'); // TODO(karlklose): we only need type. 9 #import('../leg.dart'); // TODO(karlklose): we only need type.
10 #import('../util/util.dart'); 10 #import('../util/util.dart');
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 // Filters so that [f] is only invoked with instance fields. 818 // Filters so that [f] is only invoked with instance fields.
819 void fieldFilter(ClassElement enclosingClass, Element member) { 819 void fieldFilter(ClassElement enclosingClass, Element member) {
820 if (member.isInstanceMember() && member.kind == ElementKind.FIELD) { 820 if (member.isInstanceMember() && member.kind == ElementKind.FIELD) {
821 f(enclosingClass, member); 821 f(enclosingClass, member);
822 } 822 }
823 } 823 }
824 824
825 forEachMember(fieldFilter, includeBackendMembers, includeSuperMembers); 825 forEachMember(fieldFilter, includeBackendMembers, includeSuperMembers);
826 } 826 }
827 827
828 bool implementsInterface(ClassElement intrface) {
829 for (Type implementedInterfaceType in allSupertypes) {
830 ClassElement implementedInterface = implementedInterfaceType.element;
831 if (implementedInterface === intrface) {
832 return true;
833 }
834 }
835 return false;
836 }
837
828 bool isInterface() => false; 838 bool isInterface() => false;
829 bool isNative() => nativeName != null; 839 bool isNative() => nativeName != null;
830 SourceString nativeName; 840 SourceString nativeName;
831 } 841 }
832 842
833 class Elements { 843 class Elements {
834 static bool isLocal(Element element) { 844 static bool isLocal(Element element) {
835 return ((element !== null) 845 return ((element !== null)
836 && !element.isInstanceMember() 846 && !element.isInstanceMember()
837 && !isStaticOrTopLevelField(element) 847 && !isStaticOrTopLevelField(element)
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 final Node node; 1016 final Node node;
1007 Type bound; 1017 Type bound;
1008 Type type; 1018 Type type;
1009 TypeVariableElement(name, Element enclosing, this.node, this.type, 1019 TypeVariableElement(name, Element enclosing, this.node, this.type,
1010 [this.bound]) 1020 [this.bound])
1011 : super(name, ElementKind.TYPE_VARIABLE, enclosing); 1021 : super(name, ElementKind.TYPE_VARIABLE, enclosing);
1012 Type computeType(compiler) => type; 1022 Type computeType(compiler) => type;
1013 Node parseNode(compiler) => node; 1023 Node parseNode(compiler) => node;
1014 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; 1024 toString() => "${enclosingElement.toString()}.${name.slowToString()}";
1015 } 1025 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/lib/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698