Chromium Code Reviews| 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); |