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 '../ir/ir.dart' show IFunction; | |
| 10 import '../util/util.dart'; | 11 import '../util/util.dart'; |
| 11 import '../resolution/resolution.dart'; | 12 import '../resolution/resolution.dart'; |
| 12 | 13 |
| 13 import '../dart2jslib.dart' show invariant, | 14 import '../dart2jslib.dart' show invariant, |
| 14 InterfaceType, | 15 InterfaceType, |
| 15 DartType, | 16 DartType, |
| 16 TypeVariableType, | 17 TypeVariableType, |
| 17 TypedefType, | 18 TypedefType, |
| 18 DualKind, | 19 DualKind, |
| 19 MessageKind, | 20 MessageKind, |
| (...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1520 return 'origin ${super.toString()}'; | 1521 return 'origin ${super.toString()}'; |
| 1521 } else { | 1522 } else { |
| 1522 return super.toString(); | 1523 return super.toString(); |
| 1523 } | 1524 } |
| 1524 } | 1525 } |
| 1525 | 1526 |
| 1526 bool isAbstract(Compiler compiler) { | 1527 bool isAbstract(Compiler compiler) { |
| 1527 if (super.isAbstract(compiler)) return true; | 1528 if (super.isAbstract(compiler)) return true; |
| 1528 if (modifiers.isExternal()) return false; | 1529 if (modifiers.isExternal()) return false; |
| 1529 if (isFunction() || isAccessor()) { | 1530 if (isFunction() || isAccessor()) { |
| 1531 if (compiler.irBuilder.iNodes.containsKey(this)) { | |
|
kasperl
2013/11/06 08:30:04
How bad would it be to refer to the IR nodes direc
lukas
2013/11/06 11:36:08
Done.
| |
| 1532 return !(compiler.irBuilder.iNodes[this] as IFunction).hasBody(); | |
| 1533 } | |
| 1530 return compiler.withCurrentElement(this, | 1534 return compiler.withCurrentElement(this, |
| 1531 () => !parseNode(compiler).hasBody()); | 1535 () => !parseNode(compiler).hasBody()); |
|
ngeoffray
2013/11/05 12:58:35
We should make sure we don't do this.
lukas
2013/11/06 11:36:08
Done.
| |
| 1532 } | 1536 } |
| 1533 return false; | 1537 return false; |
| 1534 } | 1538 } |
| 1535 } | 1539 } |
| 1536 | 1540 |
| 1537 class ConstructorBodyElementX extends FunctionElementX | 1541 class ConstructorBodyElementX extends FunctionElementX |
| 1538 implements ConstructorBodyElement { | 1542 implements ConstructorBodyElement { |
| 1539 FunctionElement constructor; | 1543 FunctionElement constructor; |
| 1540 | 1544 |
| 1541 ConstructorBodyElementX(FunctionElement constructor) | 1545 ConstructorBodyElementX(FunctionElement constructor) |
| (...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2363 | 2367 |
| 2364 MetadataAnnotation ensureResolved(Compiler compiler) { | 2368 MetadataAnnotation ensureResolved(Compiler compiler) { |
| 2365 if (resolutionState == STATE_NOT_STARTED) { | 2369 if (resolutionState == STATE_NOT_STARTED) { |
| 2366 compiler.resolver.resolveMetadataAnnotation(this); | 2370 compiler.resolver.resolveMetadataAnnotation(this); |
| 2367 } | 2371 } |
| 2368 return this; | 2372 return this; |
| 2369 } | 2373 } |
| 2370 | 2374 |
| 2371 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2375 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
| 2372 } | 2376 } |
| OLD | NEW |