| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // TODO(johnniwinther): Temporarily copied from analyzer2dart. Merge when | 5 // TODO(johnniwinther): Temporarily copied from analyzer2dart. Merge when |
| 6 // we shared code with the analyzer and this semantic visitor is complete. | 6 // we shared code with the analyzer and this semantic visitor is complete. |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Code for classifying the semantics of identifiers appearing in a Dart file. | 9 * Code for classifying the semantics of identifiers appearing in a Dart file. |
| 10 */ | 10 */ |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 /// Read from a superclass field and write to a superclass setter. | 175 /// Read from a superclass field and write to a superclass setter. |
| 176 SUPER_FIELD_SETTER, | 176 SUPER_FIELD_SETTER, |
| 177 /// Read from a superclass getter and write to a superclass setter. | 177 /// Read from a superclass getter and write to a superclass setter. |
| 178 SUPER_GETTER_SETTER, | 178 SUPER_GETTER_SETTER, |
| 179 /// Read from a superclass method (closurize) and write to a superclass | 179 /// Read from a superclass method (closurize) and write to a superclass |
| 180 /// setter. | 180 /// setter. |
| 181 SUPER_METHOD_SETTER, | 181 SUPER_METHOD_SETTER, |
| 182 /// Read from a superclass getter and write to a superclass field. | 182 /// Read from a superclass getter and write to a superclass field. |
| 183 SUPER_GETTER_FIELD, | 183 SUPER_GETTER_FIELD, |
| 184 | 184 |
| 185 /// Read from a superclass where the getter (and maybe setter) is unresolved. | 185 /// Read from a superclass where the getter is unresolved. |
| 186 UNRESOLVED_SUPER_GETTER, | 186 UNRESOLVED_SUPER_GETTER, |
| 187 /// Read from a superclass getter and write to an unresolved setter. | 187 /// Read from a superclass getter and write to an unresolved setter. |
| 188 UNRESOLVED_SUPER_SETTER, | 188 UNRESOLVED_SUPER_SETTER, |
| 189 } | 189 } |
| 190 | 190 |
| 191 /** | 191 /** |
| 192 * Data structure used to classify the semantics of a property access or method | 192 * Data structure used to classify the semantics of a property access or method |
| 193 * or function invocation. | 193 * or function invocation. |
| 194 */ | 194 */ |
| 195 class AccessSemantics { | 195 class AccessSemantics { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 224 /** | 224 /** |
| 225 * When [kind] is DYNAMIC_PROPERTY, the expression whose runtime type | 225 * When [kind] is DYNAMIC_PROPERTY, the expression whose runtime type |
| 226 * determines the class in which [identifier] should be looked up. | 226 * determines the class in which [identifier] should be looked up. |
| 227 * | 227 * |
| 228 * When [kind] is not DYNAMIC_PROPERTY, this field is always null. | 228 * When [kind] is not DYNAMIC_PROPERTY, this field is always null. |
| 229 */ | 229 */ |
| 230 /*Expression*/ get target => null; | 230 /*Expression*/ get target => null; |
| 231 | 231 |
| 232 ConstantExpression get constant => null; | 232 ConstantExpression get constant => null; |
| 233 | 233 |
| 234 /// The element for the getter in case of a compound access, |
| 235 /// [element] otherwise. |
| 236 Element get getter => element; |
| 237 |
| 238 /// The element for the setter in case of a compound access, |
| 239 /// [element] otherwise. |
| 240 Element get setter => element; |
| 241 |
| 234 AccessSemantics.expression() | 242 AccessSemantics.expression() |
| 235 : kind = AccessKind.EXPRESSION; | 243 : kind = AccessKind.EXPRESSION; |
| 236 | 244 |
| 237 AccessSemantics.thisAccess() | 245 AccessSemantics.thisAccess() |
| 238 : kind = AccessKind.THIS; | 246 : kind = AccessKind.THIS; |
| 239 | 247 |
| 240 AccessSemantics.thisProperty() | 248 AccessSemantics.thisProperty() |
| 241 : kind = AccessKind.THIS_PROPERTY; | 249 : kind = AccessKind.THIS_PROPERTY; |
| 242 | 250 |
| 243 AccessSemantics._(this.kind); | 251 AccessSemantics._(this.kind); |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 | 547 |
| 540 RedirectingFactoryConstructorAccessSemantics( | 548 RedirectingFactoryConstructorAccessSemantics( |
| 541 ConstructorAccessKind kind, | 549 ConstructorAccessKind kind, |
| 542 Element element, | 550 Element element, |
| 543 DartType type, | 551 DartType type, |
| 544 this.effectiveTargetSemantics) | 552 this.effectiveTargetSemantics) |
| 545 : super(kind, element, type); | 553 : super(kind, element, type); |
| 546 } | 554 } |
| 547 | 555 |
| 548 | 556 |
| OLD | NEW |