Chromium Code Reviews| Index: lib/compiler/implementation/ssa/codegen.dart |
| diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart |
| index 21efa3c2207dcc3912a0ff3207ad02da819335d6..604d6a5a4bd9bb46fd0696be8c784dde27f78d89 100644 |
| --- a/lib/compiler/implementation/ssa/codegen.dart |
| +++ b/lib/compiler/implementation/ssa/codegen.dart |
| @@ -16,7 +16,8 @@ class SsaCodeGeneratorTask extends CompilerTask { |
| js.Fun buildJavaScriptFunction(FunctionElement element, |
|
ahe
2012/09/18 11:25:54
Yay! Fun with js!
|
| List<js.Parameter> parameters, |
| js.Block body) { |
| - FunctionExpression expression = element.cachedNode; |
| + FunctionExpression expression = |
| + element.implementation.parseNode(backend.compiler); |
| js.Fun result = new js.Fun(parameters, body); |
| // TODO(johnniwinther): remove the 'element.patch' hack. |
| Element sourceElement = element.patch == null ? element : element.patch; |
| @@ -73,7 +74,7 @@ class SsaCodeGeneratorTask extends CompilerTask { |
| }); |
| compiler.tracer.traceGraph("codegen", graph); |
| Map<Element, String> parameterNames = getParameterNames(work); |
|
ahe
2012/09/18 11:25:54
Eliminate getParameterNames?
Johnni Winther
2012/09/20 08:12:23
It's used elsewhere.
|
| - parameterNames.forEach((element, name) { |
| + work.element.computeSignature(compiler).forEachParameter((element) { |
| compiler.enqueuer.codegen.addToWorkList(element); |
| }); |
| List<js.Parameter> parameters = <js.Parameter>[]; |
| @@ -156,7 +157,7 @@ class SsaCodeGeneratorTask extends CompilerTask { |
| Map<Element, String> getParameterNames(WorkItem work) { |
| Map<Element, String> parameterNames = new LinkedHashMap<Element, String>(); |
| - FunctionElement function = work.element; |
| + FunctionElement function = work.element.implementation; |
| // The dom/html libraries have inline JS code that reference |
| // parameter names directly. Long-term such code will be rejected. |