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

Unified Diff: lib/compiler/implementation/ssa/codegen.dart

Issue 10917285: Stub implementation of patch invariants for the patch refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 8 years, 3 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: lib/compiler/implementation/ssa/codegen.dart
diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
index 087d657c4b2aaf64440db5358589fa36574014c3..3203e8565e16e14b39cf80240b9e31f0309c9159 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,
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;
ngeoffray 2012/09/20 11:38:37 Can you remove this todo and use element.implement
Johnni Winther 2012/09/21 09:18:25 In a later CL.
@@ -73,7 +74,7 @@ class SsaCodeGeneratorTask extends CompilerTask {
});
compiler.tracer.traceGraph("codegen", graph);
Map<Element, String> parameterNames = getParameterNames(work);
- parameterNames.forEach((element, name) {
+ work.element.computeSignature(compiler).forEachParameter((element) {
ngeoffray 2012/09/20 11:38:37 Please use parameterNames and fetch the declaratio
Johnni Winther 2012/09/21 09:18:25 I can't. There is no link between a parameter elem
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.

Powered by Google App Engine
This is Rietveld 408576698