Chromium Code Reviews| 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 'elements.dart'; | 7 import 'elements.dart'; |
| 8 import '../../compiler.dart' as api; | 8 import '../../compiler.dart' as api; |
| 9 import '../tree/tree.dart'; | 9 import '../tree/tree.dart'; |
| 10 import '../util/util.dart'; | 10 import '../util/util.dart'; |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 Link<MetadataAnnotation> get metadata => unsupported(); | 321 Link<MetadataAnnotation> get metadata => unsupported(); |
| 322 get type => unsupported(); | 322 get type => unsupported(); |
| 323 get cachedNode => unsupported(); | 323 get cachedNode => unsupported(); |
| 324 get functionSignature => unsupported(); | 324 get functionSignature => unsupported(); |
| 325 get patch => null; | 325 get patch => null; |
| 326 get origin => this; | 326 get origin => this; |
| 327 get defaultImplementation => unsupported(); | 327 get defaultImplementation => unsupported(); |
| 328 | 328 |
| 329 bool get isRedirectingFactory => unsupported(); | 329 bool get isRedirectingFactory => unsupported(); |
| 330 | 330 |
| 331 void setAbstract() => unsupported(); | |
| 332 | |
| 331 setPatch(patch) => unsupported(); | 333 setPatch(patch) => unsupported(); |
| 332 computeSignature(compiler) => unsupported(); | 334 computeSignature(compiler) => unsupported(); |
| 333 requiredParameterCount(compiler) => unsupported(); | 335 requiredParameterCount(compiler) => unsupported(); |
| 334 optionalParameterCount(compiler) => unsupported(); | 336 optionalParameterCount(compiler) => unsupported(); |
| 335 parameterCount(compiler) => unsupported(); | 337 parameterCount(compiler) => unsupported(); |
| 336 | 338 |
| 337 // TODO(kasperl): These seem unnecessary. | 339 // TODO(kasperl): These seem unnecessary. |
| 338 set patch(value) => unsupported(); | 340 set patch(value) => unsupported(); |
| 339 set origin(value) => unsupported(); | 341 set origin(value) => unsupported(); |
| 340 set defaultImplementation(value) => unsupported(); | 342 set defaultImplementation(value) => unsupported(); |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1516 String toString() { | 1518 String toString() { |
| 1517 if (isPatch) { | 1519 if (isPatch) { |
| 1518 return 'patch ${super.toString()}'; | 1520 return 'patch ${super.toString()}'; |
| 1519 } else if (isPatched) { | 1521 } else if (isPatched) { |
| 1520 return 'origin ${super.toString()}'; | 1522 return 'origin ${super.toString()}'; |
| 1521 } else { | 1523 } else { |
| 1522 return super.toString(); | 1524 return super.toString(); |
| 1523 } | 1525 } |
| 1524 } | 1526 } |
| 1525 | 1527 |
| 1528 bool _isAbstract = false; | |
| 1529 void setAbstract() { _isAbstract = true; } | |
| 1530 | |
| 1526 bool isAbstract(Compiler compiler) { | 1531 bool isAbstract(Compiler compiler) { |
| 1532 if (_isAbstract) return true; | |
| 1527 if (super.isAbstract(compiler)) return true; | 1533 if (super.isAbstract(compiler)) return true; |
| 1528 if (modifiers.isExternal()) return false; | 1534 if (modifiers.isExternal()) return false; |
|
karlklose
2013/11/06 09:11:28
You can remove this check now.
lukas
2013/11/06 11:36:08
Done.
| |
| 1529 if (isFunction() || isAccessor()) { | |
| 1530 return compiler.withCurrentElement(this, | |
| 1531 () => !parseNode(compiler).hasBody()); | |
| 1532 } | |
| 1533 return false; | 1535 return false; |
| 1534 } | 1536 } |
| 1535 } | 1537 } |
| 1536 | 1538 |
| 1537 class ConstructorBodyElementX extends FunctionElementX | 1539 class ConstructorBodyElementX extends FunctionElementX |
| 1538 implements ConstructorBodyElement { | 1540 implements ConstructorBodyElement { |
| 1539 FunctionElement constructor; | 1541 FunctionElement constructor; |
| 1540 | 1542 |
| 1541 ConstructorBodyElementX(FunctionElement constructor) | 1543 ConstructorBodyElementX(FunctionElement constructor) |
| 1542 : this.constructor = constructor, | 1544 : this.constructor = constructor, |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2363 | 2365 |
| 2364 MetadataAnnotation ensureResolved(Compiler compiler) { | 2366 MetadataAnnotation ensureResolved(Compiler compiler) { |
| 2365 if (resolutionState == STATE_NOT_STARTED) { | 2367 if (resolutionState == STATE_NOT_STARTED) { |
| 2366 compiler.resolver.resolveMetadataAnnotation(this); | 2368 compiler.resolver.resolveMetadataAnnotation(this); |
| 2367 } | 2369 } |
| 2368 return this; | 2370 return this; |
| 2369 } | 2371 } |
| 2370 | 2372 |
| 2371 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2373 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
| 2372 } | 2374 } |
| OLD | NEW |