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

Unified Diff: compiler/java/com/google/dart/compiler/DartCompiler.java

Issue 10825481: Issue 4632. Resolve all units before using next phase. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/DartCompiler.java
diff --git a/compiler/java/com/google/dart/compiler/DartCompiler.java b/compiler/java/com/google/dart/compiler/DartCompiler.java
index ee98d2b83236dbb249b02dd2541154a8c2f70169..1788f05118d2e2d12ce45dc324425bbd770ce2b8 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -1279,17 +1279,17 @@ public class DartCompiler {
LibraryUnit libUnit = entry.getValue();
if (!resolvedLibs.containsKey(libUri) && libUnit != null) {
newLibraries.put(libUri, libUnit);
- for (DartUnit unit : libUnit.getUnits()) {
- // Don't analyze diet units.
- if (unit.isDiet()) {
- continue;
- }
- for (DartCompilationPhase phase : phases) {
+ for (DartCompilationPhase phase : phases) {
+ // Run phase on all units, because "const" phase expects to have fully resolved library.
+ for (DartUnit unit : libUnit.getUnits()) {
+ if (unit.isDiet()) {
+ continue;
+ }
unit = phase.exec(unit, context, compiler.getTypeProvider());
- // Ignore errors. Resolver and TypeAnalyzer should be able to cope with
- // resolution errors.
}
- // To help support the IDE, notify the listener that this unit is compiled.
+ }
+ // To help support the IDE, notify the listener that these unit were compiled.
+ for (DartUnit unit : libUnit.getUnits()) {
context.unitCompiled(unit);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698