diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-08-14 08:10:49 +0100 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-08-17 18:50:10 -0400 |
| commit | 46388d338a93a35d139866411f80115a03b30a6a (patch) | |
| tree | 57cd962b1fec235a99b808d2a2877bc4bcbd5f05 /src/Compilation.zig | |
| parent | 978fe68a65be2b5a1551ab5eafdcdbfa467ba891 (diff) | |
| download | zig-46388d338a93a35d139866411f80115a03b30a6a.tar.gz zig-46388d338a93a35d139866411f80115a03b30a6a.zip | |
InternPool: don't remove outdated types
When a type becomes outdated, there will still be lingering references
to the old index -- for instance, any declaration whose value was that
type holds a reference to that index. These references may live for an
arbitrarily long time in some cases. So, we can't just remove the type
from the pool -- the old `Index` must remain valid!
Instead, we want to preserve the old `Index`, but avoid it from ever
appearing in lookups. (It's okay if analysis of something referencing
the old `Index` does weird stuff -- such analysis are guaranteed by the
incremental compilation model to always be unreferenced.) So, we use the
new `InternPool.putKeyReplace` to replace the shard entry for this index
with the newly-created index.
Diffstat (limited to 'src/Compilation.zig')
0 files changed, 0 insertions, 0 deletions
