Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/engine.dart |
| diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart |
| index b8449a503295f28feeb5ad02528e8cebcf783ae7..1f359318c29bebd6e6194ff81ff58e4090cfe4c5 100644 |
| --- a/pkg/analyzer/lib/src/generated/engine.dart |
| +++ b/pkg/analyzer/lib/src/generated/engine.dart |
| @@ -1572,10 +1572,10 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
| Source source = sourcesToInvalidate[i]; |
| SourceEntry entry = _getReadableSourceEntry(source); |
| if (entry is DartEntry) { |
| - entry.invalidateAllResolutionInformation(false); |
| + entry.invalidateParseInformation(); |
| _workManager.add(source, _computePriority(entry)); |
| } else if (entry is HtmlEntry) { |
| - entry.invalidateAllResolutionInformation(false); |
| + entry.invalidateParseInformation(); |
| _workManager.add(source, SourcePriority.HTML); |
| } |
| } |
| @@ -8155,6 +8155,18 @@ class DartEntry extends SourceEntry { |
| } |
| /** |
| + * Invalidate all of the parse and resolution information associated with |
| + * this source. |
| + */ |
| + void invalidateParseInformation() { |
| + setState(SOURCE_KIND, CacheState.INVALID); |
| + setState(PARSE_ERRORS, CacheState.INVALID); |
| + setState(PARSED_UNIT, CacheState.INVALID); |
| + _containingLibraries.clear(); |
| + _discardCachedResolutionInformation(true); |
| + } |
| + |
| + /** |
| * Record that an [exception] occurred while attempting to build the element |
| * model for the source represented by this entry in the context of the given |
| * [library]. This will set the state of all resolution-based information as |
| @@ -9160,6 +9172,17 @@ class HtmlEntry extends SourceEntry { |
| } |
| } |
| + /** |
| + * Invalidate all of the parse and resolution information associated with |
| + * this source. |
| + */ |
| + void invalidateParseInformation() { |
| + setState(PARSE_ERRORS, CacheState.INVALID); |
| + setState(PARSED_UNIT, CacheState.INVALID); |
| + setState(RESOLVED_UNIT, CacheState.INVALID); |
|
Brian Wilkerson
2015/01/20 21:32:04
I would have expected the RESOLVED_UNIT to get inv
scheglov
2015/01/20 23:12:29
Done.
|
| + invalidateAllResolutionInformation(true); |
| + } |
| + |
| @override |
| void recordContentError(CaughtException exception) { |
| super.recordContentError(exception); |