diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-05-11 23:20:22 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-11 23:20:22 -0700 |
| commit | 71afc3088009944fcd8339ac71e69a0b77a781ab (patch) | |
| tree | d370c17e3561870b151d402c1ba1b32813bda83d /src/test.zig | |
| parent | 1ab1a96f87279375e656bba35280a85b62973255 (diff) | |
| download | zig-71afc3088009944fcd8339ac71e69a0b77a781ab.tar.gz zig-71afc3088009944fcd8339ac71e69a0b77a781ab.zip | |
stage2: more Decl lifetime fixes
* File stores `root_decl: Decl` instead of `namespace: *Namespace`.
This maps more cleanly to the actual ownership, since the `File` does
own the root decl, but it does not directly own the `Namespace`.
* `semaFile` completes the creation of the `Decl` even when semantic
analysis fails. The `analysis` field of the `Decl` will contain the
results of semantic analysis. This prevents cleaning up of memory
still referenced by other Decl objects.
* `semaDecl` sets `Struct.zir_index` of the root struct decl, which
fixes use of undefined value in case the first update contained a ZIR
compile error.
Diffstat (limited to 'src/test.zig')
0 files changed, 0 insertions, 0 deletions
