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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/task.dart

Issue 1935933002: Fix source information positions for deserialized patched elements. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes Created 4 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
Index: pkg/compiler/lib/src/js_backend/codegen/task.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/task.dart b/pkg/compiler/lib/src/js_backend/codegen/task.dart
index cf21b0b3b925bcead12f35d4d97832f02606962d..c293d5abe17b15d406139f44d4ed3d62c4e7e3be 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -336,7 +336,7 @@ class CpsFunctionCompiler implements FunctionCompiler {
code = backend.rewriteAsync(element, code);
work.registry.registerAsyncMarker(element);
}
- return attachPosition(code, element);
+ return attachPosition(code, work.resolvedAst);
}
Iterable<CompilerTask> get tasks {
@@ -348,9 +348,9 @@ class CpsFunctionCompiler implements FunctionCompiler {
]..addAll(fallbackCompiler.tasks);
}
- js.Node attachPosition(js.Node node, AstElement element) {
+ js.Node attachPosition(js.Node node, ResolvedAst resolvedAst) {
return node.withSourceInformation(sourceInformationFactory
- .createBuilderForContext(element)
- .buildDeclaration(backend.frontend.getResolvedAst(element)));
+ .createBuilderForContext(resolvedAst)
+ .buildDeclaration(resolvedAst));
}
}
« no previous file with comments | « pkg/compiler/lib/src/io/start_end_information.dart ('k') | pkg/compiler/lib/src/serialization/equivalence.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698