Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (revision 29362) |
| +++ sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (working copy) |
| @@ -1541,9 +1541,11 @@ |
| compiler); |
| return receiverType.refine(selector, compiler); |
| } |
| - // If [JSInvocationMirror._invokeOn] has been called, we must not create a |
| - // typed selector based on the receiver type. |
| - return backend.compiler.enabledInvokeOn ? selector.asUntyped : selector; |
| + // If [JSInvocationMirror._invokeOn] is enabled, and this call |
| + // might hit a `noSuchMethod`, we register an untyped selector. |
| + bool canReachAll = compiler.enabledInvokeOn |
|
kasperl
2013/10/29 08:35:27
Could we move this code to the selector?
ngeoffray
2013/10/29 09:19:28
Done.
|
| + && selector.mask.needsNoSuchMethodHandling(selector, compiler); |
| + return canReachAll ? selector.asUntyped : selector; |
| } |
| void registerMethodInvoke(HInvokeDynamic node) { |