Files
sdk/runtime
Tess Strickland 7558e63725 [vm,dyn_modules] Change handling of source positions for async returns.
The debugger assumes a null suspend state variable in an asynchronous
function means that the function is still in the prologue prior
to setting up the suspend state. However, the interpreter clears the
suspend state variable before returning, and the debugger needs to be
able to pause before returning when single stepping, so earlier a hack
was added to the debugger that detects being at the direct call of the
async return method and/or the return instruction with a null suspend
state variable.

However, there's a much simpler way of ensuring the debugger pauses
before returning: just emit the source position for the return prior to
clearing the suspend state variable. This also ensures that the debugger
still has access to the function's suspend state when pausing before
the return, instead of waiting until it has been cleared and thus is no
longer accessible.

TEST=ci (should not change the result of any current tests)

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try
Change-Id: I401cceb169d8692ac379cdc5a531e07cafbe9a65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/500740
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2026-06-02 04:28:41 -07:00
..
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2026-06-01 16:57:43 -07:00
2026-06-01 15:34:32 -07:00
2026-05-26 14:38:25 -07:00