| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 throw 'unsupported operation on erroneous element'; | 326 throw 'unsupported operation on erroneous element'; |
| 327 } | 327 } |
| 328 | 328 |
| 329 Link<MetadataAnnotation> get metadata => unsupported(); | 329 Link<MetadataAnnotation> get metadata => unsupported(); |
| 330 get type => unsupported(); | 330 get type => unsupported(); |
| 331 get cachedNode => unsupported(); | 331 get cachedNode => unsupported(); |
| 332 get functionSignature => unsupported(); | 332 get functionSignature => unsupported(); |
| 333 get patch => null; | 333 get patch => null; |
| 334 get origin => this; | 334 get origin => this; |
| 335 get defaultImplementation => unsupported(); | 335 get defaultImplementation => unsupported(); |
| 336 get nestedClosures => unsupported(); |
| 336 | 337 |
| 337 bool get isRedirectingFactory => unsupported(); | 338 bool get isRedirectingFactory => unsupported(); |
| 338 | 339 |
| 339 setPatch(patch) => unsupported(); | 340 setPatch(patch) => unsupported(); |
| 340 computeSignature(compiler) => unsupported(); | 341 computeSignature(compiler) => unsupported(); |
| 341 requiredParameterCount(compiler) => unsupported(); | 342 requiredParameterCount(compiler) => unsupported(); |
| 342 optionalParameterCount(compiler) => unsupported(); | 343 optionalParameterCount(compiler) => unsupported(); |
| 343 parameterCount(compiler) => unsupported(); | 344 parameterCount(compiler) => unsupported(); |
| 344 | 345 |
| 345 // TODO(kasperl): These seem unnecessary. | 346 // TODO(kasperl): These seem unnecessary. |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 | 1114 |
| 1114 accept(ElementVisitor visitor) => visitor.visitTypedefElement(this); | 1115 accept(ElementVisitor visitor) => visitor.visitTypedefElement(this); |
| 1115 } | 1116 } |
| 1116 | 1117 |
| 1117 class VariableElementX extends ElementX implements VariableElement { | 1118 class VariableElementX extends ElementX implements VariableElement { |
| 1118 final VariableListElement variables; | 1119 final VariableListElement variables; |
| 1119 Expression cachedNode; // The send or the identifier in the variables list. | 1120 Expression cachedNode; // The send or the identifier in the variables list. |
| 1120 | 1121 |
| 1121 Modifiers get modifiers => variables.modifiers; | 1122 Modifiers get modifiers => variables.modifiers; |
| 1122 | 1123 |
| 1124 List<FunctionElement> nestedClosures = new List<FunctionElement>(); |
| 1125 |
| 1123 VariableElementX(String name, | 1126 VariableElementX(String name, |
| 1124 VariableListElement variables, | 1127 VariableListElement variables, |
| 1125 ElementKind kind, | 1128 ElementKind kind, |
| 1126 this.cachedNode) | 1129 this.cachedNode) |
| 1127 : this.variables = variables, | 1130 : this.variables = variables, |
| 1128 super(name, kind, variables.enclosingElement); | 1131 super(name, kind, variables.enclosingElement); |
| 1129 | 1132 |
| 1130 VariableElementX.synthetic(String name, | 1133 VariableElementX.synthetic(String name, |
| 1131 ElementKind kind, | 1134 ElementKind kind, |
| 1132 Element enclosing) : | 1135 Element enclosing) : |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1413 } | 1416 } |
| 1414 return true; | 1417 return true; |
| 1415 } | 1418 } |
| 1416 } | 1419 } |
| 1417 | 1420 |
| 1418 class FunctionElementX extends ElementX implements FunctionElement { | 1421 class FunctionElementX extends ElementX implements FunctionElement { |
| 1419 FunctionExpression cachedNode; | 1422 FunctionExpression cachedNode; |
| 1420 DartType type; | 1423 DartType type; |
| 1421 final Modifiers modifiers; | 1424 final Modifiers modifiers; |
| 1422 | 1425 |
| 1426 List<FunctionElement> nestedClosures = new List<FunctionElement>(); |
| 1427 |
| 1423 FunctionSignature functionSignature; | 1428 FunctionSignature functionSignature; |
| 1424 | 1429 |
| 1425 /** | 1430 /** |
| 1426 * A function declaration that should be parsed instead of the current one. | 1431 * A function declaration that should be parsed instead of the current one. |
| 1427 * The patch should be parsed as if it was in the current scope. Its | 1432 * The patch should be parsed as if it was in the current scope. Its |
| 1428 * signature must match this function's signature. | 1433 * signature must match this function's signature. |
| 1429 */ | 1434 */ |
| 1430 FunctionElement patch = null; | 1435 FunctionElement patch = null; |
| 1431 FunctionElement origin = null; | 1436 FunctionElement origin = null; |
| 1432 | 1437 |
| (...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2414 | 2419 |
| 2415 MetadataAnnotation ensureResolved(Compiler compiler) { | 2420 MetadataAnnotation ensureResolved(Compiler compiler) { |
| 2416 if (resolutionState == STATE_NOT_STARTED) { | 2421 if (resolutionState == STATE_NOT_STARTED) { |
| 2417 compiler.resolver.resolveMetadataAnnotation(this); | 2422 compiler.resolver.resolveMetadataAnnotation(this); |
| 2418 } | 2423 } |
| 2419 return this; | 2424 return this; |
| 2420 } | 2425 } |
| 2421 | 2426 |
| 2422 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2427 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
| 2423 } | 2428 } |
| OLD | NEW |