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

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

Issue 8247010: Check library dependency changes before deciding on a zero-delta run. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 2 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 118608d70cc682108c481eb663782f3c9cc66344..952509608c70fcc957f0d1a23bee70944bcbe2f0 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -150,12 +150,12 @@ public class DartCompiler {
LibraryUnit library = updateLibraries(app);
importEmbeddedLibraries();
parseOutOfDateFiles();
- if (!context.getFilesHaveChanged()) {
- return library;
- }
if (incremental) {
addOutOfDateDeps();
}
+ if (!context.getFilesHaveChanged()) {
+ return library;
+ }
if (!config.resolveDespiteParseErrors() && (context.getErrorCount() > 0)) {
return library;
}
@@ -380,6 +380,7 @@ public class DartCompiler {
private void addOutOfDateDeps() throws IOException {
TraceEvent logEvent = Tracer.canTrace() ? Tracer.start(DartEventType.ADD_OUTOFDATE) : null;
try {
+ boolean filesHaveChanged = false;
for (LibraryUnit lib : libraries.values()) {
if (SystemLibraryManager.isDartUri(lib.getSource().getUri())) {
@@ -395,6 +396,7 @@ public class DartCompiler {
for (String sourceName : deps.getSourceNames()) {
LibraryDeps.Source depSource = deps.getSource(sourceName);
if (isSourceOutOfDate(lib, depSource)) {
+ filesHaveChanged = true;
DartSource dartSrc = lib.getSource().getSourceFor(sourceName);
if ((dartSrc != null) && (dartSrc.exists())) {
DartUnit unit = parse(dartSrc, lib.getPrefixes());
@@ -406,6 +408,10 @@ public class DartCompiler {
}
}
}
+
+ if (filesHaveChanged) {
+ context.setFilesHaveChanged();
+ }
} finally {
Tracer.end(logEvent);
}
« 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