Chromium Code Reviews| Index: pkg/analyzer/lib/src/context/context.dart |
| diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart |
| index 22e8886c0ae48848391751db6d4024691d285ffc..fe9f3a6caecea7688f04a188fd3e3a71b205a2cb 100644 |
| --- a/pkg/analyzer/lib/src/context/context.dart |
| +++ b/pkg/analyzer/lib/src/context/context.dart |
| @@ -603,13 +603,13 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
| } |
| return new _AnalysisFutureHelper<CompilationUnit>(this).computeAsync( |
| new LibrarySpecificUnit(librarySource, unitSource), (CacheEntry entry) { |
| - CacheState state = entry.getState(RESOLVED_UNIT); |
| + CacheState state = entry.getState(RESOLVED_UNIT6); |
|
Brian Wilkerson
2015/05/12 00:43:22
These two uses need to remain RESOLVED_UNIT.
|
| if (state == CacheState.ERROR) { |
| throw entry.exception; |
| } else if (state == CacheState.INVALID) { |
| return null; |
| } |
| - return entry.getValue(RESOLVED_UNIT); |
| + return entry.getValue(RESOLVED_UNIT6); |
| }); |
| } |
| @@ -649,7 +649,7 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
| for (Source librarySource in containingLibraries) { |
| LibrarySpecificUnit target = |
| new LibrarySpecificUnit(librarySource, unitSource); |
| - CompilationUnit unit = _cache.getValue(target, RESOLVED_UNIT); |
| + CompilationUnit unit = _cache.getValue(target, RESOLVED_UNIT6); |
|
Brian Wilkerson
2015/05/12 00:43:22
I'm fairly confident that these three uses need to
|
| if (unit == null) { |
| units = null; |
| break; |
| @@ -664,8 +664,8 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
| for (Source librarySource in containingLibraries) { |
| LibrarySpecificUnit target = |
| new LibrarySpecificUnit(librarySource, unitSource); |
| - if (_cache.getState(target, RESOLVED_UNIT) == CacheState.FLUSHED) { |
| - dartWorkManager.addPriorityResult(target, RESOLVED_UNIT); |
| + if (_cache.getState(target, RESOLVED_UNIT6) == CacheState.FLUSHED) { |
| + dartWorkManager.addPriorityResult(target, RESOLVED_UNIT6); |
| } |
| } |
| return null; |
| @@ -941,7 +941,7 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
| return null; |
| } |
| return _cache.getValue( |
| - new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT); |
| + new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT6); |
|
Brian Wilkerson
2015/05/12 00:43:22
This needs to remain RESOLVED_UNIT.
|
| } |
| @override |
| @@ -1111,7 +1111,7 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
| setValue(HINTS, AnalysisError.NO_ERRORS); |
| // dartEntry.setValue(LINTS, AnalysisError.NO_ERRORS); |
| entry.setState(RESOLVE_REFERENCES_ERRORS, CacheState.FLUSHED); |
| - entry.setState(RESOLVED_UNIT, CacheState.FLUSHED); |
| + entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); |
|
Brian Wilkerson
2015/05/12 00:43:22
This needs to remain RESOLVED_UNIT, with RESOLVED_
|
| entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); |
| entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); |
| entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); |
| @@ -1148,7 +1148,7 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
| return null; |
| } |
| return _computeResult( |
| - new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT); |
| + new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT6); |
|
scheglov
2015/05/11 23:58:30
I think we should return RESOLVED_UNIT from Analys
Brian Wilkerson
2015/05/12 00:43:22
Yes, this needs to remain RESOLVED_UNIT.
|
| } |
| @override |
| @@ -1505,7 +1505,7 @@ class AnalysisContextImpl implements InternalAnalysisContext { |
| } |
| CacheEntry unitEntry = |
| _cache.get(new LibrarySpecificUnit(librarySource, source)); |
| - state = unitEntry.getState(RESOLVED_UNIT); |
| + state = unitEntry.getState(RESOLVED_UNIT6); |
|
Brian Wilkerson
2015/05/12 00:43:22
This needs to remain RESOLVED_UNIT.
|
| if (state == CacheState.INVALID || |
| (isPriority && state == CacheState.FLUSHED)) { |
| sources.add(source); |