Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(882)

Unified Diff: pkg/analyzer/lib/src/dart/element/builder.dart

Issue 2966313002: Remove ExecutableElement.localVariables altogether. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/dart/element/element.dart ('k') | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/builder.dart
diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart
index a396d4d65df61aa313db7433095cf30a6fbaacc7..da1ee3b9870b9a1c91af232bfe6aecd61582e3ce 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -154,7 +154,7 @@ class ApiElementBuilder extends _BaseElementBuilder {
}
element.functions = holder.functions;
element.labels = holder.labels;
- element.localVariables = holder.localVariables;
+ element.encloseElements(holder.localVariables);
element.parameters = holder.parameters;
element.isConst = node.constKeyword != null;
element.isCycleFree = element.isConst;
@@ -248,7 +248,7 @@ class ApiElementBuilder extends _BaseElementBuilder {
}
element.functions = holder.functions;
element.labels = holder.labels;
- element.localVariables = holder.localVariables;
+ element.encloseElements(holder.localVariables);
element.parameters = holder.parameters;
element.typeParameters = holder.typeParameters;
if (body.isAsynchronous) {
@@ -289,7 +289,7 @@ class ApiElementBuilder extends _BaseElementBuilder {
}
getter.functions = holder.functions;
getter.labels = holder.labels;
- getter.localVariables = holder.localVariables;
+ getter.encloseElements(holder.localVariables);
if (body.isAsynchronous) {
getter.asynchronous = true;
}
@@ -317,7 +317,7 @@ class ApiElementBuilder extends _BaseElementBuilder {
}
setter.functions = holder.functions;
setter.labels = holder.labels;
- setter.localVariables = holder.localVariables;
+ setter.encloseElements(holder.localVariables);
setter.parameters = holder.parameters;
if (body.isAsynchronous) {
setter.asynchronous = true;
@@ -358,7 +358,7 @@ class ApiElementBuilder extends _BaseElementBuilder {
_setCodeRange(element, node);
element.functions = holder.functions;
element.labels = holder.labels;
- element.localVariables = holder.localVariables;
+ element.encloseElements(holder.localVariables);
element.parameters = holder.parameters;
element.typeParameters = holder.typeParameters;
if (body.isAsynchronous) {
@@ -460,7 +460,7 @@ class ApiElementBuilder extends _BaseElementBuilder {
}
element.functions = holder.functions;
element.labels = holder.labels;
- element.localVariables = holder.localVariables;
+ element.encloseElements(holder.localVariables);
element.parameters = holder.parameters;
element.isStatic = isStatic;
element.typeParameters = holder.typeParameters;
@@ -498,7 +498,7 @@ class ApiElementBuilder extends _BaseElementBuilder {
}
getter.functions = holder.functions;
getter.labels = holder.labels;
- getter.localVariables = holder.localVariables;
+ getter.encloseElements(holder.localVariables);
if (body.isAsynchronous) {
getter.asynchronous = true;
}
@@ -526,7 +526,7 @@ class ApiElementBuilder extends _BaseElementBuilder {
}
setter.functions = holder.functions;
setter.labels = holder.labels;
- setter.localVariables = holder.localVariables;
+ setter.encloseElements(holder.localVariables);
setter.parameters = holder.parameters;
if (body.isAsynchronous) {
setter.asynchronous = true;
@@ -1174,7 +1174,7 @@ class LocalElementBuilder extends _BaseElementBuilder {
}
element.functions = holder.functions;
element.labels = holder.labels;
- element.localVariables = holder.localVariables;
+ element.encloseElements(holder.localVariables);
element.parameters = holder.parameters;
element.typeParameters = holder.typeParameters;
@@ -1218,7 +1218,7 @@ class LocalElementBuilder extends _BaseElementBuilder {
_setCodeRange(element, node);
element.functions = holder.functions;
element.labels = holder.labels;
- element.localVariables = holder.localVariables;
+ element.encloseElements(holder.localVariables);
element.parameters = holder.parameters;
element.typeParameters = holder.typeParameters;
@@ -1341,7 +1341,7 @@ abstract class _BaseElementBuilder extends RecursiveAstVisitor<Object> {
initializer.hasImplicitReturnType = true;
initializer.functions = holder.functions;
initializer.labels = holder.labels;
- initializer.localVariables = holder.localVariables;
+ initializer.encloseElements(holder.localVariables);
initializer.parameters = holder.parameters;
initializer.isSynthetic = true;
initializer.type = new FunctionTypeImpl(initializer);
@@ -1365,7 +1365,7 @@ abstract class _BaseElementBuilder extends RecursiveAstVisitor<Object> {
initializerElement.hasImplicitReturnType = true;
initializerElement.functions = holder.functions;
initializerElement.labels = holder.labels;
- initializerElement.localVariables = holder.localVariables;
+ initializerElement.encloseElements(holder.localVariables);
initializerElement.isSynthetic = true;
initializerElement.type = new FunctionTypeImpl(initializerElement);
variable.initializer = initializerElement;
« no previous file with comments | « pkg/analyzer/lib/dart/element/element.dart ('k') | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698