| OLD | NEW |
| 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 3470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3481 outputs[LIBRARY_SPECIFIC_UNITS] = librarySpecificUnits; | 3481 outputs[LIBRARY_SPECIFIC_UNITS] = librarySpecificUnits; |
| 3482 outputs[PARSE_ERRORS] = parseErrors; | 3482 outputs[PARSE_ERRORS] = parseErrors; |
| 3483 outputs[PARSED_UNIT] = unit; | 3483 outputs[PARSED_UNIT] = unit; |
| 3484 outputs[SOURCE_KIND] = sourceKind; | 3484 outputs[SOURCE_KIND] = sourceKind; |
| 3485 outputs[UNITS] = unitSources; | 3485 outputs[UNITS] = unitSources; |
| 3486 } | 3486 } |
| 3487 | 3487 |
| 3488 /** | 3488 /** |
| 3489 * Return a map from the names of the inputs of this kind of task to the task | 3489 * Return a map from the names of the inputs of this kind of task to the task |
| 3490 * input descriptors describing those inputs for a task with the given | 3490 * input descriptors describing those inputs for a task with the given |
| 3491 * [source]. | 3491 * [target]. |
| 3492 */ | 3492 */ |
| 3493 static Map<String, TaskInput> buildInputs(AnalysisTarget target) { | 3493 static Map<String, TaskInput> buildInputs(AnalysisTarget target) { |
| 3494 return <String, TaskInput>{ | 3494 return <String, TaskInput>{ |
| 3495 LINE_INFO_INPUT_NAME: LINE_INFO.of(target), | 3495 LINE_INFO_INPUT_NAME: LINE_INFO.of(target), |
| 3496 MODIFICATION_TIME_INPUT_NAME: MODIFICATION_TIME.of(target), | 3496 MODIFICATION_TIME_INPUT_NAME: MODIFICATION_TIME.of(target), |
| 3497 TOKEN_STREAM_INPUT_NAME: TOKEN_STREAM.of(target) | 3497 TOKEN_STREAM_INPUT_NAME: TOKEN_STREAM.of(target, flushOnAccess: true) |
| 3498 }; | 3498 }; |
| 3499 } | 3499 } |
| 3500 | 3500 |
| 3501 /** | 3501 /** |
| 3502 * Create a [ParseDartTask] based on the given [target] in the given | 3502 * Create a [ParseDartTask] based on the given [target] in the given |
| 3503 * [context]. | 3503 * [context]. |
| 3504 */ | 3504 */ |
| 3505 static ParseDartTask createTask( | 3505 static ParseDartTask createTask( |
| 3506 AnalysisContext context, AnalysisTarget target) { | 3506 AnalysisContext context, AnalysisTarget target) { |
| 3507 return new ParseDartTask(context, target); | 3507 return new ParseDartTask(context, target); |
| (...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5266 | 5266 |
| 5267 @override | 5267 @override |
| 5268 bool moveNext() { | 5268 bool moveNext() { |
| 5269 if (_newSources.isEmpty) { | 5269 if (_newSources.isEmpty) { |
| 5270 return false; | 5270 return false; |
| 5271 } | 5271 } |
| 5272 currentTarget = _newSources.removeLast(); | 5272 currentTarget = _newSources.removeLast(); |
| 5273 return true; | 5273 return true; |
| 5274 } | 5274 } |
| 5275 } | 5275 } |
| OLD | NEW |