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

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

Issue 701583003: Workaround for ConstantVisitor dependency issues. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/docgen/lib/src/models/annotation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 0c911d47702e51c241867ed5e360b0a0cc5b5fa4..cc92bafdbfc96031d4f0582548483a037ff615e5 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -8857,6 +8857,25 @@ class LibraryResolver {
}
}
computer.computeValues();
+ // As a temporary workaround for issue 21572, run ConstantVerifier now.
+ // TODO(paulberry): remove this workaround once issue 21572 is fixed.
+ for (Library library in _librariesInCycles) {
+ for (Source source in library.compilationUnitSources) {
+ try {
+ CompilationUnit unit = library.getAST(source);
+ ErrorReporter errorReporter = new ErrorReporter(
+ _errorListener, source);
+ ConstantVerifier constantVerifier = new ConstantVerifier(
+ errorReporter, library.libraryElement, _typeProvider);
+ unit.accept(constantVerifier);
+ } on AnalysisException catch (exception, stackTrace) {
+ AnalysisEngine.instance.logger.logError(
+ "Internal Error: Could not access AST for ${source.fullName} "
+ "during constant verification",
+ new CaughtException(exception, stackTrace));
+ }
+ }
+ }
} finally {
timeCounter.stop();
}
@@ -9382,6 +9401,19 @@ class LibraryResolver2 {
}
}
computer.computeValues();
+ // As a temporary workaround for issue 21572, run ConstantVerifier now.
+ // TODO(paulberry): remove this workaround once issue 21572 is fixed.
+ for (ResolvableLibrary library in _librariesInCycle) {
+ for (ResolvableCompilationUnit unit in
+ library.resolvableCompilationUnits) {
+ CompilationUnit ast = unit.compilationUnit;
+ ErrorReporter errorReporter = new ErrorReporter(
+ _errorListener, unit.source);
+ ConstantVerifier constantVerifier = new ConstantVerifier(
+ errorReporter, library.libraryElement, _typeProvider);
+ ast.accept(constantVerifier);
+ }
+ }
} finally {
timeCounter.stop();
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/docgen/lib/src/models/annotation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698