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

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

Issue 10993036: Implement the apply functionality for dart2js and currently just put it in a test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
===================================================================
--- lib/compiler/implementation/ssa/codegen.dart (revision 12904)
+++ lib/compiler/implementation/ssa/codegen.dart (working copy)
@@ -1469,12 +1469,11 @@
SourceString name = node.selector.name;
String methodName;
List<js.Expression> arguments;
+ Element target = node.element;
// Avoid adding the generative constructor name to the list of
// seen selectors.
- if (node.inputs[0] is HForeignNew) {
- // TODO(ahe): The constructor name was statically resolved in
- // SsaBuilder.buildFactory. Is there a cleaner way to do this?
+ if (target != null && target.isGenerativeConstructorBody()) {
methodName = name.slowToString();
arguments = visitArguments(node.inputs);
} else {
@@ -1490,7 +1489,6 @@
// If we don't know what we're calling or if we are calling a getter,
// we need to register that fact that we may be calling a closure
// with the same arguments.
- Element target = node.element;
if (target === null || target.isGetter()) {
// TODO(kasperl): If we have a typed selector for the call, we
// may know something about the types of closures that need

Powered by Google App Engine
This is Rietveld 408576698