Chromium Code Reviews| Index: pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart |
| diff --git a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart |
| index 0e93623c5fb2ed92aec0b1e231ebeed56e4d7aa1..16a1d15f3665c4198bfe996ea8ea1b05e8b4c694 100644 |
| --- a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart |
| +++ b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart |
| @@ -141,6 +141,7 @@ class ShrinkingReducer extends Pass { |
| // Substitute the invocation argument for the continuation parameter. |
| for (int i = 0; i < invoke.arguments.length; i++) { |
| cont.parameters[i].replaceUsesWith(invoke.arguments[i].definition); |
| + invoke.arguments[i].definition.useElementAsHint(cont.parameters[i].hint); |
|
Kevin Millikin (Google)
2016/01/12 20:10:05
This would be clearer if the name useElementAsHint
asgerf
2016/01/12 20:21:31
Now that we have the ??= operator maybe we should
|
| } |
| // Perform bookkeeping on substituted body and scan for new redexes. |
| @@ -168,6 +169,10 @@ class ShrinkingReducer extends Pass { |
| InvokeContinuation invoke = cont.body; |
| Continuation wrappedCont = invoke.continuation.definition; |
| + for (int i = 0; i < cont.parameters.length; ++i) { |
| + wrappedCont.parameters[i].useElementAsHint(cont.parameters[i].hint); |
| + } |
| + |
| // If the invocation of wrappedCont is escaping, then all invocations of |
| // cont will be as well, after the reduction. |
| if (invoke.isEscapingTry) { |