aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-05-11 23:20:22 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-05-11 23:20:22 -0700
commit71afc3088009944fcd8339ac71e69a0b77a781ab (patch)
treed370c17e3561870b151d402c1ba1b32813bda83d /src/codegen
parent1ab1a96f87279375e656bba35280a85b62973255 (diff)
downloadzig-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/codegen')
0 files changed, 0 insertions, 0 deletions