| 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('dart:uri'); | 7 #import('dart:uri'); |
| 8 | 8 |
| 9 #import('../tree/tree.dart'); | 9 #import('../tree/tree.dart'); |
| 10 #import('../scanner/scannerlib.dart'); | 10 #import('../scanner/scannerlib.dart'); |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 void setPatch(FunctionElement patchElement) { | 829 void setPatch(FunctionElement patchElement) { |
| 830 // Sanity checks. The caller must check these things before calling. | 830 // Sanity checks. The caller must check these things before calling. |
| 831 assert(patch === null); | 831 assert(patch === null); |
| 832 assert(cachedNode === null); | 832 assert(cachedNode === null); |
| 833 this.patch = patchElement; | 833 this.patch = patchElement; |
| 834 cachedNode = patchElement.cachedNode; | 834 cachedNode = patchElement.cachedNode; |
| 835 } | 835 } |
| 836 | 836 |
| 837 bool isInstanceMember() { | 837 bool isInstanceMember() { |
| 838 return isMember() | 838 return isMember() |
| 839 && kind != ElementKind.GENERATIVE_CONSTRUCTOR | 839 && !isConstructor() |
| 840 && !modifiers.isFactory() | |
| 841 && !modifiers.isStatic(); | 840 && !modifiers.isStatic(); |
| 842 } | 841 } |
| 843 | 842 |
| 844 FunctionSignature computeSignature(Compiler compiler) { | 843 FunctionSignature computeSignature(Compiler compiler) { |
| 845 if (functionSignature !== null) return functionSignature; | 844 if (functionSignature !== null) return functionSignature; |
| 846 compiler.withCurrentElement(this, () { | 845 compiler.withCurrentElement(this, () { |
| 847 functionSignature = compiler.resolveSignature(this); | 846 functionSignature = compiler.resolveSignature(this); |
| 848 }); | 847 }); |
| 849 return functionSignature; | 848 return functionSignature; |
| 850 } | 849 } |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 Node parseNode(compiler) => cachedNode; | 1478 Node parseNode(compiler) => cachedNode; |
| 1480 | 1479 |
| 1481 String toString() => "${enclosingElement.toString()}.${name.slowToString()}"; | 1480 String toString() => "${enclosingElement.toString()}.${name.slowToString()}"; |
| 1482 | 1481 |
| 1483 TypeVariableElement cloneTo(Element enclosing, DiagnosticListener listener) { | 1482 TypeVariableElement cloneTo(Element enclosing, DiagnosticListener listener) { |
| 1484 TypeVariableElement result = | 1483 TypeVariableElement result = |
| 1485 new TypeVariableElement(name, enclosing, node, type, bound); | 1484 new TypeVariableElement(name, enclosing, node, type, bound); |
| 1486 return result; | 1485 return result; |
| 1487 } | 1486 } |
| 1488 } | 1487 } |
| OLD | NEW |