aboutsummaryrefslogtreecommitdiff
path: root/src/Package/Module.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-02-17 01:18:54 +0000
committermlugg <mlugg@mlugg.co.uk>2024-03-06 21:26:37 +0000
commit975b859377dee450418ae9ed572ec9d3c0b77312 (patch)
tree08a86de7c929deb2a86deb5b587f35bb980ca500 /src/Package/Module.zig
parenta6ca20b9a1dfc7b6e8d004cb166c0714bb8db2db (diff)
downloadzig-975b859377dee450418ae9ed572ec9d3c0b77312.tar.gz
zig-975b859377dee450418ae9ed572ec9d3c0b77312.zip
InternPool: create specialized functions for loading namespace types
Namespace types (`struct`, `enum`, `union`, `opaque`) do not use structural equality - equivalence is based on their Decl index (and soon will change to AST node + captures). However, we previously stored all other information in the corresponding `InternPool.Key` anyway. For logical consistency, it makes sense to have the key only be the true key (that is, the Decl index) and to load all other data through another function. This introduces those functions, by the name of `loadStructType` etc. It's a big diff, but most of it is no-brainer changes. In future, it might be nice to eliminate a bunch of the loaded state in favour of accessor functions on the `LoadedXyzType` types (like how we have `LoadedUnionType.size()`), but that can be explored at a later date.
Diffstat (limited to 'src/Package/Module.zig')
0 files changed, 0 insertions, 0 deletions