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

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: Comment and test update. 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..69ea2b4183500a98c5ae24a0ed4be6324985eef7 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -182,14 +182,18 @@ 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);
+ constantHandler =
+ new ConstantHandler(this,
+ emitJavaScript
kasperl 2012/09/04 05:57:30 I would definitely compute the constant system and
floitsch 2012/09/04 13:10:42 Done.
+ ? const JavaScriptConstantSystem()
kasperl 2012/09/04 05:57:30 JAVA_SCRIPT_CONSTANT_SYSTEM?
floitsch 2012/09/04 13:10:42 Done.
+ : const DartConstantSystem());
kasperl 2012/09/04 05:57:30 DART_CONSTANT_SYSTEM?
floitsch 2012/09/04 13:10:42 Done.
scanner = new ScannerTask(this);
dietParser = new DietParserTask(this);
parser = new ParserTask(this);
@@ -199,7 +203,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