Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart b/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart |
| index ecfd632a94ade143e068422c5a19c17c3362ae84..103c8d67e988dc88dab2f4c5ef38905fb4d286ef 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart |
| @@ -256,7 +256,16 @@ class SsaSimplifyInterceptors extends HBaseVisitor |
| } |
| bool rewriteToUseSelfAsInterceptor(HInterceptor node, HInstruction receiver) { |
| - node.block.rewrite(node, receiver); |
| + for (HInstruction user in node.usedBy.toList()) { |
| + if (user is HIs) { |
| + user.changeUse(node, receiver); |
| + } else { |
| + // Use the potentially self-argument as new receiver. Note that the |
| + // self-argument could potentially have a tighter type than the |
| + // receiver which was the input to the interceptor. |
|
sra1
2014/05/08 03:34:35
Please add a test/guard against 'use' being an arg
floitsch
2014/05/08 18:21:56
Done.
|
| + user.changeUse(node, user.inputs[1]); |
| + } |
| + } |
| return false; |
| } |