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

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

Issue 1193143002: Next steps toward HTML support (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comments Created 5 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/lib/src/task/html.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.driver; 5 library analyzer.src.task.driver;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/src/context/cache.dart'; 10 import 'package:analyzer/src/context/cache.dart';
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 */ 150 */
151 WorkOrder createWorkOrderForResult( 151 WorkOrder createWorkOrderForResult(
152 AnalysisTarget target, ResultDescriptor result) { 152 AnalysisTarget target, ResultDescriptor result) {
153 CacheEntry entry = context.getCacheEntry(target); 153 CacheEntry entry = context.getCacheEntry(target);
154 CacheState state = entry.getState(result); 154 CacheState state = entry.getState(result);
155 if (state == CacheState.VALID || 155 if (state == CacheState.VALID ||
156 state == CacheState.ERROR || 156 state == CacheState.ERROR ||
157 state == CacheState.IN_PROCESS) { 157 state == CacheState.IN_PROCESS) {
158 return null; 158 return null;
159 } 159 }
160 TaskDescriptor taskDescriptor = taskManager.findTask(target, result);
160 try { 161 try {
161 TaskDescriptor taskDescriptor = taskManager.findTask(target, result);
162 WorkItem workItem = new WorkItem(context, target, taskDescriptor, result); 162 WorkItem workItem = new WorkItem(context, target, taskDescriptor, result);
163 return new WorkOrder(taskManager, workItem); 163 return new WorkOrder(taskManager, workItem);
164 } catch (exception, stackTrace) { 164 } catch (exception, stackTrace) {
165 throw new AnalysisException( 165 throw new AnalysisException(
166 'Could not create work order (target = $target; result = $result)', 166 'Could not create work order (target = $target; taskDescriptor = $task Descriptor; result = $result)',
167 new CaughtException(exception, stackTrace)); 167 new CaughtException(exception, stackTrace));
168 } 168 }
169 } 169 }
170 170
171 /** 171 /**
172 * Create a work order that will produce the required analysis results for 172 * Create a work order that will produce the required analysis results for
173 * the given [target]. If [isPriority] is true, then the target is a priority 173 * the given [target]. If [isPriority] is true, then the target is a priority
174 * target. Return the work order that was created, or `null` if there is no 174 * target. Return the work order that was created, or `null` if there is no
175 * further work that needs to be done for the given target. 175 * further work that needs to be done for the given target.
176 */ 176 */
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 final TaskManager taskManager; 808 final TaskManager taskManager;
809 809
810 _WorkOrderDependencyWalker(this.taskManager, WorkItem startingNode) 810 _WorkOrderDependencyWalker(this.taskManager, WorkItem startingNode)
811 : super(startingNode); 811 : super(startingNode);
812 812
813 @override 813 @override
814 WorkItem getNextInput(WorkItem node, List<WorkItem> skipInputs) { 814 WorkItem getNextInput(WorkItem node, List<WorkItem> skipInputs) {
815 return node.gatherInputs(taskManager, skipInputs); 815 return node.gatherInputs(taskManager, skipInputs);
816 } 816 }
817 } 817 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/lib/src/task/html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698