| 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 7d06f9fc7f65b150d291e7b430b091aa839bf049..32410b7f1c118ab154dcd5a217245859226dec2e 100644
|
| --- a/pkg/analyzer/lib/src/generated/engine.dart
|
| +++ b/pkg/analyzer/lib/src/generated/engine.dart
|
| @@ -1033,6 +1033,9 @@ class AnalysisContextImpl implements InternalAnalysisContext {
|
| }
|
|
|
| @override
|
| + AnalysisCache get analysisCache => _cache;
|
| +
|
| + @override
|
| AnalysisOptions get analysisOptions => _options;
|
|
|
| @override
|
| @@ -4057,28 +4060,6 @@ class AnalysisContextImpl implements InternalAnalysisContext {
|
| }
|
| }
|
|
|
| - /**
|
| - * Record the results produced by performing a [task] and return the cache
|
| - * entry associated with the results.
|
| - */
|
| - DartEntry _recordBuildUnitElementTask(BuildUnitElementTask task) {
|
| - Source source = task.source;
|
| - Source library = task.library;
|
| - DartEntry dartEntry = _cache.get(source);
|
| - CaughtException thrownException = task.exception;
|
| - if (thrownException != null) {
|
| - dartEntry.recordBuildElementErrorInLibrary(library, thrownException);
|
| - throw new AnalysisException('<rethrow>', thrownException);
|
| - }
|
| - dartEntry.setValueInLibrary(DartEntry.BUILT_UNIT, library, task.unit);
|
| - dartEntry.setValueInLibrary(
|
| - DartEntry.BUILT_ELEMENT, library, task.unitElement);
|
| - ChangeNoticeImpl notice = _getNotice(source);
|
| - LineInfo lineInfo = dartEntry.getValue(SourceEntry.LINE_INFO);
|
| - notice.setErrors(dartEntry.allErrors, lineInfo);
|
| - return dartEntry;
|
| - }
|
| -
|
| // /**
|
| // * Notify all of the analysis listeners that the given source is no longer included in the set of
|
| // * sources that are being analyzed.
|
| @@ -4158,6 +4139,28 @@ class AnalysisContextImpl implements InternalAnalysisContext {
|
| // }
|
|
|
| /**
|
| + * Record the results produced by performing a [task] and return the cache
|
| + * entry associated with the results.
|
| + */
|
| + DartEntry _recordBuildUnitElementTask(BuildUnitElementTask task) {
|
| + Source source = task.source;
|
| + Source library = task.library;
|
| + DartEntry dartEntry = _cache.get(source);
|
| + CaughtException thrownException = task.exception;
|
| + if (thrownException != null) {
|
| + dartEntry.recordBuildElementErrorInLibrary(library, thrownException);
|
| + throw new AnalysisException('<rethrow>', thrownException);
|
| + }
|
| + dartEntry.setValueInLibrary(DartEntry.BUILT_UNIT, library, task.unit);
|
| + dartEntry.setValueInLibrary(
|
| + DartEntry.BUILT_ELEMENT, library, task.unitElement);
|
| + ChangeNoticeImpl notice = _getNotice(source);
|
| + LineInfo lineInfo = dartEntry.getValue(SourceEntry.LINE_INFO);
|
| + notice.setErrors(dartEntry.allErrors, lineInfo);
|
| + return dartEntry;
|
| + }
|
| +
|
| + /**
|
| * Given a [dartEntry] and a [library] element, record the library element and
|
| * other information gleaned from the element in the cache entry.
|
| */
|
| @@ -9019,6 +9022,14 @@ class IncrementalAnalysisTask extends AnalysisTask {
|
| */
|
| abstract class InternalAnalysisContext implements AnalysisContext {
|
| /**
|
| + * A table mapping the sources known to the context to the information known
|
| + * about the source.
|
| + *
|
| + * TODO(scheglov) add the type, once we have only one cache.
|
| + */
|
| + dynamic get analysisCache;
|
| +
|
| + /**
|
| * Allow the client to supply its own content cache. This will take the
|
| * place of the content cache created by default, allowing clients to share
|
| * the content cache between contexts.
|
|
|