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]. |