| 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 '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/names.dart' show Identifiers; | 8 import '../common/names.dart' show Identifiers; |
| 9 import '../common/resolution.dart' show Resolution, ParsingContext; | 9 import '../common/resolution.dart' show Resolution, ParsingContext; |
| 10 import '../compiler.dart' show Compiler; | 10 import '../compiler.dart' show Compiler; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 ErroneousElementX( | 217 ErroneousElementX( |
| 218 this.messageKind, this.messageArguments, String name, Element enclosing) | 218 this.messageKind, this.messageArguments, String name, Element enclosing) |
| 219 : super(name, ElementKind.ERROR, enclosing); | 219 : super(name, ElementKind.ERROR, enclosing); |
| 220 | 220 |
| 221 bool get isTopLevel => false; | 221 bool get isTopLevel => false; |
| 222 | 222 |
| 223 bool get isSynthesized => true; | 223 bool get isSynthesized => true; |
| 224 | 224 |
| 225 bool get isCyclicRedirection => false; | 225 bool get isCyclicRedirection => false; |
| 226 | 226 |
| 227 bool get isDefaultConstructor => false; |
| 228 |
| 227 bool get isMalformed => true; | 229 bool get isMalformed => true; |
| 228 | 230 |
| 229 PrefixElement get redirectionDeferredPrefix => null; | 231 PrefixElement get redirectionDeferredPrefix => null; |
| 230 | 232 |
| 231 AbstractFieldElement abstractField; | 233 AbstractFieldElement abstractField; |
| 232 | 234 |
| 233 unsupported() { | 235 unsupported() { |
| 234 throw 'unsupported operation on erroneous element'; | 236 throw 'unsupported operation on erroneous element'; |
| 235 } | 237 } |
| 236 | 238 |
| (...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2230 PrefixElement _redirectionDeferredPrefix; | 2232 PrefixElement _redirectionDeferredPrefix; |
| 2231 | 2233 |
| 2232 ConstructorElementX get patch => super.patch; | 2234 ConstructorElementX get patch => super.patch; |
| 2233 | 2235 |
| 2234 bool get isRedirectingFactory => immediateRedirectionTarget != null; | 2236 bool get isRedirectingFactory => immediateRedirectionTarget != null; |
| 2235 | 2237 |
| 2236 // TODO(johnniwinther): This should also return true for cyclic redirecting | 2238 // TODO(johnniwinther): This should also return true for cyclic redirecting |
| 2237 // generative constructors. | 2239 // generative constructors. |
| 2238 bool get isCyclicRedirection => effectiveTarget.isRedirectingFactory; | 2240 bool get isCyclicRedirection => effectiveTarget.isRedirectingFactory; |
| 2239 | 2241 |
| 2242 bool get isDefaultConstructor => false; |
| 2243 |
| 2240 /// These fields are set by the post process queue when checking for cycles. | 2244 /// These fields are set by the post process queue when checking for cycles. |
| 2241 ConstructorElement effectiveTargetInternal; | 2245 ConstructorElement effectiveTargetInternal; |
| 2242 DartType _effectiveTargetType; | 2246 DartType _effectiveTargetType; |
| 2243 bool _isEffectiveTargetMalformed; | 2247 bool _isEffectiveTargetMalformed; |
| 2244 | 2248 |
| 2245 bool get hasEffectiveTarget { | 2249 bool get hasEffectiveTarget { |
| 2246 if (isPatched) { | 2250 if (isPatched) { |
| 2247 return patch.hasEffectiveTarget; | 2251 return patch.hasEffectiveTarget; |
| 2248 } | 2252 } |
| 2249 return effectiveTargetInternal != null; | 2253 return effectiveTargetInternal != null; |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3402 body = node.asFunctionExpression().body; | 3406 body = node.asFunctionExpression().body; |
| 3403 } | 3407 } |
| 3404 return new ParsedResolvedAst( | 3408 return new ParsedResolvedAst( |
| 3405 declaration, | 3409 declaration, |
| 3406 node, | 3410 node, |
| 3407 body, | 3411 body, |
| 3408 definingElement.treeElements, | 3412 definingElement.treeElements, |
| 3409 definingElement.compilationUnit.script.resourceUri); | 3413 definingElement.compilationUnit.script.resourceUri); |
| 3410 } | 3414 } |
| 3411 } | 3415 } |
| OLD | NEW |