| 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_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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 Source library = target.library; | 393 Source library = target.library; |
| 394 if (context.exists(library)) { | 394 if (context.exists(library)) { |
| 395 librarySourceQueue.add(library); | 395 librarySourceQueue.add(library); |
| 396 } | 396 } |
| 397 } | 397 } |
| 398 } | 398 } |
| 399 // Invalidate targets and values. | 399 // Invalidate targets and values. |
| 400 unitTargets.forEach(partition.remove); | 400 unitTargets.forEach(partition.remove); |
| 401 for (Source dartSource in dartSources) { | 401 for (Source dartSource in dartSources) { |
| 402 CacheEntry entry = partition.get(dartSource); | 402 CacheEntry entry = partition.get(dartSource); |
| 403 if (dartSource != null) { | 403 if (entry != null) { |
| 404 // TODO(scheglov) we invalidate too much. | 404 // TODO(scheglov) we invalidate too much. |
| 405 // Would be nice to invalidate just URLs resolution. | 405 // Would be nice to invalidate just URLs resolution. |
| 406 entry.setState(PARSED_UNIT, CacheState.INVALID); | 406 entry.setState(PARSED_UNIT, CacheState.INVALID); |
| 407 entry.setState(IMPORTED_LIBRARIES, CacheState.INVALID); | 407 entry.setState(IMPORTED_LIBRARIES, CacheState.INVALID); |
| 408 entry.setState(EXPLICITLY_IMPORTED_LIBRARIES, CacheState.INVALID); | 408 entry.setState(EXPLICITLY_IMPORTED_LIBRARIES, CacheState.INVALID); |
| 409 entry.setState(EXPORTED_LIBRARIES, CacheState.INVALID); | 409 entry.setState(EXPORTED_LIBRARIES, CacheState.INVALID); |
| 410 entry.setState(INCLUDED_PARTS, CacheState.INVALID); | 410 entry.setState(INCLUDED_PARTS, CacheState.INVALID); |
| 411 } | 411 } |
| 412 } | 412 } |
| 413 } | 413 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 } | 467 } |
| 468 } | 468 } |
| 469 | 469 |
| 470 bool _shouldErrorsBeComputed(Source source) => | 470 bool _shouldErrorsBeComputed(Source source) => |
| 471 context.shouldErrorsBeAnalyzed(source, null); | 471 context.shouldErrorsBeAnalyzed(source, null); |
| 472 | 472 |
| 473 static bool _isDartSource(AnalysisTarget target) { | 473 static bool _isDartSource(AnalysisTarget target) { |
| 474 return target is Source && AnalysisEngine.isDartFileName(target.fullName); | 474 return target is Source && AnalysisEngine.isDartFileName(target.fullName); |
| 475 } | 475 } |
| 476 } | 476 } |
| OLD | NEW |