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

Unified Diff: lib/compiler/implementation/compiler.dart

Issue 10825386: Use JavaScript runtime semantics when constant folding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file. Created 8 years, 3 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: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index f22184e30d276639fb1c1936d6f9042114e7f6fe..14e0d17dca88c7dd831b690b122f1997eb3d87e9 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -182,14 +182,16 @@ class Compiler implements DiagnosticListener {
this.enableTypeAssertions = false,
this.enableUserAssertions = false,
this.enableMinification = false,
- bool emitJavascript = true,
+ bool emitJavaScript = true,
bool generateSourceMap = true,
bool cutDeclarationTypes = false])
: libraries = new Map<String, LibraryElement>(),
world = new World(),
progress = new Stopwatch.start() {
namer = new Namer(this);
- constantHandler = new ConstantHandler(this);
+ ConstantSystem constantSystem =
+ emitJavaScript ? JAVA_SCRIPT_CONSTANT_SYSTEM : DART_CONSTANT_SYSTEM;
ngeoffray 2012/09/05 11:20:36 Should that be part of the backend then?
floitsch 2012/09/05 16:12:01 Done.
+ constantHandler = new ConstantHandler(this, constantSystem);
scanner = new ScannerTask(this);
dietParser = new DietParserTask(this);
parser = new ParserTask(this);
@@ -199,7 +201,7 @@ class Compiler implements DiagnosticListener {
closureToClassMapper = new closureMapping.ClosureTask(this);
checker = new TypeCheckerTask(this);
typesTask = new ti.TypesTask(this);
- backend = emitJavascript ?
+ backend = emitJavaScript ?
new js_backend.JavaScriptBackend(this, generateSourceMap) :
new dart_backend.DartBackend(this, cutDeclarationTypes);
enqueuer = new EnqueueTask(this);

Powered by Google App Engine
This is Rietveld 408576698