| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.modelx; | 5 library elements.modelx; |
| 6 | 6 |
| 7 import 'dart:collection' show LinkedHashMap; | 7 import 'dart:collection' show LinkedHashMap; |
| 8 | 8 |
| 9 import 'elements.dart'; | 9 import 'elements.dart'; |
| 10 import '../../compiler.dart' as api; | 10 import '../../compiler.dart' as api; |
| (...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1518 super(name, ElementKind.CLASS, enclosing); | 1518 super(name, ElementKind.CLASS, enclosing); |
| 1519 | 1519 |
| 1520 int get hashCode => id; | 1520 int get hashCode => id; |
| 1521 ClassElement get patch => super.patch; | 1521 ClassElement get patch => super.patch; |
| 1522 ClassElement get origin => super.origin; | 1522 ClassElement get origin => super.origin; |
| 1523 ClassElement get declaration => super.declaration; | 1523 ClassElement get declaration => super.declaration; |
| 1524 ClassElement get implementation => super.implementation; | 1524 ClassElement get implementation => super.implementation; |
| 1525 | 1525 |
| 1526 bool get hasBackendMembers => !backendMembers.isEmpty; | 1526 bool get hasBackendMembers => !backendMembers.isEmpty; |
| 1527 | 1527 |
| 1528 bool get isUnnamedMixinApplication => false; |
| 1529 |
| 1528 InterfaceType computeType(Compiler compiler) { | 1530 InterfaceType computeType(Compiler compiler) { |
| 1529 if (thisType == null) { | 1531 if (thisType == null) { |
| 1530 if (origin == null) { | 1532 if (origin == null) { |
| 1531 Link<DartType> parameters = computeTypeParameters(compiler); | 1533 Link<DartType> parameters = computeTypeParameters(compiler); |
| 1532 thisType = new InterfaceType(this, parameters); | 1534 thisType = new InterfaceType(this, parameters); |
| 1533 if (parameters.isEmpty) { | 1535 if (parameters.isEmpty) { |
| 1534 rawTypeCache = thisType; | 1536 rawTypeCache = thisType; |
| 1535 } else { | 1537 } else { |
| 1536 var dynamicParameters = const Link<DartType>(); | 1538 var dynamicParameters = const Link<DartType>(); |
| 1537 parameters.forEach((_) { | 1539 parameters.forEach((_) { |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1980 | 1982 |
| 1981 Link<FunctionElement> constructors = new Link<FunctionElement>(); | 1983 Link<FunctionElement> constructors = new Link<FunctionElement>(); |
| 1982 | 1984 |
| 1983 ClassElement mixin; | 1985 ClassElement mixin; |
| 1984 | 1986 |
| 1985 MixinApplicationElementX(SourceString name, Element enclosing, int id, | 1987 MixinApplicationElementX(SourceString name, Element enclosing, int id, |
| 1986 this.node, this.modifiers) | 1988 this.node, this.modifiers) |
| 1987 : super(name, enclosing, id, STATE_NOT_STARTED); | 1989 : super(name, enclosing, id, STATE_NOT_STARTED); |
| 1988 | 1990 |
| 1989 bool get isMixinApplication => true; | 1991 bool get isMixinApplication => true; |
| 1992 bool get isUnnamedMixinApplication => node is! NamedMixinApplication; |
| 1990 bool get hasConstructor => !constructors.isEmpty; | 1993 bool get hasConstructor => !constructors.isEmpty; |
| 1991 bool get hasLocalScopeMembers => !constructors.isEmpty; | 1994 bool get hasLocalScopeMembers => !constructors.isEmpty; |
| 1992 | 1995 |
| 1993 unsupported(message) { | 1996 unsupported(message) { |
| 1994 throw new UnsupportedError('$message is not supported on $this'); | 1997 throw new UnsupportedError('$message is not supported on $this'); |
| 1995 } | 1998 } |
| 1996 | 1999 |
| 1997 get patch => null; | 2000 get patch => null; |
| 1998 get origin => null; | 2001 get origin => null; |
| 1999 | 2002 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 | 2182 |
| 2180 MetadataAnnotation ensureResolved(Compiler compiler) { | 2183 MetadataAnnotation ensureResolved(Compiler compiler) { |
| 2181 if (resolutionState == STATE_NOT_STARTED) { | 2184 if (resolutionState == STATE_NOT_STARTED) { |
| 2182 compiler.resolver.resolveMetadataAnnotation(this); | 2185 compiler.resolver.resolveMetadataAnnotation(this); |
| 2183 } | 2186 } |
| 2184 return this; | 2187 return this; |
| 2185 } | 2188 } |
| 2186 | 2189 |
| 2187 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2190 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
| 2188 } | 2191 } |
| OLD | NEW |