Index: pkg/compiler/lib/src/ssa/codegen.dart |
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart |
index 48d318df9a0629c8223c919055dfad83d5cc4ab9..5938e1c36f1e13b63a9ce7c9fb1b24b11fc1d10e 100644 |
--- a/pkg/compiler/lib/src/ssa/codegen.dart |
+++ b/pkg/compiler/lib/src/ssa/codegen.dart |
@@ -39,7 +39,8 @@ class SsaCodeGeneratorTask extends CompilerTask { |
NativeEmitter get nativeEmitter => backend.emitter.nativeEmitter; |
js.Fun buildJavaScriptFunction( |
- FunctionElement element, List<js.Parameter> parameters, js.Block body) { |
+ ResolvedAst resolvedAst, List<js.Parameter> parameters, js.Block body) { |
+ FunctionElement element = resolvedAst.element; |
js.AsyncModifier asyncModifier = element.asyncMarker.isAsync |
? (element.asyncMarker.isYielding |
? const js.AsyncModifier.asyncStar() |
@@ -50,8 +51,8 @@ class SsaCodeGeneratorTask extends CompilerTask { |
return new js.Fun(parameters, body, asyncModifier: asyncModifier) |
.withSourceInformation(sourceInformationFactory |
- .createBuilderForContext(element) |
- .buildDeclaration(element)); |
+ .createBuilderForContext(resolvedAst.element) |
+ .buildDeclaration(resolvedAst)); |
} |
js.Expression generateCode(CodegenWorkItem work, HGraph graph) { |
@@ -62,12 +63,12 @@ class SsaCodeGeneratorTask extends CompilerTask { |
} |
} |
- js.Expression generateLazyInitializer(work, graph) { |
+ js.Expression generateLazyInitializer(CodegenWorkItem work, HGraph graph) { |
return measure(() { |
compiler.tracer.traceGraph("codegen", graph); |
SourceInformation sourceInformation = sourceInformationFactory |
.createBuilderForContext(work.element) |
- .buildDeclaration(work.element); |
+ .buildDeclaration(work.resolvedAst); |
SsaCodeGenerator codegen = new SsaCodeGenerator(backend, work); |
codegen.visitGraph(graph); |
return new js.Fun(codegen.parameters, codegen.body) |
@@ -84,7 +85,8 @@ class SsaCodeGeneratorTask extends CompilerTask { |
SsaCodeGenerator codegen = new SsaCodeGenerator(backend, work); |
codegen.visitGraph(graph); |
compiler.tracer.traceGraph("codegen", graph); |
- return buildJavaScriptFunction(element, codegen.parameters, codegen.body); |
+ return buildJavaScriptFunction( |
+ work.resolvedAst, codegen.parameters, codegen.body); |
}); |
} |
} |