-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
VM: Implement "Control Flow Collections" #36214
Comments
Just for proper book-keeping, the following CL provides an initial implementation of block expressions in the Dart VM: https://dart-review.googlesource.com/c/sdk/+/94441 This should provide a fully functional implementation to continue testing, even though it still has some issues that could be improved (e.g. for now we just disable OSR completely while running control flow collections code for simplicity; this may be unacceptable in the long run). |
Current status of control flow collections tests
|
Some CFE CLs related to if-statements were submitted: https://dart-review.googlesource.com/c/sdk/+/97200 for-loops still pending: |
New status (AOT change is probably due to changes to status file beyond my skip/no-skip change).
|
Found #36377 |
This morning's status:
|
Probably biggest VM item left to be explored is enabling OSR points inside control flow collection for loops. Alex notes we should ensure that temporaries on the expression stack are preserved when OSR happens. Consider a more complex expression like
In this case x, 42, bazz() and 'abc' should be on the expression stack unless CFE introduces temporary variables for them. Let's: |
If there is no more compiler backend work left to be done on this we can close the issue, a new issue can be opened to track the OSR optimization and it will not be a blocker for the 2.3 release. |
Sounds good. I will do that. |
Tracking OSR follow up in #36421 |
Issue: #36214 Issue: #36218 Change-Id: I39149b82cb93c1cb87c64cf9c41c56b753bba13a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98400 Reviewed-by: Aart Bik <ajcbik@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com> Auto-Submit: Alexander Markov <alexmarkov@google.com>
Rationale: Follows the documented grammar to allow for arbitary nested spead/if/for inside collections (list, set, maps). #36218 #36214 Change-Id: Ie5b5828a323401c4db14045e6edd0587677f2c19 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98261 Reviewed-by: Aart Bik <ajcbik@google.com> Reviewed-by: Vyacheslav Egorov <vegorov@google.com> Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Aart Bik <ajcbik@google.com>
Rationale: This enables OSR even in the presence of block expressions, which are introduced by the new CFE control-flow collections and spread operations. Faster is better! #36421 #36218 #36214 Change-Id: I363a0b0a5becbbd5743f8fb47ff24dcebc0e4d64 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98744 Commit-Queue: Aart Bik <ajcbik@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>
Rationale: Test was borderline timeout. The reduced tripcount still triggers OSR consistently, but runs a lot faster. #36421 #36218 #36214 Change-Id: I60917bb6bdd51dee6bd11d1fe5beede4753c2147 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99783 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Aart Bik <ajcbik@google.com>
Initially these features are behind the experimental flag control-flow-collections.
See:
Language tracking issue: dart-lang/language#165
Feature specification
Implementation plan
PENDING Unified Collections: dart-lang/language#200
The text was updated successfully, but these errors were encountered: