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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_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
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
index e7595b4edf6ce7356be00eba242a431ba46ed1e9..c382e4e5f5947a316889bf6fe1d1a12e7608acd0 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
@@ -78,7 +78,7 @@ class IrBuilderTask extends CompilerTask {
element = element.implementation;
return reporter.withCurrentElement(element, () {
SourceInformationBuilder sourceInformationBuilder =
- sourceInformationStrategy.createBuilderForContext(element);
+ sourceInformationStrategy.createBuilderForContext(resolvedAst);
IrBuilderVisitor builder = new IrBuilderVisitor(
resolvedAst, compiler, sourceInformationBuilder, typeMaskSystem);
@@ -502,8 +502,9 @@ class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
/// Every visitor can only be applied to nodes in one context, because
/// the [elements] field is specific to that context.
IrBuilderVisitor makeVisitorForContext(AstElement context) {
- return new IrBuilderVisitor(context.resolvedAst, compiler,
- sourceInformationBuilder.forContext(context), typeMaskSystem);
+ ResolvedAst resolvedAst = backend.frontend.getResolvedAst(context);
+ return new IrBuilderVisitor(resolvedAst, compiler,
+ sourceInformationBuilder.forContext(resolvedAst), typeMaskSystem);
}
/// Builds the IR for an [expression] taken from a different [context].
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698