Chromium Code Reviews| Index: lib/compiler/implementation/ssa/codegen.dart |
| diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart |
| index 09f624da902f16300122bbe88e5b5f642baab321..90d447ab091975872bd0f2ac22fbd1429c2c47b3 100644 |
| --- a/lib/compiler/implementation/ssa/codegen.dart |
| +++ b/lib/compiler/implementation/ssa/codegen.dart |
| @@ -1483,6 +1483,10 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| // Register this invocation to collect the types used at all call sites. |
| Selector selector = getOptimizedSelectorFor(node, node.selector); |
| + if (node.selector.name.slowToString() == 'foo' || |
|
ngeoffray
2012/10/26 08:34:55
Remove
Johnni Winther
2012/10/26 10:18:01
Done.
|
| + node.selector.name.slowToString() == 'bar') { |
| + print('getOptimizedSelectorFor($node)=$selector, target=${target}'); |
| + } |
| backend.registerDynamicInvocation(node, selector, types); |
| // If we don't know what we're calling or if we are calling a getter, |
| @@ -1513,6 +1517,14 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| Selector defaultSelector) { |
| // TODO(4434): For private members we need to use the untyped selector. |
| if (defaultSelector.name.isPrivate()) return defaultSelector; |
| + // If [noSuchMethod] has been overridden and [InvocationMirror.invokeOn] |
| + // has been called we must not create a typed selector based on the receiver |
| + // type. |
| + if (node.element == null && // Invocation is not exact. |
| + backend.compiler.enabledNoSuchMethod && |
|
ngeoffray
2012/10/26 08:34:55
I think you can just check enabledInvokeOn.
Johnni Winther
2012/10/26 10:18:01
Done.
|
| + backend.compiler.enabledInvokeOn) { |
| + return defaultSelector; |
| + } |
| HType receiverHType = types[node.inputs[0]]; |
| DartType receiverType = receiverHType.computeType(compiler); |
| if (receiverType != null) { |