| Index: pkg/analyzer/lib/src/generated/element.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
|
| index a1fc144dbf098860bb539023d658610914e67a6a..937f1d042eb83fab3cc6c98553c89a54f7feba34 100644
|
| --- a/pkg/analyzer/lib/src/generated/element.dart
|
| +++ b/pkg/analyzer/lib/src/generated/element.dart
|
| @@ -3454,6 +3454,11 @@ abstract class ElementImpl implements Element {
|
| int _cachedHashCode = 0;
|
|
|
| /**
|
| + * A cached copy of the calculated location for this element.
|
| + */
|
| + ElementLocation _cachedLocation;
|
| +
|
| + /**
|
| * Initialize a newly created element to have the given name.
|
| *
|
| * @param name the name of this element
|
| @@ -3559,7 +3564,12 @@ abstract class ElementImpl implements Element {
|
| getAncestor((element) => element is LibraryElement);
|
|
|
| @override
|
| - ElementLocation get location => new ElementLocationImpl.con1(this);
|
| + ElementLocation get location {
|
| + if (_cachedLocation == null) {
|
| + _cachedLocation = new ElementLocationImpl.con1(this);
|
| + }
|
| + return _cachedLocation;
|
| + }
|
|
|
| @override
|
| String get name => _name;
|
| @@ -3949,6 +3959,21 @@ class ElementLocationImpl implements ElementLocation {
|
| List<String> _components;
|
|
|
| /**
|
| + * The object managing [indexKeyId] and [indexLocationId].
|
| + */
|
| + Object indexOwner;
|
| +
|
| + /**
|
| + * A cached id of this location in index.
|
| + */
|
| + int indexKeyId;
|
| +
|
| + /**
|
| + * A cached id of this location in index.
|
| + */
|
| + int indexLocationId;
|
| +
|
| + /**
|
| * Initialize a newly created location to represent the given element.
|
| *
|
| * @param element the element whose location is being represented
|
|
|