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

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

Issue 8523034: Compile Time Constants cycle check (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added new test to exercise code that was throwing ICE Created 9 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 | « no previous file | compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.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 cd79de45ab03ddf55b199fd0aefdc187c2147ed4..7a148a40e6d1d9c9532f51a7bf876c6239fd1665 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -28,6 +28,7 @@ import com.google.dart.compiler.parser.CommentPreservingParser;
import com.google.dart.compiler.parser.DartParser;
import com.google.dart.compiler.parser.DartScanner.Location;
import com.google.dart.compiler.parser.DartScannerParserContext;
+import com.google.dart.compiler.resolver.CompileTimeConstantResolver;
import com.google.dart.compiler.resolver.CoreTypeProvider;
import com.google.dart.compiler.resolver.CoreTypeProviderImplementation;
import com.google.dart.compiler.resolver.Element;
@@ -541,6 +542,13 @@ public class DartCompiler {
new MemberBuilder().exec(unit, context, getTypeProvider());
}
}
+
+ // Perform resolution on compile-time constant expressions.
+ for (LibraryUnit lib : libraries.values()) {
+ for (DartUnit unit : lib.getUnits()) {
+ new CompileTimeConstantResolver().exec(unit, context, getTypeProvider());
+ }
+ }
} finally {
Tracer.end(logEvent);
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698