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

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

Issue 1196433002: Create and test source mapping for invocations. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rebased Created 5 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 | 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 88368dd5bfc42c99f764193586f22810a87e7e9c..e8fdf36d61835c5e296e6e0d986de03966df7448 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -272,6 +272,11 @@ abstract class Backend {
/// Backend callback methods for the resolution phase.
ResolutionCallbacks get resolutionCallbacks;
+ /// The strategy used for collecting and emitting source information.
+ SourceInformationStrategy get sourceInformationStrategy {
+ return const SourceInformationStrategy();
+ }
+
// TODO(johnniwinther): Move this to the JavaScriptBackend.
String get patchVersion => null;
@@ -1093,17 +1098,10 @@ 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, sourceInformationFactory, generateSourceMap: generateSourceMap);
+ js_backend.JavaScriptBackend jsBackend =
+ new js_backend.JavaScriptBackend(
+ this, generateSourceMap: generateSourceMap);
backend = jsBackend;
} else {
backend = new dart_backend.DartBackend(this, strips,
@@ -1122,7 +1120,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, sourceInformationFactory),
+ irBuilder = new IrBuilderTask(this, backend.sourceInformationStrategy),
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