7558e63725
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>
This package contains Dart bytecode compiler.
Status: experimental
NOTE: This package is currently experimental and not published or included in the SDK.
Do not take dependency on this package unless you are prepared for breaking changes and possibly removal of this code at any point in time.