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

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

Issue 2963183002: Don't serialize local variables. (Closed)
Patch Set: Fixes for review comments. Created 3 years, 6 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 | « no previous file | pkg/analyzer/lib/src/summary/format.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/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 2da9fd6d06c337ba892382898451c93bfc9067a1..b8851f9beb26ac3217bb3a116b6e70502c1454e1 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -3792,22 +3792,6 @@ abstract class ExecutableElementImpl extends ElementImpl
@override
List<LocalVariableElement> get localVariables {
Brian Wilkerson 2017/06/29 21:51:41 If this method is always going to return an empty
scheglov 2017/06/29 22:09:11 This is an interesting question. Now as I search t
- if (serializedExecutable != null && _localVariables == null) {
- List<UnlinkedVariable> unlinkedVariables =
- serializedExecutable.localVariables;
- int length = unlinkedVariables.length;
- if (length != 0) {
- List<LocalVariableElementImpl> localVariables =
- new List<LocalVariableElementImpl>(length);
- for (int i = 0; i < length; i++) {
- localVariables[i] = new LocalVariableElementImpl.forSerializedFactory(
- unlinkedVariables[i], this);
- }
- _localVariables = localVariables;
- } else {
- _localVariables = const <LocalVariableElement>[];
- }
- }
return _localVariables ?? const <LocalVariableElement>[];
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/format.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698