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.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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 try { | 660 try { |
661 TaskDescriptor descriptor = | 661 TaskDescriptor descriptor = |
662 taskManager.findTask(inputTarget, inputResult); | 662 taskManager.findTask(inputTarget, inputResult); |
663 return new WorkItem(context, inputTarget, descriptor, inputResult); | 663 return new WorkItem(context, inputTarget, descriptor, inputResult); |
664 } on AnalysisException catch (exception, stackTrace) { | 664 } on AnalysisException catch (exception, stackTrace) { |
665 this.exception = new CaughtException(exception, stackTrace); | 665 this.exception = new CaughtException(exception, stackTrace); |
666 return null; | 666 return null; |
667 } | 667 } |
668 } else { | 668 } else { |
669 builder.currentValue = inputEntry.getValue(inputResult); | 669 builder.currentValue = inputEntry.getValue(inputResult); |
| 670 if (builder.flushOnAccess) { |
| 671 inputEntry.setState(inputResult, CacheState.FLUSHED); |
| 672 } |
670 } | 673 } |
671 if (!builder.moveNext()) { | 674 if (!builder.moveNext()) { |
672 inputs = builder.inputValue; | 675 inputs = builder.inputValue; |
673 builder = null; | 676 builder = null; |
674 } | 677 } |
675 } | 678 } |
676 return null; | 679 return null; |
677 } | 680 } |
678 | 681 |
679 @override | 682 @override |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 final TaskManager taskManager; | 759 final TaskManager taskManager; |
757 | 760 |
758 _WorkOrderDependencyWalker(this.taskManager, WorkItem startingNode) | 761 _WorkOrderDependencyWalker(this.taskManager, WorkItem startingNode) |
759 : super(startingNode); | 762 : super(startingNode); |
760 | 763 |
761 @override | 764 @override |
762 WorkItem getNextInput(WorkItem node, List<WorkItem> skipInputs) { | 765 WorkItem getNextInput(WorkItem node, List<WorkItem> skipInputs) { |
763 return node.gatherInputs(taskManager, skipInputs); | 766 return node.gatherInputs(taskManager, skipInputs); |
764 } | 767 } |
765 } | 768 } |
OLD | NEW |