Skip to content

[CP] dart2wasm async and sync* fixes to stable #55847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
osa1 opened this issue May 27, 2024 · 4 comments
Closed

[CP] dart2wasm async and sync* fixes to stable #55847

osa1 opened this issue May 27, 2024 · 4 comments
Assignees
Labels
area-dart2wasm Issues for the dart2wasm compiler. cherry-pick-approved Label for approved cherrypick request cherry-pick-review Issue that need cherry pick triage to approve

Comments

@osa1
Copy link
Member

osa1 commented May 27, 2024

Commit(s) to merge

6de879e, 7e237a1, eabb2b3, e44bc22, 350954a, 8ccb412, e7dde83, 3863e78, 829261e, fab56db

Target

stable

Prepared changelist for beta/stable

https://dart-review.googlesource.com/c/sdk/+/368300

Issue Description

Users are currently missing a lot of async and sync* bug fixes, and unable to use exception handling (try/catch) or switch statements (when the statement has a yield in the body).

What is the fix

Cherry pick the fixes and implementations.

Why cherry-pick

Users are missing bug fixes and some of the sync* features are simply unimplemented in the latest release.

Risk

Medium. While these changes include a lot of refactoring, no new features were added and a lot of bugs were fixed.

Issue link(s)

#55347, #55457, #51343, #51342 and probably more. (some of the fix commits didn't link to issues)

Extra Info

No response

@mkustermann
Copy link
Member

LGTM

Since CI is green on this CP, I have no worries about it being risky. It CL looks big but

  • it's mostly moving code from one place to another (i.e. includes a refactoring)
  • fixes a number of issues (i.e. makes our stable branch more stable - which is it's purpose)
  • it makes the code on stable branch closer to main, so any future CPs, will get easier to merge if need be (**)

(**) The alternative is to hand-craft a fix for stable channel, which could make the CL a bit smaller, but will cause diverging of the main & stable branches.

@osa1 osa1 added the area-dart2wasm Issues for the dart2wasm compiler. label May 28, 2024
@athomas athomas added the cherry-pick-approved Label for approved cherrypick request label May 28, 2024
copybara-service bot pushed a commit that referenced this issue May 29, 2024
This cherry-picks commits:

6de879e - [dart2wasm] Fix exception handling in async functions
7e237a1 - [dart2wasm] Small refactoring in async code generator
eabb2b3 - [dart2wasm] Catch JS exceptions in async functions
e44bc22 - [dart2wasm] Fix bug in restoration of `this` in async functions.
350954a - [dart2wasm] Fix `this` restoration code in sync* handling.
8ccb412 - [dart2wasm] Move type parameter bounds checks & parameter type check logic together with logic setting up variables
e7dde83 - [dart2wasm] Port VM fix for #52083 (sync*)
3863e78 - [dart2wasm] Move yield finder to a shared library
829261e - [dart2wasm] Move async compiler utilities to state_machine library
fab56db - [dart2wasm] Move common code generation routines to state_machine, fix sync*

Bugs: #55347, #55457, #51343, #51342
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/368300
Cherry-pick-request: #55847
Change-Id: I0a4186533fbdf4c5727911295ad48696a90f715f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368300
Commit-Queue: Ömer Ağacan <[email protected]>
Reviewed-by: Martin Kustermann <[email protected]>
Commit-Queue: Martin Kustermann <[email protected]>
@osa1
Copy link
Member Author

osa1 commented May 29, 2024

Cherry-pick merged as fbbb836.

@osa1 osa1 closed this as completed May 29, 2024
@mkustermann mkustermann reopened this May 29, 2024
@mkustermann
Copy link
Member

I think the issue stays open until it was released on stable (see https://github.com/dart-lang/sdk/blob/main/docs/Cherry-picks-to-a-release-channel.md#submitting-the-cherry-pick)

@athomas
Copy link
Member

athomas commented Jun 3, 2024

Released in 3.4.2 stable.

@athomas athomas closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart2wasm Issues for the dart2wasm compiler. cherry-pick-approved Label for approved cherrypick request cherry-pick-review Issue that need cherry pick triage to approve
Projects
None yet
Development

No branches or pull requests

6 participants