| 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 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 _hasNoBody; | 1857 _hasNoBody; |
| 1858 } | 1858 } |
| 1859 | 1859 |
| 1860 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); | 1860 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); |
| 1861 | 1861 |
| 1862 // A function is defined by the implementation element. | 1862 // A function is defined by the implementation element. |
| 1863 AstElement get definingElement => implementation; | 1863 AstElement get definingElement => implementation; |
| 1864 } | 1864 } |
| 1865 | 1865 |
| 1866 abstract class FunctionElementX extends BaseFunctionElementX | 1866 abstract class FunctionElementX extends BaseFunctionElementX |
| 1867 with AnalyzableElementX implements MemberElement { | 1867 with AnalyzableElementX implements MethodElement { |
| 1868 FunctionElementX(String name, | 1868 FunctionElementX(String name, |
| 1869 ElementKind kind, | 1869 ElementKind kind, |
| 1870 Modifiers modifiers, | 1870 Modifiers modifiers, |
| 1871 Element enclosing, | 1871 Element enclosing, |
| 1872 bool hasNoBody) | 1872 bool hasNoBody) |
| 1873 : super(name, kind, modifiers, enclosing, hasNoBody); | 1873 : super(name, kind, modifiers, enclosing, hasNoBody); |
| 1874 | 1874 |
| 1875 MemberElement get memberContext => this; | 1875 MemberElement get memberContext => this; |
| 1876 | 1876 |
| 1877 void reuseElement() { | 1877 void reuseElement() { |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2928 DartType get bound { | 2928 DartType get bound { |
| 2929 assert(invariant(this, boundCache != null, | 2929 assert(invariant(this, boundCache != null, |
| 2930 message: "Bound has not been set on $this.")); | 2930 message: "Bound has not been set on $this.")); |
| 2931 return boundCache; | 2931 return boundCache; |
| 2932 } | 2932 } |
| 2933 | 2933 |
| 2934 bool get hasNode => true; | 2934 bool get hasNode => true; |
| 2935 | 2935 |
| 2936 Node parseNode(compiler) => node; | 2936 Node parseNode(compiler) => node; |
| 2937 | 2937 |
| 2938 String toString() => "${enclosingElement.toString()}.${name}"; | |
| 2939 | |
| 2940 Token get position => node.getBeginToken(); | 2938 Token get position => node.getBeginToken(); |
| 2941 | 2939 |
| 2942 accept(ElementVisitor visitor) => visitor.visitTypeVariableElement(this); | 2940 accept(ElementVisitor visitor) => visitor.visitTypeVariableElement(this); |
| 2943 | 2941 |
| 2944 // A type variable cannot be patched therefore defines itself. | 2942 // A type variable cannot be patched therefore defines itself. |
| 2945 AstElement get definingElement => this; | 2943 AstElement get definingElement => this; |
| 2946 } | 2944 } |
| 2947 | 2945 |
| 2948 /** | 2946 /** |
| 2949 * A single metadata annotation. | 2947 * A single metadata annotation. |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3063 AstElement get definingElement; | 3061 AstElement get definingElement; |
| 3064 | 3062 |
| 3065 bool get hasResolvedAst => definingElement.hasTreeElements; | 3063 bool get hasResolvedAst => definingElement.hasTreeElements; |
| 3066 | 3064 |
| 3067 ResolvedAst get resolvedAst { | 3065 ResolvedAst get resolvedAst { |
| 3068 return new ResolvedAst(declaration, | 3066 return new ResolvedAst(declaration, |
| 3069 definingElement.node, definingElement.treeElements); | 3067 definingElement.node, definingElement.treeElements); |
| 3070 } | 3068 } |
| 3071 | 3069 |
| 3072 } | 3070 } |
| OLD | NEW |