| 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..daae053db2f3174496973980e20166c67caecb2c 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/interceptor_simplifier.dart
|
| @@ -256,7 +256,18 @@ 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.
|
| + assert(user.inputs[0] == node);
|
| + assert(receiver.nonCheck() == user.inputs[1].nonCheck());
|
| + user.changeUse(node, user.inputs[1]);
|
| + }
|
| + }
|
| return false;
|
| }
|
|
|
|
|