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

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

Issue 9310061: Fix for extra memory consumption. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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
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 8287ea5c92fc04ed04baf9bb0f6bbed330c41f11..4976d2f93646b04758391369b5b362884c6bfef7 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -519,15 +519,17 @@ public class DartCompiler {
// Parse units that are out-of-date with respect to their dependencies.
for (DartUnit unit : lib.getUnits()) {
- String relPath = unit.getSource().getRelativePath();
- LibraryDeps.Source source = deps.getSource(relPath);
- if (isUnitOutOfDate(lib, source)) {
- filesHaveChanged = true;
- DartSource dartSrc = lib.getSource().getSourceFor(relPath);
- if (dartSrc != null && dartSrc.exists()) {
- unit = parse(dartSrc, lib.getPrefixes(), false);
- if (unit != null) {
- lib.putUnit(unit);
+ if (unit.isDiet()) {
+ String relPath = unit.getSource().getRelativePath();
+ LibraryDeps.Source source = deps.getSource(relPath);
+ if (isUnitOutOfDate(lib, source)) {
+ filesHaveChanged = true;
+ DartSource dartSrc = lib.getSource().getSourceFor(relPath);
+ if (dartSrc != null && dartSrc.exists()) {
+ unit = parse(dartSrc, lib.getPrefixes(), false);
+ if (unit != null) {
+ lib.putUnit(unit);
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698