| 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 '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
| 9 import '../helpers/helpers.dart'; // Included for debug helpers. | 9 import '../helpers/helpers.dart'; // Included for debug helpers. |
| 10 import '../tree/tree.dart'; | 10 import '../tree/tree.dart'; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 Element get patch { | 111 Element get patch { |
| 112 throw new UnsupportedError('patch is not supported on $this'); | 112 throw new UnsupportedError('patch is not supported on $this'); |
| 113 } | 113 } |
| 114 | 114 |
| 115 Element get origin { | 115 Element get origin { |
| 116 throw new UnsupportedError('origin is not supported on $this'); | 116 throw new UnsupportedError('origin is not supported on $this'); |
| 117 } | 117 } |
| 118 | 118 |
| 119 bool get isSynthesized => false; | 119 bool get isSynthesized => false; |
| 120 | 120 |
| 121 bool get isForwardingConstructor => false; | |
| 122 | |
| 123 bool get isMixinApplication => false; | 121 bool get isMixinApplication => false; |
| 124 | 122 |
| 125 bool get isLocal => false; | 123 bool get isLocal => false; |
| 126 | 124 |
| 127 // TODO(johnniwinther): This breaks for libraries (for which enclosing | 125 // TODO(johnniwinther): This breaks for libraries (for which enclosing |
| 128 // elements are null) and is invalid for top level variable declarations for | 126 // elements are null) and is invalid for top level variable declarations for |
| 129 // which the enclosing element is a VariableDeclarations and not a compilation | 127 // which the enclosing element is a VariableDeclarations and not a compilation |
| 130 // unit. | 128 // unit. |
| 131 bool get isTopLevel { | 129 bool get isTopLevel { |
| 132 return enclosingElement != null && enclosingElement.isCompilationUnit; | 130 return enclosingElement != null && enclosingElement.isCompilationUnit; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 get resolvedAst => unsupported(); | 297 get resolvedAst => unsupported(); |
| 300 get type => unsupported(); | 298 get type => unsupported(); |
| 301 get cachedNode => unsupported(); | 299 get cachedNode => unsupported(); |
| 302 get functionSignature => unsupported(); | 300 get functionSignature => unsupported(); |
| 303 get patch => null; | 301 get patch => null; |
| 304 get origin => this; | 302 get origin => this; |
| 305 get immediateRedirectionTarget => unsupported(); | 303 get immediateRedirectionTarget => unsupported(); |
| 306 get nestedClosures => unsupported(); | 304 get nestedClosures => unsupported(); |
| 307 get memberContext => unsupported(); | 305 get memberContext => unsupported(); |
| 308 get executableContext => unsupported(); | 306 get executableContext => unsupported(); |
| 307 get isExternal => unsupported(); |
| 309 | 308 |
| 310 bool get isRedirectingFactory => unsupported(); | 309 bool get isRedirectingFactory => unsupported(); |
| 311 | 310 |
| 312 computeSignature(compiler) => unsupported(); | 311 computeSignature(compiler) => unsupported(); |
| 313 | 312 |
| 314 bool get hasFunctionSignature => false; | 313 bool get hasFunctionSignature => false; |
| 315 | 314 |
| 316 get effectiveTarget => this; | 315 get effectiveTarget => this; |
| 317 | 316 |
| 318 computeEffectiveTargetType(InterfaceType newType) => unsupported(); | 317 computeEffectiveTargetType(InterfaceType newType) => unsupported(); |
| (...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 BaseFunctionElementX(String name, | 1549 BaseFunctionElementX(String name, |
| 1551 ElementKind kind, | 1550 ElementKind kind, |
| 1552 Modifiers this.modifiers, | 1551 Modifiers this.modifiers, |
| 1553 Element enclosing, | 1552 Element enclosing, |
| 1554 bool hasNoBody) | 1553 bool hasNoBody) |
| 1555 : super(name, kind, enclosing), | 1554 : super(name, kind, enclosing), |
| 1556 _hasNoBody = hasNoBody { | 1555 _hasNoBody = hasNoBody { |
| 1557 assert(modifiers != null); | 1556 assert(modifiers != null); |
| 1558 } | 1557 } |
| 1559 | 1558 |
| 1559 bool get isExternal => modifiers.isExternal; |
| 1560 |
| 1560 bool get isInstanceMember { | 1561 bool get isInstanceMember { |
| 1561 return isClassMember | 1562 return isClassMember |
| 1562 && !isConstructor | 1563 && !isConstructor |
| 1563 && !isStatic; | 1564 && !isStatic; |
| 1564 } | 1565 } |
| 1565 | 1566 |
| 1566 bool get hasFunctionSignature => functionSignatureCache != null; | 1567 bool get hasFunctionSignature => functionSignatureCache != null; |
| 1567 | 1568 |
| 1568 FunctionSignature computeSignature(Compiler compiler) { | 1569 FunctionSignature computeSignature(Compiler compiler) { |
| 1569 if (functionSignatureCache != null) return functionSignatureCache; | 1570 if (functionSignatureCache != null) return functionSignatureCache; |
| (...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2817 AstElement get definingElement; | 2818 AstElement get definingElement; |
| 2818 | 2819 |
| 2819 bool get hasResolvedAst => definingElement.hasTreeElements; | 2820 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 2820 | 2821 |
| 2821 ResolvedAst get resolvedAst { | 2822 ResolvedAst get resolvedAst { |
| 2822 return new ResolvedAst(declaration, | 2823 return new ResolvedAst(declaration, |
| 2823 definingElement.node, definingElement.treeElements); | 2824 definingElement.node, definingElement.treeElements); |
| 2824 } | 2825 } |
| 2825 | 2826 |
| 2826 } | 2827 } |
| OLD | NEW |