| Age | Commit message (Collapse) | Author |
|
when the llvm type has not been fully analyzed. This is a regression
from lazy values.
|
|
The comment added by this commit is copied here:
For macOS stack traces, we want to avoid having to parse the compilation unit debug
info. As long as each debug info file has a path independent of the compilation unit
directory (DW_AT_comp_dir), then we never have to look at the compilation unit debug
info. If we provide an absolute path to LLVM here for the compilation unit debug info,
LLVM will emit DWARF info that depends on DW_AT_comp_dir. To avoid this, we pass "."
for the compilation unit directory. This forces each debug file to have a directory
rather than be relative to DW_AT_comp_dir. According to DWARF 5, debug files will
no longer reference DW_AT_comp_dir, for the purpose of being able to support the
common practice of stripping all but the line number sections from an executable.
closes #2700
|
|
When `@frameSize` is never called, and `@asyncCall` on a runtime-known
pointer is never used, no prefix data for async functions is needed.
Related: #3160
|
|
Closes #2791. See that issue for more details; I documented the
debugging process quite thoroughly on this one.
|
|
|
|
* `await @asyncCall` generates better code. See #3065
* `@asyncCall` works with a real `@Frame(func)` in addition to
a byte slice. Closes #3072
* `@asyncCall` allows passing `{}` (a void value) as the result
pointer, which uses the result location inside the frame.
Closes #3068
* support `await @asyncCall` on a non-async function. This is in
preparation for safe recursion (#1006).
|
|
related: #1627
|
|
which heap allocate their own frames
related: #1006
|
|
closes #3067
|
|
|
|
|
|
closes #1850
|
|
...with optional unwrapping with var initialized to undefined
|
|
this case works now:
```zig
const Expr = union(enum) {
Literal: u8,
Question: *Expr,
};
```
|
|
this case works now:
```zig
const A = struct {
b_list_pointer: *const []B,
};
const B = struct {
a_pointer: *const A,
};
const b_list: []B = [_]B{};
const a = A{ .b_list_pointer = &b_list };
const obj = B{ .a_pointer = &a };
```
|
|
this case now works:
```zig
const A = struct {
b: B,
};
const B = fn (A) void;
```
|
|
|
|
|
|
see #2174
|
|
See #3063
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fixes async function tests in optimized builds
|
|
|
|
to prepare for fixing u128 alignment issues
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all behavior tests passing in this branch
|
|
|
|
|
|
|
|
* add safety panic for resuming a function which is returning, pending
an await
* remove IrInstructionResultPtr
* add IrInstructionReturnBegin. This does the early return in async
functions; does nothing in normal functions.
* `await` gets a result location
* `analyze_fn_async` will call `analyze_fn_body` if necessary.
* async function frames have a result pointer field for themselves
to access and one for the awaiter to supply before the atomic rmw.
when returning, async functions copy the result to the awaiter result
pointer, if it is non-null.
* async function frames have a stack trace pointer which is supplied by
the awaiter before the atomicrmw. Later in the frame is a stack trace
struct and addresses, which is used for its own calls and awaits.
* when awaiting an async function, if an early return occurred, the
awaiter tail resumes the frame.
* when an async function returns, early return does a suspend
(in IrInstructionReturnBegin) before copying
the error return trace data, result, and running the defers.
After the last defer runs, the frame will no longer be accessed.
* proper acquire/release atomic ordering attributes in async functions.
|
|
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.
|