| 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 } else if (element.kind == ElementKind.GETTER | 706 } else if (element.kind == ElementKind.GETTER |
| 707 || element.kind == ElementKind.SETTER) { | 707 || element.kind == ElementKind.SETTER) { |
| 708 addGetterOrSetter(element, localMembers[element.name], listener); | 708 addGetterOrSetter(element, localMembers[element.name], listener); |
| 709 } else { | 709 } else { |
| 710 localMembers[element.name] = element; | 710 localMembers[element.name] = element; |
| 711 } | 711 } |
| 712 } | 712 } |
| 713 | 713 |
| 714 Type computeType(compiler) { | 714 Type computeType(compiler) { |
| 715 if (type === null) { | 715 if (type === null) { |
| 716 type = new SimpleType(name, this); | 716 type = new InterfaceType(name, this); |
| 717 } | 717 } |
| 718 return type; | 718 return type; |
| 719 } | 719 } |
| 720 | 720 |
| 721 ClassElement ensureResolved(Compiler compiler) { | 721 ClassElement ensureResolved(Compiler compiler) { |
| 722 if (!isResolved && !isBeingResolved) { | 722 if (!isResolved && !isBeingResolved) { |
| 723 isBeingResolved = true; | 723 isBeingResolved = true; |
| 724 compiler.resolveType(this); | 724 compiler.resolveType(this); |
| 725 isBeingResolved = false; | 725 isBeingResolved = false; |
| 726 isResolved = true; | 726 isResolved = true; |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 final Node node; | 1016 final Node node; |
| 1017 Type bound; | 1017 Type bound; |
| 1018 Type type; | 1018 Type type; |
| 1019 TypeVariableElement(name, Element enclosing, this.node, this.type, | 1019 TypeVariableElement(name, Element enclosing, this.node, this.type, |
| 1020 [this.bound]) | 1020 [this.bound]) |
| 1021 : super(name, ElementKind.TYPE_VARIABLE, enclosing); | 1021 : super(name, ElementKind.TYPE_VARIABLE, enclosing); |
| 1022 Type computeType(compiler) => type; | 1022 Type computeType(compiler) => type; |
| 1023 Node parseNode(compiler) => node; | 1023 Node parseNode(compiler) => node; |
| 1024 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; | 1024 toString() => "${enclosingElement.toString()}.${name.slowToString()}"; |
| 1025 } | 1025 } |
| OLD | NEW |