aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/c.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-06-10 01:22:54 +0100
committermlugg <mlugg@mlugg.co.uk>2024-06-15 00:57:52 +0100
commite39cc0dff7fff510c3d72f61947b977589ea5583 (patch)
tree5d7c405520d5c898c46a517820bd331526b7852d /src/codegen/c.zig
parent82a934bb912241809ac8029e1fa5843092a7fdf6 (diff)
downloadzig-e39cc0dff7fff510c3d72f61947b977589ea5583.tar.gz
zig-e39cc0dff7fff510c3d72f61947b977589ea5583.zip
Zir: use absolute nodes for declarations and type declarations
The justification for using relative source nodes in ZIR is that it allows source locations -- which may be serialized across incremental updates -- to be relative to the source location of their containing declaration. However, having those "baseline" instructions themselves be relative to their own parent is counterproductive, since the source location updating problem is only being moved to `Decl`. Storing the absolute node here instead makes more sense, since it allows for this source location update logic to be elided entirely in the future by storing a `TrackedInst.Index` to resolve a source location relative to rather than a `Decl.Index`.
Diffstat (limited to 'src/codegen/c.zig')
0 files changed, 0 insertions, 0 deletions