diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-08-05 03:10:14 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-08-05 03:10:14 -0400 |
| commit | 20f63e588e62c4a7250bc96c9e5b54c8106ad1af (patch) | |
| tree | bc138766dfe7938b12891e3856e2cab3a4eece26 /src/errmsg.cpp | |
| parent | dfe8c5a2e9b1778c1911e987c9286d05db307fe7 (diff) | |
| download | zig-20f63e588e62c4a7250bc96c9e5b54c8106ad1af.tar.gz zig-20f63e588e62c4a7250bc96c9e5b54c8106ad1af.zip | |
async functions have error return traces where appropriate
however the traces are not merged on `await` or async function calls
yet.
When an async function has an error set or error union as its return
type, it has a `StackTrace` before the args in the frame, so that it is
accessible from `anyframe->T` awaiters. However when it does not have an
errorable return type, but it does call or await an errorable, it has a
stack trace just before the locals. This way when doing an `@asyncCall`
on an async function pointer, it can populate the args (which are after
the `StackTrace`) because it knows the offset of the args based only on
the return type.
This sort of matches normal functions, where a stack trace pointer could
be supplied by a parameter, or it could be supplied by the stack of the
function, depending on whether the function itself is errorable.
Diffstat (limited to 'src/errmsg.cpp')
0 files changed, 0 insertions, 0 deletions
