You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[dart2js] Sequence async_lowering and await_lowering correctly.
In phase 1, we apply a kernel transformation to the AST we get from the
CFE. Although there is only one actual Transformer, it applies multiple
logically separate lowerings. In most cases, these lowerings are
independent and operate on distinct parts of the AST, so they "commute"
and no special care must be taken to ensure they're applied in the right
order.
In this case, we have two lowerings which slightly overlap. The
async_lowering implements the `simpleAsyncToFuture` canary feature, and
await_lowering implements some additional semantics which were recently
added to the specification of `await` expressions - see
#50601.
These lowerings overlap on AwaitExpression nodes. The await_lowering can
change the `await`ed expression, while async_lowering simply registers
the `await`ed expression for later use. Therefore, the correct sequence
seems to be await_lowering, then async_lowering.
Change-Id: I5e26ab56271053d69727263d0927266515c12dd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322585
Reviewed-by: Nate Biggs <[email protected]>
Commit-Queue: Mayank Patke <[email protected]>
0 commit comments