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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
7 | 7 |
8 library engine; | 8 library engine; |
9 | 9 |
10 import "dart:math" as math; | 10 import "dart:math" as math; |
(...skipping 8646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8657 _resolutionState._writeOn(buffer); | 8657 _resolutionState._writeOn(buffer); |
8658 } | 8658 } |
8659 } | 8659 } |
8660 | 8660 |
8661 /** | 8661 /** |
8662 * Instances of the class `DataDescriptor` are immutable constants representing
data that can | 8662 * Instances of the class `DataDescriptor` are immutable constants representing
data that can |
8663 * be stored in the cache. | 8663 * be stored in the cache. |
8664 */ | 8664 */ |
8665 class DataDescriptor<E> { | 8665 class DataDescriptor<E> { |
8666 /** | 8666 /** |
| 8667 * The next artificial hash code. |
| 8668 */ |
| 8669 static int _NEXT_HASH_CODE = 0; |
| 8670 |
| 8671 /** |
| 8672 * The artifitial hash code for this object. |
| 8673 */ |
| 8674 final int _hashCode = _NEXT_HASH_CODE++; |
| 8675 |
| 8676 /** |
8667 * The name of the descriptor, used for debugging purposes. | 8677 * The name of the descriptor, used for debugging purposes. |
8668 */ | 8678 */ |
8669 final String _name; | 8679 final String _name; |
8670 | 8680 |
8671 /** | 8681 /** |
8672 * The default value used when the data does not exist. | 8682 * The default value used when the data does not exist. |
8673 */ | 8683 */ |
8674 final E defaultValue; | 8684 final E defaultValue; |
8675 | 8685 |
8676 /** | 8686 /** |
8677 * Initialize a newly created descriptor to have the given [name] and | 8687 * Initialize a newly created descriptor to have the given [name] and |
8678 * [defaultValue]. | 8688 * [defaultValue]. |
8679 */ | 8689 */ |
8680 DataDescriptor(this._name, [this.defaultValue = null]); | 8690 DataDescriptor(this._name, [this.defaultValue = null]); |
8681 | 8691 |
8682 @override | 8692 @override |
| 8693 int get hashCode => _hashCode; |
| 8694 |
| 8695 @override |
8683 String toString() => _name; | 8696 String toString() => _name; |
8684 } | 8697 } |
8685 | 8698 |
8686 /** | 8699 /** |
8687 * Instances of the class `DefaultRetentionPolicy` implement a retention policy
that will keep | 8700 * Instances of the class `DefaultRetentionPolicy` implement a retention policy
that will keep |
8688 * AST's in the cache if there is analysis information that needs to be computed
for a source, where | 8701 * AST's in the cache if there is analysis information that needs to be computed
for a source, where |
8689 * the computation is dependent on having the AST. | 8702 * the computation is dependent on having the AST. |
8690 */ | 8703 */ |
8691 class DefaultRetentionPolicy implements CacheRetentionPolicy { | 8704 class DefaultRetentionPolicy implements CacheRetentionPolicy { |
8692 /** | 8705 /** |
(...skipping 3711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12404 if (element.id == _id) { | 12417 if (element.id == _id) { |
12405 result = element; | 12418 result = element; |
12406 throw new _ElementByIdFinderException(); | 12419 throw new _ElementByIdFinderException(); |
12407 } | 12420 } |
12408 super.visitElement(element); | 12421 super.visitElement(element); |
12409 } | 12422 } |
12410 } | 12423 } |
12411 | 12424 |
12412 class _ElementByIdFinderException { | 12425 class _ElementByIdFinderException { |
12413 } | 12426 } |
OLD | NEW |