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

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

Issue 10824411: Issue 4539. Tweaks for old/new spec compatibility (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 | compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java » ('j') | 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 ee49f86839c4abab3d8e0dd8d7068e03b8fde857..f257abcfda1622026b7ba220a335c085e0a00cf2 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -779,38 +779,34 @@ public class DartCompiler {
boolean persist = false;
// Compile all the units in this library.
- for (DartUnit unit : lib.getUnits()) {
-
- // Don't compile diet units.
- if (unit.isDiet()) {
- continue;
- }
-
- updateAnalysisTimestamp(unit);
+ for (DartCompilationPhase phase : phases) {
// Run all compiler phases including AST simplification and symbol
// resolution. This must run in serial.
- for (DartCompilationPhase phase : phases) {
- TraceEvent phaseEvent =
- Tracer.canTrace() ? Tracer.start(DartEventType.EXEC_PHASE, "phase", phase
- .getClass().getCanonicalName(), "lib", lib.getName(), "unit", unit
- .getSourceName()) : null;
- try {
- unit = phase.exec(unit, context, getTypeProvider());
- } finally {
- Tracer.end(phaseEvent);
+ for (DartUnit unit : lib.getUnits()) {
+
+ // Don't compile diet units.
+ if (unit.isDiet()) {
+ continue;
}
+
+ unit = phase.exec(unit, context, getTypeProvider());
if (!config.resolveDespiteParseErrors() && context.getErrorCount() > 0) {
return;
}
}
+ }
+
+ for (DartUnit unit : lib.getUnits()) {
+ if (unit.isDiet()) {
+ continue;
+ }
+ updateAnalysisTimestamp(unit);
// To help support the IDE, notify the listener that this unit is compiled.
context.unitCompiled(unit);
-
// Update deps.
lib.getDeps(context).update(context, unit);
-
// We analyzed something, so we need to persist the deps.
persist = true;
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698