Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 827343003: Perform incremental resolution only if the existing unit is not null. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/incremental_resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8abf615850530429274e00c1538ba41738ec9336..c44d54349a93cc028b2b70414fa0d1275f5b95ac 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -5091,10 +5091,14 @@ class AnalysisContextImpl implements InternalAnalysisContext {
if (librarySources.length != 1) {
return false;
}
- // do resolution
+ // prepare the existing unit
Source librarySource = librarySources[0];
CompilationUnit oldUnit =
getResolvedCompilationUnit2(unitSource, librarySource);
+ if (oldUnit == null) {
+ return false;
+ }
+ // do resolution
PoorMansIncrementalResolver resolver = new PoorMansIncrementalResolver(
typeProvider,
unitSource,
@@ -5107,7 +5111,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
// prepare notice
ChangeNoticeImpl notice = _getNotice(unitSource);
notice.compilationUnit = oldUnit;
- // TODO(scheglov) apply updated errors
+ // apply updated errors
{
LineInfo lineInfo = getLineInfo(unitSource);
notice.setErrors(dartEntry.allErrors, lineInfo);
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/incremental_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698