Chromium Code Reviews| 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 import 'modelx.dart'; | 9 import 'modelx.dart'; |
| 10 import '../tree/tree.dart'; | 10 import '../tree/tree.dart'; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 222 Element getEnclosingMember(); | 222 Element getEnclosingMember(); |
| 223 Element getOutermostEnclosingMemberOrTopLevel(); | 223 Element getOutermostEnclosingMemberOrTopLevel(); |
| 224 | 224 |
| 225 FunctionElement asFunctionElement(); | 225 FunctionElement asFunctionElement(); |
| 226 | 226 |
| 227 bool get isPatched; | 227 bool get isPatched; |
| 228 bool get isPatch; | 228 bool get isPatch; |
| 229 bool get isImplementation; | 229 bool get isImplementation; |
| 230 bool get isDeclaration; | 230 bool get isDeclaration; |
| 231 bool get isSynthesized; | 231 bool get isSynthesized; |
| 232 bool get isForwardingConstructor; | |
| 232 | 233 |
| 233 Element get implementation; | 234 Element get implementation; |
| 234 Element get declaration; | 235 Element get declaration; |
| 235 Element get patch; | 236 Element get patch; |
| 236 Element get origin; | 237 Element get origin; |
| 237 | 238 |
| 238 bool hasFixedBackendName(); | 239 bool hasFixedBackendName(); |
| 239 String fixedBackendName(); | 240 String fixedBackendName(); |
| 240 | 241 |
| 241 bool isAbstract(Compiler compiler); | 242 bool isAbstract(Compiler compiler); |
| 242 bool isForeign(Compiler compiler); | 243 bool isForeign(Compiler compiler); |
| 243 | 244 |
| 244 void addMetadata(MetadataAnnotation annotation); | 245 void addMetadata(MetadataAnnotation annotation); |
| 245 void setNative(String name); | 246 void setNative(String name); |
| 246 void setFixedBackendName(String name); | 247 void setFixedBackendName(String name); |
| 247 | 248 |
| 248 Scope buildScope(); | 249 Scope buildScope(); |
| 250 | |
| 251 FunctionElement get targetConstructor; | |
|
kasperl
2013/04/25 12:13:12
Add a comment that explains what this is (and that
karlklose
2013/05/03 09:35:45
Done.
| |
| 249 } | 252 } |
| 250 | 253 |
| 251 class Elements { | 254 class Elements { |
| 252 static bool isUnresolved(Element e) { | 255 static bool isUnresolved(Element e) { |
| 253 return e == null || e.isErroneous(); | 256 return e == null || e.isErroneous(); |
| 254 } | 257 } |
| 255 static bool isErroneousElement(Element e) => e != null && e.isErroneous(); | 258 static bool isErroneousElement(Element e) => e != null && e.isErroneous(); |
| 256 | 259 |
| 257 static bool isClass(Element e) => e != null && e.kind == ElementKind.CLASS; | 260 static bool isClass(Element e) => e != null && e.kind == ElementKind.CLASS; |
| 258 static bool isTypedef(Element e) { | 261 static bool isTypedef(Element e) { |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 870 int get resolutionState; | 873 int get resolutionState; |
| 871 Token get beginToken; | 874 Token get beginToken; |
| 872 Token get endToken; | 875 Token get endToken; |
| 873 | 876 |
| 874 // TODO(kasperl): Try to get rid of these. | 877 // TODO(kasperl): Try to get rid of these. |
| 875 void set annotatedElement(Element value); | 878 void set annotatedElement(Element value); |
| 876 void set resolutionState(int value); | 879 void set resolutionState(int value); |
| 877 | 880 |
| 878 MetadataAnnotation ensureResolved(Compiler compiler); | 881 MetadataAnnotation ensureResolved(Compiler compiler); |
| 879 } | 882 } |
| OLD | NEW |