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

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 1100723002: Add SourceInformationFactory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 5 years, 8 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 | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 342f35aa5aa0cd8c41b259611847bb84cefca888..4671212ffad60e10fdac870bc96917479810655b 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -1058,9 +1058,17 @@ abstract class Compiler implements DiagnosticListener {
globalDependencies =
new CodegenRegistry(this, new TreeElementMapping(null));
+ SourceInformationFactory sourceInformationFactory =
+ const SourceInformationFactory();
+ if (generateSourceMap) {
+ sourceInformationFactory =
+ const bool.fromEnvironment('USE_NEW_SOURCE_INFO', defaultValue: false)
+ ? const PositionSourceInformationFactory()
+ : const StartEndSourceInformationFactory();
+ }
if (emitJavaScript) {
- js_backend.JavaScriptBackend jsBackend =
- new js_backend.JavaScriptBackend(this, generateSourceMap);
+ js_backend.JavaScriptBackend jsBackend = new js_backend.JavaScriptBackend(
+ this, sourceInformationFactory, generateSourceMap: generateSourceMap);
backend = jsBackend;
} else {
backend = new dart_backend.DartBackend(this, strips,
@@ -1079,7 +1087,7 @@ abstract class Compiler implements DiagnosticListener {
resolver = new ResolverTask(this, backend.constantCompilerTask),
closureToClassMapper = new closureMapping.ClosureTask(this),
checker = new TypeCheckerTask(this),
- irBuilder = new IrBuilderTask(this),
+ irBuilder = new IrBuilderTask(this, sourceInformationFactory),
typesTask = new ti.TypesTask(this),
constants = backend.constantCompilerTask,
deferredLoadTask = new DeferredLoadTask(this),
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698