Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Side by Side Diff: lib/compiler/implementation/elements/elements.dart

Issue 11033016: Added TODO. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #import('../tree/tree.dart'); 9 #import('../tree/tree.dart');
10 #import('../scanner/scannerlib.dart'); 10 #import('../scanner/scannerlib.dart');
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 return 'origin ${super.toString()}'; 1124 return 'origin ${super.toString()}';
1125 } else { 1125 } else {
1126 return super.toString(); 1126 return super.toString();
1127 } 1127 }
1128 } 1128 }
1129 1129
1130 Scope buildScope() { 1130 Scope buildScope() {
1131 Scope result = 1131 Scope result =
1132 new MethodScope(enclosingElement.buildScope(), this); 1132 new MethodScope(enclosingElement.buildScope(), this);
1133 if (enclosingElement.isClass()) { 1133 if (enclosingElement.isClass()) {
1134 Scope clsScope = result.parent; 1134 ClassScope clsScope = result.parent;
1135 clsScope.inStaticContext = !isInstanceMember() && !isConstructor(); 1135 clsScope.inStaticContext = !isInstanceMember() && !isConstructor();
1136 } 1136 }
1137 return result; 1137 return result;
1138 } 1138 }
1139 } 1139 }
1140 1140
1141 class ConstructorBodyElement extends FunctionElement { 1141 class ConstructorBodyElement extends FunctionElement {
1142 FunctionElement constructor; 1142 FunctionElement constructor;
1143 1143
1144 ConstructorBodyElement(FunctionElement constructor) 1144 ConstructorBodyElement(FunctionElement constructor)
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 * class Bar {} 1812 * class Bar {}
1813 * :] 1813 * :]
1814 * 1814 *
1815 * In this example, there are three instances of [MetadataAnnotation] 1815 * In this example, there are three instances of [MetadataAnnotation]
1816 * and they correspond each to a location in the source code where 1816 * and they correspond each to a location in the source code where
1817 * there is an at-sign, '@'. The [value] of each of these instances 1817 * there is an at-sign, '@'. The [value] of each of these instances
1818 * are the same compile-time constant, [: const Data() :]. 1818 * are the same compile-time constant, [: const Data() :].
1819 * 1819 *
1820 * The mirror system does not have a concept matching this class. 1820 * The mirror system does not have a concept matching this class.
1821 */ 1821 */
1822 class MetadataAnnotation { 1822 abstract class MetadataAnnotation {
1823 /** 1823 /**
1824 * The compile-time constant which this annotation resolves to. 1824 * The compile-time constant which this annotation resolves to.
1825 * In the mirror system, this would be an object mirror. 1825 * In the mirror system, this would be an object mirror.
1826 */ 1826 */
1827 abstract Constant get value; 1827 abstract Constant get value;
1828 Element annotatedElement; 1828 Element annotatedElement;
1829 int resolutionState; 1829 int resolutionState;
1830 1830
1831 MetadataAnnotation([this.resolutionState = STATE_NOT_STARTED]); 1831 MetadataAnnotation([this.resolutionState = STATE_NOT_STARTED]);
1832 1832
1833 MetadataAnnotation ensureResolved(Compiler compiler) { 1833 MetadataAnnotation ensureResolved(Compiler compiler) {
1834 if (resolutionState == STATE_NOT_STARTED) { 1834 if (resolutionState == STATE_NOT_STARTED) {
1835 compiler.resolver.resolveMetadataAnnotation(this); 1835 compiler.resolver.resolveMetadataAnnotation(this);
1836 } 1836 }
1837 return this; 1837 return this;
1838 } 1838 }
1839 1839
1840 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 1840 String toString() => 'MetadataAnnotation($value, $resolutionState)';
1841 } 1841 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/utils.dart ('k') | lib/compiler/implementation/js/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698