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 '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/resolution.dart' show | 8 import '../common/resolution.dart' show |
| 9 Resolution; | 9 Resolution; |
| 10 import '../compiler.dart' show | 10 import '../compiler.dart' show |
| (...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1242 /// | 1242 /// |
| 1243 /// class C { factory C() = D; } | 1243 /// class C { factory C() = D; } |
| 1244 /// class D { factory D() = E; } | 1244 /// class D { factory D() = E; } |
| 1245 /// class E { E(); } | 1245 /// class E { E(); } |
| 1246 /// | 1246 /// |
| 1247 /// The immediate redirection target of `C` is `D` and the immediate | 1247 /// The immediate redirection target of `C` is `D` and the immediate |
| 1248 /// redirection target of `D` is `E`. `E` is not a redirecting factory | 1248 /// redirection target of `D` is `E`. `E` is not a redirecting factory |
| 1249 /// constructor so its immediate redirection target is `null`. | 1249 /// constructor so its immediate redirection target is `null`. |
| 1250 ConstructorElement get immediateRedirectionTarget; | 1250 ConstructorElement get immediateRedirectionTarget; |
| 1251 | 1251 |
| 1252 bool get isCyclicRedirection; | |
| 1253 | |
| 1254 /// The prefix of the immediateRedirectionTarget, if it is deferred. | 1252 /// The prefix of the immediateRedirectionTarget, if it is deferred. |
| 1255 /// [null] if it is not deferred. | 1253 /// [null] if it is not deferred. |
| 1256 PrefixElement get redirectionDeferredPrefix; | 1254 PrefixElement get redirectionDeferredPrefix; |
| 1257 | 1255 |
| 1258 /// Is `true` if this constructor is a redirecting generative constructor. | 1256 /// Is `true` if this constructor is a redirecting generative constructor. |
| 1259 bool get isRedirectingGenerative; | 1257 bool get isRedirectingGenerative; |
| 1260 | 1258 |
| 1261 /// Is `true` if this constructor is a redirecting factory constructor. | 1259 /// Is `true` if this constructor is a redirecting factory constructor. |
| 1262 bool get isRedirectingFactory; | 1260 bool get isRedirectingFactory; |
| 1263 | 1261 |
| 1262 /// Is `true` if this constructor is a redirecting factory constructor that is | |
| 1263 /// part of a redirection cycle. | |
| 1264 bool get isCyclicRedirection; | |
| 1265 | |
| 1266 /// Is `true` if this constructor is malformed. | |
|
sigurdm
2015/11/11 08:24:51
/// Is `true` if the effective target of this cons
Johnni Winther
2015/11/11 09:56:29
Done.
| |
| 1267 /// | |
| 1268 /// A constructor is considered malformed if any of the following applies: | |
| 1269 /// | |
| 1270 /// * the constructor is undefined, | |
| 1271 /// * the type of the constructor is undefined, | |
| 1272 /// * the constructor is a redirecting factory and either | |
| 1273 /// - it is part of a redirection cycle, | |
| 1274 /// - the effective target is a generative constructor on an abstract | |
| 1275 /// class, or | |
| 1276 /// - this constructor is constant but the effective target is not, | |
| 1277 /// - the arguments to this constructor are incompatible with the | |
| 1278 /// parameters of the effective target. | |
| 1279 bool get isEffectiveTargetMalformed; | |
| 1280 | |
| 1264 /// Compute the type of the effective target of this constructor for an | 1281 /// Compute the type of the effective target of this constructor for an |
| 1265 /// instantiation site with type [:newType:]. | 1282 /// instantiation site with type [:newType:]. |
| 1266 InterfaceType computeEffectiveTargetType(InterfaceType newType); | 1283 InterfaceType computeEffectiveTargetType(InterfaceType newType); |
| 1267 | 1284 |
| 1268 /// If this is a synthesized constructor [definingConstructor] points to | 1285 /// If this is a synthesized constructor [definingConstructor] points to |
| 1269 /// the generative constructor from which this constructor was created. | 1286 /// the generative constructor from which this constructor was created. |
| 1270 /// Otherwise [definingConstructor] is `null`. | 1287 /// Otherwise [definingConstructor] is `null`. |
| 1271 /// | 1288 /// |
| 1272 /// Consider for instance this hierarchy: | 1289 /// Consider for instance this hierarchy: |
| 1273 /// | 1290 /// |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1700 bool get isDeclaredByField; | 1717 bool get isDeclaredByField; |
| 1701 | 1718 |
| 1702 /// Returns `true` if this member is abstract. | 1719 /// Returns `true` if this member is abstract. |
| 1703 bool get isAbstract; | 1720 bool get isAbstract; |
| 1704 | 1721 |
| 1705 /// If abstract, [implementation] points to the overridden concrete member, | 1722 /// If abstract, [implementation] points to the overridden concrete member, |
| 1706 /// if any. Otherwise [implementation] points to the member itself. | 1723 /// if any. Otherwise [implementation] points to the member itself. |
| 1707 Member get implementation; | 1724 Member get implementation; |
| 1708 } | 1725 } |
| 1709 | 1726 |
| OLD | NEW |