| 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 'dart:uri'; | 7 import 'dart:uri'; |
| 8 | 8 |
| 9 // TODO(ahe): Rename prefix to 'api' when VM bug is fixed. | 9 // TODO(ahe): Rename prefix to 'api' when VM bug is fixed. |
| 10 import '../../compiler.dart' as api_e; | 10 import '../../compiler.dart' as api_e; |
| (...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1754 */ | 1754 */ |
| 1755 bool isSubclassOf(ClassElement cls) { | 1755 bool isSubclassOf(ClassElement cls) { |
| 1756 for (ClassElement s = this; s != null; s = s.superclass) { | 1756 for (ClassElement s = this; s != null; s = s.superclass) { |
| 1757 if (identical(s, cls)) return true; | 1757 if (identical(s, cls)) return true; |
| 1758 } | 1758 } |
| 1759 return false; | 1759 return false; |
| 1760 } | 1760 } |
| 1761 | 1761 |
| 1762 bool isInterface() => false; | 1762 bool isInterface() => false; |
| 1763 bool isNative() => nativeTagInfo != null; | 1763 bool isNative() => nativeTagInfo != null; |
| 1764 void setNative(String name) { |
| 1765 nativeTagInfo = new SourceString(name); |
| 1766 } |
| 1764 int get hashCode => id; | 1767 int get hashCode => id; |
| 1765 | 1768 |
| 1766 Scope buildScope() => new ClassScope(enclosingElement.buildScope(), this); | 1769 Scope buildScope() => new ClassScope(enclosingElement.buildScope(), this); |
| 1767 | 1770 |
| 1768 String toString() { | 1771 String toString() { |
| 1769 if (origin != null) { | 1772 if (origin != null) { |
| 1770 return 'patch ${super.toString()}'; | 1773 return 'patch ${super.toString()}'; |
| 1771 } else if (patch != null) { | 1774 } else if (patch != null) { |
| 1772 return 'origin ${super.toString()}'; | 1775 return 'origin ${super.toString()}'; |
| 1773 } else { | 1776 } else { |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 | 2132 |
| 2130 MetadataAnnotation ensureResolved(Compiler compiler) { | 2133 MetadataAnnotation ensureResolved(Compiler compiler) { |
| 2131 if (resolutionState == STATE_NOT_STARTED) { | 2134 if (resolutionState == STATE_NOT_STARTED) { |
| 2132 compiler.resolver.resolveMetadataAnnotation(this); | 2135 compiler.resolver.resolveMetadataAnnotation(this); |
| 2133 } | 2136 } |
| 2134 return this; | 2137 return this; |
| 2135 } | 2138 } |
| 2136 | 2139 |
| 2137 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2140 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
| 2138 } | 2141 } |
| OLD | NEW |