| Index: pkg/compiler/lib/src/js_backend/backend.dart
|
| diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
|
| index ddeacb436d9c74023857f1493bfb2e75427b4ca4..de1b40861663805142cfd7c890bb9253174d8b11 100644
|
| --- a/pkg/compiler/lib/src/js_backend/backend.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/backend.dart
|
| @@ -617,8 +617,9 @@ class JavaScriptBackend extends Backend {
|
|
|
| bool enabledNoSuchMethod = false;
|
|
|
| + final SourceInformationStrategy sourceInformationStrategy;
|
| +
|
| JavaScriptBackend(Compiler compiler,
|
| - SourceInformationFactory sourceInformationFactory,
|
| {bool generateSourceMap: true})
|
| : namer = determineNamer(compiler),
|
| oneShotInterceptors = new Map<jsAst.Name, Selector>(),
|
| @@ -626,6 +627,12 @@ class JavaScriptBackend extends Backend {
|
| rti = new RuntimeTypes(compiler),
|
| specializedGetInterceptors = new Map<jsAst.Name, Set<ClassElement>>(),
|
| annotations = new Annotations(compiler),
|
| + this.sourceInformationStrategy =
|
| + generateSourceMap
|
| + ? (useNewSourceInfo
|
| + ? const PositionSourceInformationStrategy()
|
| + : const StartEndSourceInformationStrategy())
|
| + : const JavaScriptSourceInformationStrategy(),
|
| super(compiler) {
|
| emitter = new CodeEmitterTask(compiler, namer, generateSourceMap);
|
| typeVariableHandler = new TypeVariableHandler(compiler);
|
| @@ -636,8 +643,8 @@ class JavaScriptBackend extends Backend {
|
| patchResolverTask = new PatchResolverTask(compiler);
|
| functionCompiler = compiler.useCpsIr
|
| ? new CpsFunctionCompiler(
|
| - compiler, this, sourceInformationFactory)
|
| - : new SsaFunctionCompiler(this, sourceInformationFactory);
|
| + compiler, this, sourceInformationStrategy)
|
| + : new SsaFunctionCompiler(this, sourceInformationStrategy);
|
| }
|
|
|
| ConstantSystem get constantSystem => constants.constantSystem;
|
|
|