| 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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 Link<Type> interfaces = const EmptyLink<Type>(); | 791 Link<Type> interfaces = const EmptyLink<Type>(); |
| 792 LinkedHashMap<SourceString, TypeVariableElement> typeParameters; | 792 LinkedHashMap<SourceString, TypeVariableElement> typeParameters; |
| 793 bool isResolved = false; | 793 bool isResolved = false; |
| 794 bool isBeingResolved = false; | 794 bool isBeingResolved = false; |
| 795 // backendMembers are members that have been added by the backend to simplify | 795 // backendMembers are members that have been added by the backend to simplify |
| 796 // compilation. They don't have any user-side counter-part. | 796 // compilation. They don't have any user-side counter-part. |
| 797 Link<Element> backendMembers = const EmptyLink<Element>(); | 797 Link<Element> backendMembers = const EmptyLink<Element>(); |
| 798 | 798 |
| 799 Link<Type> allSupertypes; | 799 Link<Type> allSupertypes; |
| 800 ClassElement patch = null; | 800 ClassElement patch = null; |
| 801 Node defaultClause; // Only for interfaces. |
| 801 | 802 |
| 802 ClassElement(SourceString name, CompilationUnitElement enclosing, this.id) | 803 ClassElement(SourceString name, CompilationUnitElement enclosing, this.id) |
| 803 : localMembers = new Map<SourceString, Element>(), | 804 : localMembers = new Map<SourceString, Element>(), |
| 804 constructors = new Map<SourceString, Element>(), | 805 constructors = new Map<SourceString, Element>(), |
| 805 typeParameters = new LinkedHashMap<SourceString, TypeVariableElement>(), | 806 typeParameters = new LinkedHashMap<SourceString, TypeVariableElement>(), |
| 806 super(name, ElementKind.CLASS, enclosing); | 807 super(name, ElementKind.CLASS, enclosing); |
| 807 | 808 |
| 808 void addMember(Element element, DiagnosticListener listener) { | 809 void addMember(Element element, DiagnosticListener listener) { |
| 809 members = members.prepend(element); | 810 members = members.prepend(element); |
| 810 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR || | 811 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR || |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 final Node node; | 1152 final Node node; |
| 1152 Type bound; | 1153 Type bound; |
| 1153 Type type; | 1154 Type type; |
| 1154 TypeVariableElement(name, Element enclosing, this.node, this.type, | 1155 TypeVariableElement(name, Element enclosing, this.node, this.type, |
| 1155 [this.bound]) | 1156 [this.bound]) |
| 1156 : super(name, ElementKind.TYPE_VARIABLE, enclosing); | 1157 : super(name, ElementKind.TYPE_VARIABLE, enclosing); |
| 1157 Type computeType(compiler) => type; | 1158 Type computeType(compiler) => type; |
| 1158 Node parseNode(compiler) => node; | 1159 Node parseNode(compiler) => node; |
| 1159 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; | 1160 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; |
| 1160 } | 1161 } |
| OLD | NEW |