mirror of
https://github.com/dart-lang/sdk
synced 2024-10-02 23:24:42 +00:00
Describe new async/async*/sync* implementation in CHANGELOG.
Issue: https://github.com/dart-lang/sdk/issues/48378 Change-Id: I0cfff561a06c402603ad4f2b977821b572cb6e21 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250408 Reviewed-by: Slava Egorov <vegorov@google.com> Auto-Submit: Alexander Markov <alexmarkov@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
37a105266f
commit
5a067e91bb
23
CHANGELOG.md
23
CHANGELOG.md
|
@ -34,6 +34,29 @@
|
|||
|
||||
- Deprecates `BidirectionalIterator`.
|
||||
|
||||
### Dart VM
|
||||
|
||||
Implementation of `async`/`async*`/`sync*` is revamped in Dart VM,
|
||||
both in JIT and AOT modes. This also affects Flutter except Flutter Web.
|
||||
|
||||
Besides smaller code size and better performance of async methods,
|
||||
the new implementation carries a few subtle changes in behavior:
|
||||
|
||||
- If `async` method returns before reaching the first `await`, it now returns a completed Future.
|
||||
Previously `async` methods completed resulting Future in separate microtasks.
|
||||
|
||||
- Stack traces no longer have duplicate entries for `async` methods.
|
||||
|
||||
- New implementation now correctly throws an error if `null` occurs as
|
||||
an argument of a logical expression (`&&` and `||`) which also contains
|
||||
an `await`.
|
||||
|
||||
- New implementation avoids unnecessary extending the liveness of local
|
||||
variables in `async`/`async*`/`sync*` methods, which means that unused
|
||||
objects stored in local variables in such methods might be garbage
|
||||
collected earlier than they were before
|
||||
(see issue [#36983](https://github.com/dart-lang/sdk/issues/36983) for details).
|
||||
|
||||
## 2.18.0
|
||||
|
||||
### Language
|
||||
|
|
Loading…
Reference in a new issue