| Index: pkg/analyzer/lib/src/generated/incremental_resolver.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
|
| index 2d501fb55e3d8a763ebc5bea6999efc9265dafa7..84047e4d8df490b205f8c621b1b6d07c9a699319 100644
|
| --- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
|
| +++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
|
| @@ -864,6 +864,22 @@ class IncrementalBodyDelta extends Delta {
|
| if (descriptor == CONTENT) {
|
| return DeltaResult.KEEP_CONTINUE;
|
| }
|
| + if (target is Source && target != source) {
|
| + if (isByTask(DartErrorsTask.DESCRIPTOR) ||
|
| + isByTask(LibraryErrorsReadyTask.DESCRIPTOR)) {
|
| + return DeltaResult.KEEP_CONTINUE;
|
| + }
|
| + }
|
| + if (target is LibrarySpecificUnit &&
|
| + target.unit != source &&
|
| + target.library != source) {
|
| + if (isByTask(GatherUsedLocalElementsTask.DESCRIPTOR) ||
|
| + isByTask(GatherUsedImportedElementsTask.DESCRIPTOR) ||
|
| + isByTask(GenerateHintsTask.DESCRIPTOR) ||
|
| + isByTask(LibraryUnitErrorsTask.DESCRIPTOR)) {
|
| + return DeltaResult.KEEP_CONTINUE;
|
| + }
|
| + }
|
| if (isByTask(BuildCompilationUnitElementTask.DESCRIPTOR) ||
|
| isByTask(BuildDirectiveElementsTask.DESCRIPTOR) ||
|
| isByTask(BuildEnumMemberElementsTask.DESCRIPTOR) ||
|
| @@ -1251,9 +1267,14 @@ class IncrementalResolver {
|
|
|
| void _updateCache() {
|
| if (newSourceEntry != null) {
|
| - newSourceEntry.setState(CONTENT, CacheState.INVALID,
|
| - delta: new IncrementalBodyDelta(_source, _updateOffset, _updateEndOld,
|
| - _updateEndNew, _updateDelta));
|
| + LoggingTimer timer = logger.startTimer();
|
| + try {
|
| + newSourceEntry.setState(CONTENT, CacheState.INVALID,
|
| + delta: new IncrementalBodyDelta(_source, _updateOffset,
|
| + _updateEndOld, _updateEndNew, _updateDelta));
|
| + } finally {
|
| + timer.stop('invalidate cache with delta');
|
| + }
|
| }
|
| }
|
|
|
|
|