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

Side by Side Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2453913002: Analyze requested files. (Closed)
Patch Set: Created 4 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 | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 // Verify all changed files one at a time. 222 // Verify all changed files one at a time.
223 if (_changedFiles.isNotEmpty) { 223 if (_changedFiles.isNotEmpty) {
224 String path = _removeFirst(_changedFiles); 224 String path = _removeFirst(_changedFiles);
225 _verifyApiSignatureOfChangedFile(path); 225 _verifyApiSignatureOfChangedFile(path);
226 // Repeat the processing loop. 226 // Repeat the processing loop.
227 _hasWork.notify(); 227 _hasWork.notify();
228 continue; 228 continue;
229 } 229 }
230 230
231 // TODO(scheglov) analyze requested files 231 // Analyze a requested file.
232 if (_requestedFiles.isNotEmpty) {
233 String path = _requestedFiles.keys.first;
234 AnalysisResult result = _computeAnalysisResult(path, withUnit: true);
235 _requestedFiles.remove(path).forEach((completer) {
236 completer.complete(result);
237 });
238 yield result;
239 // Repeat the processing loop.
240 _hasWork.notify();
241 continue;
242 }
232 243
233 // Analyze a priority file. 244 // Analyze a priority file.
234 if (_priorityFiles.isNotEmpty) { 245 if (_priorityFiles.isNotEmpty) {
235 bool analyzed = false; 246 bool analyzed = false;
236 for (String path in _priorityFiles) { 247 for (String path in _priorityFiles) {
237 if (_filesToAnalyze.remove(path)) { 248 if (_filesToAnalyze.remove(path)) {
238 AnalysisResult result = 249 AnalysisResult result =
239 _computeAnalysisResult(path, withUnit: true); 250 _computeAnalysisResult(path, withUnit: true);
240 yield result; 251 yield result;
241 break; 252 break;
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 } 1112 }
1102 } 1113 }
1103 for (UnlinkedExportPublic export in unit.publicNamespace.exports) { 1114 for (UnlinkedExportPublic export in unit.publicNamespace.exports) {
1104 referenced.exported.add(export.uri); 1115 referenced.exported.add(export.uri);
1105 } 1116 }
1106 return referenced; 1117 return referenced;
1107 } 1118 }
1108 1119
1109 _ReferencedUris._(); 1120 _ReferencedUris._();
1110 } 1121 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698