@@ -1206,8 +1206,7 @@ mixin ConstVariableFragment implements FragmentImpl, ConstantEvaluationTarget {
12061206 if (library == null ) {
12071207 throw StateError (
12081208 '[library: null][this: ($runtimeType ) $this ]'
1209- '[enclosingElement: $enclosingElement3 ]'
1210- '[reference: $reference ]' ,
1209+ '[enclosingElement: $enclosingElement3 ]' ,
12111210 );
12121211 }
12131212 computeConstants (
@@ -2445,7 +2444,7 @@ abstract class ExecutableFragmentImpl extends _ExistingFragmentImpl
24452444
24462445 /// Initialize a newly created executable element to have the given [name] and
24472446 /// [offset] .
2448- ExecutableFragmentImpl ({required super .nameOffset, super .reference });
2447+ ExecutableFragmentImpl ({required super .nameOffset});
24492448
24502449 @override
24512450 List <Fragment > get children3 => [...typeParameters, ...parameters];
@@ -2710,14 +2709,6 @@ class ExtensionFragmentImpl extends InstanceFragmentImpl
27102709 return element.extendedType;
27112710 }
27122711
2713- @override
2714- String get identifier {
2715- if (reference != null ) {
2716- return reference! .name;
2717- }
2718- return super .identifier;
2719- }
2720-
27212712 @override
27222713 bool get isPrivate {
27232714 var name = name2;
@@ -3868,8 +3859,6 @@ abstract class FragmentImpl implements FragmentOrMember {
38683859 /// is the defining unit of the library.
38693860 FragmentImpl ? enclosingElement3;
38703861
3871- Reference ? reference;
3872-
38733862 /// The offset of the name of this element in the file that contains the
38743863 /// declaration of this element.
38753864 int _nameOffset = 0 ;
@@ -3889,10 +3878,7 @@ abstract class FragmentImpl implements FragmentOrMember {
38893878
38903879 /// Initialize a newly created element to have the given [name] at the given
38913880 /// [_nameOffset] .
3892- FragmentImpl ({required int nameOffset, this .reference})
3893- : _nameOffset = nameOffset {
3894- reference? .element = this ;
3895- }
3881+ FragmentImpl ({required int nameOffset}) : _nameOffset = nameOffset;
38963882
38973883 /// The length of the element's code, or `null` if the element is synthetic.
38983884 int ? get codeLength => _codeLength;
@@ -4558,8 +4544,7 @@ class GetterFragmentImpl extends PropertyAccessorFragmentImpl
45584544
45594545 GetterFragmentImpl ({required super .name2, required super .nameOffset});
45604546
4561- GetterFragmentImpl .forVariable (super .variable, {super .reference})
4562- : super .forVariable ();
4547+ GetterFragmentImpl .forVariable (super .variable) : super .forVariable ();
45634548
45644549 @override
45654550 PropertyAccessorFragmentImpl ? get correspondingGetter => null ;
@@ -7054,14 +7039,10 @@ class LibraryImportImpl extends ElementDirectiveImpl implements LibraryImport {
70547039
70557040/// The provider for the lazily created `loadLibrary` function.
70567041final class LoadLibraryFunctionProvider {
7057- final Reference fragmentReference;
70587042 final Reference elementReference;
70597043 TopLevelFunctionElementImpl ? _element;
70607044
7061- LoadLibraryFunctionProvider ({
7062- required this .fragmentReference,
7063- required this .elementReference,
7064- });
7045+ LoadLibraryFunctionProvider ({required this .elementReference});
70657046
70667047 TopLevelFunctionElementImpl getElement (LibraryElementImpl library) {
70677048 return _element ?? = _create (library);
@@ -7076,9 +7057,6 @@ final class LoadLibraryFunctionProvider {
70767057 fragment.returnType = library.typeProvider.futureDynamicType;
70777058 fragment.enclosingElement3 = library.definingCompilationUnit;
70787059
7079- fragment.reference = fragmentReference;
7080- fragmentReference.element = fragment;
7081-
70827060 return TopLevelFunctionElementImpl (elementReference, fragment)
70837061 ..returnType = library.typeProvider.futureDynamicType;
70847062 }
@@ -8967,10 +8945,9 @@ sealed class PropertyAccessorFragmentImpl extends ExecutableFragmentImpl
89678945 /// Initialize a newly created synthetic property accessor element to be
89688946 /// associated with the given [variable] .
89698947 PropertyAccessorFragmentImpl .forVariable (
8970- PropertyInducingFragmentImpl variable, {
8971- super .reference,
8972- }) : name2 = variable.name2,
8973- super (nameOffset: - 1 ) {
8948+ PropertyInducingFragmentImpl variable,
8949+ ) : name2 = variable.name2,
8950+ super (nameOffset: - 1 ) {
89748951 isAbstract = variable is FieldFragmentImpl && variable.isAbstract;
89758952 isStatic = variable.isStatic;
89768953 isSynthetic = true ;
@@ -9057,12 +9034,8 @@ sealed class PropertyAccessorFragmentImpl extends ExecutableFragmentImpl
90579034/// Implicit getter for a [PropertyInducingFragmentImpl] .
90589035class PropertyAccessorFragmentImplImplicitGetter extends GetterFragmentImpl {
90599036 /// Create the implicit getter and bind it to the [property] .
9060- PropertyAccessorFragmentImplImplicitGetter (
9061- super .property, {
9062- Reference ? reference,
9063- }) : super .forVariable (reference: reference) {
9064- reference? .element = this ;
9065- }
9037+ PropertyAccessorFragmentImplImplicitGetter (super .property)
9038+ : super .forVariable ();
90669039
90679040 @override
90689041 FragmentImpl get enclosingElement3 {
@@ -9123,7 +9096,7 @@ class PropertyAccessorFragmentImplImplicitGetter extends GetterFragmentImpl {
91239096/// Implicit setter for a [PropertyInducingFragmentImpl] .
91249097class PropertyAccessorFragmentImplImplicitSetter extends SetterFragmentImpl {
91259098 /// Create the implicit setter and bind it to the [property] .
9126- PropertyAccessorFragmentImplImplicitSetter (super .property, { super .reference} )
9099+ PropertyAccessorFragmentImplImplicitSetter (super .property)
91279100 : super .forVariable ();
91289101
91299102 @override
@@ -9442,11 +9415,6 @@ abstract class PropertyInducingFragmentImpl
94429415 }
94439416 }
94449417 }
9445-
9446- void bindReference (Reference reference) {
9447- this .reference = reference;
9448- reference.element = this ;
9449- }
94509418}
94519419
94529420/// Common base class for all analyzer-internal classes that implement
@@ -9565,8 +9533,7 @@ class SetterFragmentImpl extends PropertyAccessorFragmentImpl
95659533
95669534 SetterFragmentImpl ({required super .name2, required super .nameOffset});
95679535
9568- SetterFragmentImpl .forVariable (super .variable, {super .reference})
9569- : super .forVariable ();
9536+ SetterFragmentImpl .forVariable (super .variable) : super .forVariable ();
95709537
95719538 @override
95729539 PropertyAccessorFragmentImpl ? get correspondingGetter => variable2? .getter;
@@ -10899,7 +10866,7 @@ mixin WrappedElementMixin implements ElementImpl {
1089910866
1090010867abstract class _ExistingFragmentImpl extends FragmentImpl
1090110868 with _HasLibraryMixin {
10902- _ExistingFragmentImpl ({required super .nameOffset, super .reference });
10869+ _ExistingFragmentImpl ({required super .nameOffset});
1090310870}
1090410871
1090510872/// An element that can be declared in multiple fragments.
0 commit comments