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

Side by Side Diff: pkg/analyzer/lib/src/task/dart.dart

Issue 1467363002: Skip local variable dependepcies. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library analyzer.src.task.dart; 5 library analyzer.src.task.dart;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/generated/ast.dart'; 10 import 'package:analyzer/src/generated/ast.dart';
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 // Record outputs. 2029 // Record outputs.
2030 // 2030 //
2031 outputs[PROPAGABLE_VARIABLE_DEPENDENCIES] = gatherer.results.toList(); 2031 outputs[PROPAGABLE_VARIABLE_DEPENDENCIES] = gatherer.results.toList();
2032 } 2032 }
2033 2033
2034 /** 2034 /**
2035 * Return `true` if the given [variable] is a variable whose type can be 2035 * Return `true` if the given [variable] is a variable whose type can be
2036 * propagated. 2036 * propagated.
2037 */ 2037 */
2038 bool _isPropagable(VariableElement variable) => 2038 bool _isPropagable(VariableElement variable) =>
2039 (variable.isConst || variable.isFinal) && 2039 variable is PropertyInducingElement &&
2040 (variable.isConst || variable.isFinal) &&
2040 variable.hasImplicitType && 2041 variable.hasImplicitType &&
2041 variable.initializer != null; 2042 variable.initializer != null;
2042 2043
2043 /** 2044 /**
2044 * Return a map from the names of the inputs of this kind of task to the task 2045 * Return a map from the names of the inputs of this kind of task to the task
2045 * input descriptors describing those inputs for a task with the 2046 * input descriptors describing those inputs for a task with the
2046 * given [target]. 2047 * given [target].
2047 */ 2048 */
2048 static Map<String, TaskInput> buildInputs(AnalysisTarget target) { 2049 static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
2049 if (target is VariableElement) { 2050 if (target is VariableElement) {
(...skipping 3036 matching lines...) Expand 10 before | Expand all | Expand 10 after
5086 5087
5087 @override 5088 @override
5088 bool moveNext() { 5089 bool moveNext() {
5089 if (_newSources.isEmpty) { 5090 if (_newSources.isEmpty) {
5090 return false; 5091 return false;
5091 } 5092 }
5092 currentTarget = _newSources.removeLast(); 5093 currentTarget = _newSources.removeLast();
5093 return true; 5094 return true;
5094 } 5095 }
5095 } 5096 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698