dart-sdk/runtime
Alexander Markov bf4bb95308 [vm] New async/await implementation in the VM, part 2 - vm
The new implementation moves away from desugaring of async
functions on kernel AST, state machine generated in the flow graph and
capturing all local variables in the context.

Instead, async/await is implemented using a few stubs
(InitSuspendableFunction, Suspend, Resume, Return and
AsyncExceptionHandler). The stubs are implemented in a
platform-independent way using (macro-)assembler helpers.
When suspending a function, its frame is copied into a SuspendState
object, and when resuming a function it is copied back onto the stack.
No extra code is generated for accessing local variables.
Callback closures are created lazily on the first await.

Design doc: go/compact-async-await.

Part 1 (kernel): https://dart-review.googlesource.com/c/sdk/+/241842

TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: Ibad757035b7cc438ebdff80b460728b1d3eff1f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242000
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-04-29 01:03:50 +00:00
..
bin [format] Remove multiline comment that gcc errors on. 2022-04-21 22:30:59 +00:00
docs [vm] Expose whether extension stream has listeners, guard postEvent 2022-04-26 07:53:43 +00:00
include [dart:io] Publish implementations of the VM file callbacks. 2022-04-19 23:27:17 +00:00
lib [vm] New async/await implementation in the VM, part 2 - vm 2022-04-29 01:03:50 +00:00
observatory [vm] Expose whether extension stream has listeners, guard postEvent 2022-04-26 07:53:43 +00:00
observatory_2 [vm] Expose whether extension stream has listeners, guard postEvent 2022-04-26 07:53:43 +00:00
platform Revert "[build] Fix Android build for ARM64 Mac." 2022-04-20 23:13:29 +00:00
tests [vm] Fix assertion failure during class finalization 2022-04-27 19:19:54 +00:00
third_party [vm] More pieces of Windows ARM support. 2022-04-07 23:15:48 +00:00
tools move runtime/tools/wiki/xref_extractor to package:lints 2022-04-19 15:39:57 +00:00
vm [vm] New async/await implementation in the VM, part 2 - vm 2022-04-29 01:03:50 +00:00
.clang-tidy
.gitignore
BUILD.gn [build] -fno-strict-vtable-pointers is a Clang-only flag. 2022-03-30 17:34:20 +00:00
codereview.settings
configs.gni Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target" 2020-06-17 16:12:26 +00:00
CPPLINT.cfg
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
PRESUBMIT.py [python3] Migrate PRESUBMIT.py files 2021-08-16 08:29:54 +00:00
runtime_args.gni [VM] error: ‘mallinfo mallinfo()’ is deprecated 2021-12-08 00:25:10 +00:00