OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 analyzer.src.dart.element.element; | 5 library analyzer.src.dart.element.element; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:math' show min; | 8 import 'dart:math' show min; |
9 | 9 |
10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 // Create or update the implicit field. | 1229 // Create or update the implicit field. |
1230 String fieldName = accessor.displayName; | 1230 String fieldName = accessor.displayName; |
1231 FieldElementImpl field = implicitFields[fieldName]; | 1231 FieldElementImpl field = implicitFields[fieldName]; |
1232 if (field == null) { | 1232 if (field == null) { |
1233 field = new FieldElementImpl(fieldName, -1); | 1233 field = new FieldElementImpl(fieldName, -1); |
1234 implicitFields[fieldName] = field; | 1234 implicitFields[fieldName] = field; |
1235 field.enclosingElement = this; | 1235 field.enclosingElement = this; |
1236 field.synthetic = true; | 1236 field.synthetic = true; |
1237 field.final2 = e.kind == UnlinkedExecutableKind.getter; | 1237 field.final2 = e.kind == UnlinkedExecutableKind.getter; |
1238 field.type = fieldType; | 1238 field.type = fieldType; |
| 1239 field.static = e.isStatic; |
1239 } else { | 1240 } else { |
1240 field.final2 = false; | 1241 field.final2 = false; |
1241 } | 1242 } |
1242 accessor.variable = field; | 1243 accessor.variable = field; |
1243 if (e.kind == UnlinkedExecutableKind.getter) { | 1244 if (e.kind == UnlinkedExecutableKind.getter) { |
1244 field.getter = accessor; | 1245 field.getter = accessor; |
1245 } else { | 1246 } else { |
1246 field.setter = accessor; | 1247 field.setter = accessor; |
1247 } | 1248 } |
1248 } | 1249 } |
(...skipping 7203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8452 | 8453 |
8453 @override | 8454 @override |
8454 void visitElement(Element element) { | 8455 void visitElement(Element element) { |
8455 int offset = element.nameOffset; | 8456 int offset = element.nameOffset; |
8456 if (offset != -1) { | 8457 if (offset != -1) { |
8457 map[offset] = element; | 8458 map[offset] = element; |
8458 } | 8459 } |
8459 super.visitElement(element); | 8460 super.visitElement(element); |
8460 } | 8461 } |
8461 } | 8462 } |
OLD | NEW |