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

Unified Diff: dart/frog/leg/ssa/codegen.dart

Issue 9753007: Implement super-send to non-function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | « dart/frog/leg/ssa/builder.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/ssa/codegen.dart
diff --git a/dart/frog/leg/ssa/codegen.dart b/dart/frog/leg/ssa/codegen.dart
index 0f58f29cd7a6ee9c84bf7f883acd856c5dddfdca..f5c563e4c261f67c5af83f91d2a0b4c575ec526c 100644
--- a/dart/frog/leg/ssa/codegen.dart
+++ b/dart/frog/leg/ssa/codegen.dart
@@ -638,8 +638,15 @@ class SsaCodeGenerator implements HVisitor {
// Remove the element and 'this'.
int argumentCount = node.inputs.length - 2;
String className = compiler.namer.isolatePropertyAccess(superClass);
- String methodName = compiler.namer.instanceMethodName(
- currentLibrary, superMethod.name, argumentCount);
+ String methodName;
+ if (superMethod.kind == ElementKind.FUNCTION ||
+ superMethod.kind == ElementKind.GENERATIVE_CONSTRUCTOR) {
+ methodName = compiler.namer.instanceMethodName(
+ currentLibrary, superMethod.name, argumentCount);
+ } else {
+ methodName = compiler.namer.getterName(currentLibrary, superMethod.name);
+ compiler.registerDynamicGetter(superMethod.name);
ngeoffray 2012/03/20 15:03:49 Please add a comment on why you're registering whe
ahe 2012/03/21 10:09:55 Done.
+ }
buffer.add('$className.prototype.$methodName.call');
visitArguments(node.inputs);
endExpression(JSPrecedence.CALL_PRECEDENCE);
« no previous file with comments | « dart/frog/leg/ssa/builder.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698