| 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 89ac390ba9cce6bd73bb6cd16741a9e5994e53f1..f83645a76e99423062f5afb216201b645bd3755b 100644
|
| --- a/pkg/analyzer/lib/src/generated/engine.dart
|
| +++ b/pkg/analyzer/lib/src/generated/engine.dart
|
| @@ -19,9 +19,9 @@ import 'element.dart';
|
| import 'error.dart';
|
| import 'error_verifier.dart';
|
| import 'html.dart' as ht;
|
| -import 'incremental_scanner.dart';
|
| import 'incremental_resolver.dart' show IncrementalResolver,
|
| poorMansIncrementalResolution;
|
| +import 'incremental_scanner.dart';
|
| import 'instrumentation.dart';
|
| import 'java_core.dart';
|
| import 'java_engine.dart';
|
| @@ -4921,31 +4921,6 @@ class AnalysisContextImpl implements InternalAnalysisContext {
|
| }
|
|
|
| /**
|
| - * TODO(scheglov) A hackish, limited incremental resolution implementation.
|
| - */
|
| - bool _tryPoorMansIncrementalResolution(Source unitSource, String newCode) {
|
| - List<Source> librarySources = getLibrariesContaining(unitSource);
|
| - if (librarySources.length != 1) {
|
| - return false;
|
| - }
|
| - CompilationUnit oldUnit =
|
| - getResolvedCompilationUnit2(unitSource, librarySources[0]);
|
| - bool success = poorMansIncrementalResolution(typeProvider, oldUnit, newCode);
|
| - if (!success) {
|
| - return false;
|
| - }
|
| - ChangeNoticeImpl notice = _getNotice(unitSource);
|
| - notice.compilationUnit = oldUnit;
|
| - // TODO(scheglov) apply updated errors
|
| - {
|
| - LineInfo lineInfo = getLineInfo(unitSource);
|
| - DartEntry dartEntry = _cache.get(unitSource);
|
| - notice.setErrors(dartEntry.allErrors, lineInfo);
|
| - }
|
| - return true;
|
| - }
|
| -
|
| - /**
|
| * <b>Note:</b> This method must only be invoked while we are synchronized on [cacheLock].
|
| *
|
| * @param source the source that has been removed
|
| @@ -4973,6 +4948,32 @@ class AnalysisContextImpl implements InternalAnalysisContext {
|
| }
|
|
|
| /**
|
| + * TODO(scheglov) A hackish, limited incremental resolution implementation.
|
| + */
|
| + bool _tryPoorMansIncrementalResolution(Source unitSource, String newCode) {
|
| + List<Source> librarySources = getLibrariesContaining(unitSource);
|
| + if (librarySources.length != 1) {
|
| + return false;
|
| + }
|
| + CompilationUnit oldUnit =
|
| + getResolvedCompilationUnit2(unitSource, librarySources[0]);
|
| + bool success =
|
| + poorMansIncrementalResolution(typeProvider, oldUnit, newCode);
|
| + if (!success) {
|
| + return false;
|
| + }
|
| + ChangeNoticeImpl notice = _getNotice(unitSource);
|
| + notice.compilationUnit = oldUnit;
|
| + // TODO(scheglov) apply updated errors
|
| + {
|
| + LineInfo lineInfo = getLineInfo(unitSource);
|
| + DartEntry dartEntry = _cache.get(unitSource);
|
| + notice.setErrors(dartEntry.allErrors, lineInfo);
|
| + }
|
| + return true;
|
| + }
|
| +
|
| + /**
|
| * Check the cache for any invalid entries (entries whose modification time does not match the
|
| * modification time of the source associated with the entry). Invalid entries will be marked as
|
| * invalid so that the source will be re-analyzed.
|
| @@ -12986,6 +12987,12 @@ class ResolutionEraser extends GeneralizingAstVisitor<Object> {
|
| }
|
|
|
| @override
|
| + Object visitBreakStatement(BreakStatement node) {
|
| + node.target = null;
|
| + return super.visitBreakStatement(node);
|
| + }
|
| +
|
| + @override
|
| Object visitCompilationUnit(CompilationUnit node) {
|
| node.element = null;
|
| return super.visitCompilationUnit(node);
|
| @@ -13004,6 +13011,12 @@ class ResolutionEraser extends GeneralizingAstVisitor<Object> {
|
| }
|
|
|
| @override
|
| + Object visitContinueStatement(ContinueStatement node) {
|
| + node.target = null;
|
| + return super.visitContinueStatement(node);
|
| + }
|
| +
|
| + @override
|
| Object visitDirective(Directive node) {
|
| node.element = null;
|
| return super.visitDirective(node);
|
|
|