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

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

Issue 2151373002: Share LibrarySpecificUnits when possible (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Clean-up Created 4 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/lib/src/task/driver.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_work_manager; 5 library analyzer.src.task.dart_work_manager;
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/engine.dart' 10 import 'package:analyzer/src/generated/engine.dart'
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 * contexts. 103 * contexts.
104 */ 104 */
105 CachePartition get privateAnalysisCachePartition => 105 CachePartition get privateAnalysisCachePartition =>
106 context.privateAnalysisCachePartition; 106 context.privateAnalysisCachePartition;
107 107
108 /** 108 /**
109 * Specifies that the client want the given [result] of the given [target] 109 * Specifies that the client want the given [result] of the given [target]
110 * to be computed with priority. 110 * to be computed with priority.
111 */ 111 */
112 void addPriorityResult(AnalysisTarget target, ResultDescriptor result) { 112 void addPriorityResult(AnalysisTarget target, ResultDescriptor result) {
113 priorityResultQueue.add(new TargetedResult(target, result)); 113 priorityResultQueue
114 .add(new TargetedResult(context.canonicalizeTarget(target), result));
114 } 115 }
115 116
116 @override 117 @override
117 void applyChange(List<Source> addedSources, List<Source> changedSources, 118 void applyChange(List<Source> addedSources, List<Source> changedSources,
118 List<Source> removedSources) { 119 List<Source> removedSources) {
119 addedSources = addedSources.where(_isDartSource).toList(); 120 addedSources = addedSources.where(_isDartSource).toList();
120 changedSources = changedSources.where(_isDartSource).toList(); 121 changedSources = changedSources.where(_isDartSource).toList();
121 removedSources = removedSources.where(_isDartSource).toList(); 122 removedSources = removedSources.where(_isDartSource).toList();
122 // unknown queue 123 // unknown queue
123 unknownSourceQueue.addAll(addedSources); 124 unknownSourceQueue.addAll(addedSources);
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 } 471 }
471 } 472 }
472 473
473 bool _shouldErrorsBeComputed(Source source) => 474 bool _shouldErrorsBeComputed(Source source) =>
474 context.shouldErrorsBeAnalyzed(source); 475 context.shouldErrorsBeAnalyzed(source);
475 476
476 static bool _isDartSource(AnalysisTarget target) { 477 static bool _isDartSource(AnalysisTarget target) {
477 return target is Source && AnalysisEngine.isDartFileName(target.fullName); 478 return target is Source && AnalysisEngine.isDartFileName(target.fullName);
478 } 479 }
479 } 480 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/lib/src/task/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698