| OLD | NEW |
| 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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 Link<Type> interfaces = const EmptyLink<Type>(); | 822 Link<Type> interfaces = const EmptyLink<Type>(); |
| 823 LinkedHashMap<SourceString, TypeVariableElement> typeParameters; | 823 LinkedHashMap<SourceString, TypeVariableElement> typeParameters; |
| 824 bool isResolved = false; | 824 bool isResolved = false; |
| 825 bool isBeingResolved = false; | 825 bool isBeingResolved = false; |
| 826 // backendMembers are members that have been added by the backend to simplify | 826 // backendMembers are members that have been added by the backend to simplify |
| 827 // compilation. They don't have any user-side counter-part. | 827 // compilation. They don't have any user-side counter-part. |
| 828 Link<Element> backendMembers = const EmptyLink<Element>(); | 828 Link<Element> backendMembers = const EmptyLink<Element>(); |
| 829 | 829 |
| 830 Link<Type> allSupertypes; | 830 Link<Type> allSupertypes; |
| 831 ClassElement patch = null; | 831 ClassElement patch = null; |
| 832 Node defaultClause; // Only for interfaces. | |
| 833 | 832 |
| 834 ClassElement(SourceString name, CompilationUnitElement enclosing, this.id) | 833 ClassElement(SourceString name, CompilationUnitElement enclosing, this.id) |
| 835 : localMembers = new Map<SourceString, Element>(), | 834 : localMembers = new Map<SourceString, Element>(), |
| 836 constructors = new Map<SourceString, Element>(), | 835 constructors = new Map<SourceString, Element>(), |
| 837 typeParameters = new LinkedHashMap<SourceString, TypeVariableElement>(), | 836 typeParameters = new LinkedHashMap<SourceString, TypeVariableElement>(), |
| 838 super(name, ElementKind.CLASS, enclosing); | 837 super(name, ElementKind.CLASS, enclosing); |
| 839 | 838 |
| 840 void addMember(Element element, DiagnosticListener listener) { | 839 void addMember(Element element, DiagnosticListener listener) { |
| 841 members = members.prepend(element); | 840 members = members.prepend(element); |
| 842 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR || | 841 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR || |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1183 final Node node; | 1182 final Node node; |
| 1184 Type bound; | 1183 Type bound; |
| 1185 Type type; | 1184 Type type; |
| 1186 TypeVariableElement(name, Element enclosing, this.node, this.type, | 1185 TypeVariableElement(name, Element enclosing, this.node, this.type, |
| 1187 [this.bound]) | 1186 [this.bound]) |
| 1188 : super(name, ElementKind.TYPE_VARIABLE, enclosing); | 1187 : super(name, ElementKind.TYPE_VARIABLE, enclosing); |
| 1189 Type computeType(compiler) => type; | 1188 Type computeType(compiler) => type; |
| 1190 Node parseNode(compiler) => node; | 1189 Node parseNode(compiler) => node; |
| 1191 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; | 1190 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; |
| 1192 } | 1191 } |
| OLD | NEW |