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

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
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8401575cb8c729c03fe1dc50475ba5898a58f73e 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;
@@ -73,7 +74,9 @@ class SsaCodeGeneratorTask extends CompilerTask {
});
compiler.tracer.traceGraph("codegen", graph);
Map<Element, String> parameterNames = getParameterNames(work);
- parameterNames.forEach((element, name) {
+ // Use [work.element] to ensure that the parameter element come from
+ // the declaration.
+ work.element.computeSignature(compiler).forEachParameter((element) {
compiler.enqueuer.codegen.addToWorkList(element);
});
List<js.Parameter> parameters = <js.Parameter>[];
@@ -156,7 +159,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.
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698