@@ -3040,33 +3040,11 @@ abstract class ExecutableElementImpl extends _ExistingElementImpl
30403040   ExecutableElementImpl (String  name, int  offset, {Reference ?  reference})
30413041      :  super (name, offset, reference:  reference);
30423042
3043-   /// Initialize using the given linked node. 
3044-    ExecutableElementImpl .forLinkedNode (
3045-       ElementImpl  enclosing, Reference  reference, AstNode ?  linkedNode)
3046-       :  super .forLinkedNode (enclosing, reference, linkedNode) {
3047-     if  (linkedNode is  MethodDeclarationImpl ) {
3048-       linkedNode.name.staticElement =  this ;
3049-     } else  if  (linkedNode is  FunctionDeclarationImpl ) {
3050-       linkedNode.name.staticElement =  this ;
3051-     }
3052-   }
3053- 
3054-   @override 
3055-   String  get  displayName {
3056-     if  (linkedNode !=  null ) {
3057-       return  reference! .name;
3058-     }
3059-     return  super .displayName;
3060-   }
3061- 
30623043  @override 
30633044  Element  get  enclosingElement =>  super .enclosingElement! ;
30643045
30653046  @override 
30663047  bool  get  hasImplicitReturnType {
3067-     if  (linkedNode !=  null ) {
3068-       return  linkedContext! .hasImplicitReturnType (linkedNode! );
3069-     }
30703048    return  hasModifier (Modifier .IMPLICIT_TYPE );
30713049  }
30723050
@@ -3077,18 +3055,11 @@ abstract class ExecutableElementImpl extends _ExistingElementImpl
30773055
30783056  @override 
30793057  bool  get  isAbstract {
3080-     if  (linkedNode !=  null ) {
3081-       return  ! isExternal && 
3082-           enclosingUnit.linkedContext! .isAbstract (linkedNode! );
3083-     }
30843058    return  hasModifier (Modifier .ABSTRACT );
30853059  }
30863060
30873061  @override 
30883062  bool  get  isAsynchronous {
3089-     if  (linkedNode !=  null ) {
3090-       return  enclosingUnit.linkedContext! .isAsynchronous (linkedNode! );
3091-     }
30923063    return  hasModifier (Modifier .ASYNCHRONOUS );
30933064  }
30943065
@@ -3099,9 +3070,6 @@ abstract class ExecutableElementImpl extends _ExistingElementImpl
30993070
31003071  @override 
31013072  bool  get  isExternal {
3102-     if  (linkedNode !=  null ) {
3103-       return  enclosingUnit.linkedContext! .isExternal (linkedNode! );
3104-     }
31053073    return  hasModifier (Modifier .EXTERNAL );
31063074  }
31073075
@@ -3112,9 +3080,6 @@ abstract class ExecutableElementImpl extends _ExistingElementImpl
31123080
31133081  @override 
31143082  bool  get  isGenerator {
3115-     if  (linkedNode !=  null ) {
3116-       return  enclosingUnit.linkedContext! .isGenerator (linkedNode! );
3117-     }
31183083    return  hasModifier (Modifier .GENERATOR );
31193084  }
31203085
@@ -3137,21 +3102,9 @@ abstract class ExecutableElementImpl extends _ExistingElementImpl
31373102
31383103  @override 
31393104  String  get  name {
3140-     if  (linkedNode !=  null ) {
3141-       return  reference! .name;
3142-     }
31433105    return  super .name! ;
31443106  }
31453107
3146-   @override 
3147-   int  get  nameOffset {
3148-     if  (linkedNode !=  null ) {
3149-       return  enclosingUnit.linkedContext! .getNameOffset (linkedNode! );
3150-     }
3151- 
3152-     return  super .nameOffset;
3153-   }
3154- 
31553108  @override 
31563109  List <ParameterElement > get  parameters => 
31573110      ElementTypeProvider .current.getExecutableParameters (this );
@@ -3175,22 +3128,6 @@ abstract class ExecutableElementImpl extends _ExistingElementImpl
31753128  /// In most cases, the [parameters]  getter should be used instead. 
31763129   List <ParameterElement > get  parametersInternal {
31773130    linkedData? .read (this );
3178-     if  (! identical (_parameters, _Sentinel .parameterElement)) {
3179-       return  _parameters;
3180-     }
3181- 
3182-     if  (linkedNode !=  null ) {
3183-       var  context =  enclosingUnit.linkedContext! ;
3184-       var  containerRef =  reference! .getChild ('@parameter' );
3185-       var  formalParameters =  context.getFormalParameters (linkedNode! );
3186-       _parameters =  ParameterElementImpl .forLinkedNodeList (
3187-         this ,
3188-         context,
3189-         containerRef,
3190-         formalParameters,
3191-       );
3192-     }
3193- 
31943131    return  _parameters;
31953132  }
31963133
@@ -5133,58 +5070,17 @@ abstract class NonParameterVariableElementImpl extends VariableElementImpl
51335070   NonParameterVariableElementImpl (String  name, int  offset)
51345071      :  super (name, offset);
51355072
5136-   NonParameterVariableElementImpl .forLinkedNode (
5137-       ElementImpl  enclosing, Reference  reference, AstNode  linkedNode)
5138-       :  super .forLinkedNode (enclosing, reference, linkedNode);
5139- 
51405073  @override 
51415074  Element  get  enclosingElement =>  super .enclosingElement! ;
51425075
5143-   @override 
5144-   bool  get  hasImplicitType {
5145-     if  (linkedNode !=  null ) {
5146-       return  linkedContext! .hasImplicitType (linkedNode! );
5147-     }
5148-     return  super .hasImplicitType;
5149-   }
5150- 
51515076  bool  get  hasInitializer {
5152-     if  (linkedNode !=  null ) {
5153-       return  linkedContext! 
5154-           .hasInitializer (linkedNode as  VariableDeclarationImpl );
5155-     }
51565077    return  hasModifier (Modifier .HAS_INITIALIZER );
51575078  }
51585079
51595080  /// Set whether this variable has an initializer. 
51605081   set  hasInitializer (bool  hasInitializer) {
51615082    setModifier (Modifier .HAS_INITIALIZER , hasInitializer);
51625083  }
5163- 
5164-   @override 
5165-   String  get  name {
5166-     if  (linkedNode !=  null ) {
5167-       return  reference! .name;
5168-     }
5169-     return  super .name;
5170-   }
5171- 
5172-   @override 
5173-   int  get  nameOffset {
5174-     if  (linkedNode !=  null ) {
5175-       return  enclosingUnit.linkedContext! .getNameOffset (linkedNode! );
5176-     }
5177- 
5178-     return  super .nameOffset;
5179-   }
5180- 
5181-   @override 
5182-   DartType  get  type =>  ElementTypeProvider .current.getVariableType (this );
5183- 
5184-   @override 
5185-   set  type (DartType  type) {
5186-     _type =  type;
5187-   }
51885084}
51895085
51905086/// A concrete implementation of a [ParameterElement] . 
@@ -5910,10 +5806,6 @@ abstract class PropertyInducingElementImpl
59105806  /// [offset] . 
59115807   PropertyInducingElementImpl (String  name, int  offset) :  super (name, offset);
59125808
5913-   PropertyInducingElementImpl .forLinkedNode (
5914-       ElementImpl  enclosing, Reference  reference, AstNode  linkedNode)
5915-       :  super .forLinkedNode (enclosing, reference, linkedNode);
5916- 
59175809  bool  get  hasTypeInferred =>  hasModifier (Modifier .HAS_TYPE_INFERRED );
59185810
59195811  set  hasTypeInferred (bool  value) {
@@ -5925,9 +5817,6 @@ abstract class PropertyInducingElementImpl
59255817
59265818  @override 
59275819  bool  get  isLate {
5928-     if  (linkedNode !=  null ) {
5929-       return  enclosingUnit.linkedContext! .isLate (linkedNode! );
5930-     }
59315820    return  hasModifier (Modifier .LATE );
59325821  }
59335822
@@ -5939,19 +5828,6 @@ abstract class PropertyInducingElementImpl
59395828    linkedData? .read (this );
59405829    if  (_type !=  null ) return  _type! ;
59415830
5942-     if  (linkedNode !=  null ) {
5943-       // While performing inference during linking, the first step is to collect 
5944-       // dependencies. During this step we resolve the expression, but we might 
5945-       // reference elements that don't have their types inferred yet. So, here 
5946-       // we give some type. A better solution would be to infer recursively, but 
5947-       // we are not doing this yet. 
5948-       if  (_type ==  null ) {
5949-         assert (linkedContext! .isLinking);
5950-         return  DynamicTypeImpl .instance;
5951-       }
5952- 
5953-       return  _type! ;
5954-     }
59555831    if  (isSynthetic &&  _type ==  null ) {
59565832      if  (getter !=  null ) {
59575833        _type =  getter! .returnType;
0 commit comments