| 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 5a467f5515caa27cf5ef87bf27bd1ff76d74db69..699ec1dbdee8a7faeb69a6af3b279bf948c21e80 100644
|
| --- a/pkg/compiler/lib/src/js_backend/backend.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/backend.dart
|
| @@ -502,7 +502,7 @@ class JavaScriptBackend extends Backend {
|
|
|
| bool enabledNoSuchMethod = false;
|
|
|
| - final SourceInformationStrategy sourceInformationStrategy;
|
| + SourceInformationStrategy sourceInformationStrategy;
|
|
|
| final BackendHelpers helpers;
|
| final BackendImpacts impacts;
|
| @@ -520,7 +520,7 @@ class JavaScriptBackend extends Backend {
|
| this.sourceInformationStrategy =
|
| generateSourceMap
|
| ? (useNewSourceInfo
|
| - ? const PositionSourceInformationStrategy()
|
| + ? new PositionSourceInformationStrategy()
|
| : const StartEndSourceInformationStrategy())
|
| : const JavaScriptSourceInformationStrategy(),
|
| helpers = new BackendHelpers(compiler),
|
| @@ -1630,7 +1630,12 @@ class JavaScriptBackend extends Backend {
|
| }
|
| }
|
|
|
| - generatedCode[element] = functionCompiler.compile(work);
|
| + jsAst.Fun function = functionCompiler.compile(work);
|
| + if (function.sourceInformation == null) {
|
| + function = function.withSourceInformation(
|
| + sourceInformationStrategy.buildPreambleMarker());
|
| + }
|
| + generatedCode[element] = function;
|
| WorldImpact worldImpact =
|
| impactTransformer.transformCodegenImpact(work.registry.worldImpact);
|
| compiler.dumpInfoTask.registerImpact(element, worldImpact);
|
|
|