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

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: Leftovers from rebase. 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 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.

Powered by Google App Engine
This is Rietveld 408576698