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

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

Issue 10579019: First shot at source maps generation in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix the tests. Created 8 years, 6 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 | lib/compiler/implementation/dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/compiler.dart
diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart
index 600735ae4bb41a6640b2cea65d8d3939416633ad..e2553ae7a7b54d86c0eed60051f1a3a0500123aa 100644
--- a/lib/compiler/implementation/compiler.dart
+++ b/lib/compiler/implementation/compiler.dart
@@ -63,8 +63,8 @@ class JavaScriptBackend extends Backend {
return <CompilerTask>[builder, optimizer, generator, emitter];
}
- JavaScriptBackend(Compiler compiler)
- : emitter = new CodeEmitterTask(compiler),
+ JavaScriptBackend(Compiler compiler, bool generateSourceMap)
+ : emitter = new CodeEmitterTask(compiler, generateSourceMap),
fieldInitializers = new Map<Element, Map<Element, HType>>(),
fieldIntegerSetters = new Map<Element, Map<Element, bool>>(),
super(compiler) {
@@ -260,7 +260,8 @@ class Compiler implements DiagnosticListener {
this.enableTypeAssertions = false,
this.enableUserAssertions = false,
bool emitJavascript = true,
- validateUnparse = false])
+ validateUnparse = false,
+ generateSourceMap = true])
: libraries = new Map<String, LibraryElement>(),
world = new World(),
progress = new Stopwatch.start() {
@@ -274,7 +275,8 @@ class Compiler implements DiagnosticListener {
resolver = new ResolverTask(this);
checker = new TypeCheckerTask(this);
backend = emitJavascript ?
- new JavaScriptBackend(this) : new dart_backend.DartBackend(this);
+ new JavaScriptBackend(this, generateSourceMap) :
+ new dart_backend.DartBackend(this);
enqueuer = new EnqueueTask(this);
tasks = [scanner, dietParser, parser, resolver, checker,
unparseValidator, constantHandler, enqueuer];
« no previous file with comments | « no previous file | lib/compiler/implementation/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698