diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2025-01-03 23:48:27 +0000 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2025-01-04 05:44:29 +0000 |
| commit | f818098971fdafdaaa6af4b927f2cf47332ed5f7 (patch) | |
| tree | 68692d31a8c939887864ec302d8e8378c7c87cfd /src/Compilation.zig | |
| parent | 814491f59921600b8a0137733b48d4b0f6b99d78 (diff) | |
| download | zig-f818098971fdafdaaa6af4b927f2cf47332ed5f7.tar.gz zig-f818098971fdafdaaa6af4b927f2cf47332ed5f7.zip | |
incremental: correctly return `error.AnalysisFail` when type structure changes
`Zcu.PerThead.ensureTypeUpToDate` is set up in such a way that it only
returns the updated type the first time it is called. In general, that's
okay; however, the exception is that we want the function to continue
returning `error.AnalysisFail` when the type has been lost, or its
number of captures changed.
Therefore, the check for this case now happens before the up-to-date
success return.
For simplicity, the number of captures is now handled by intentionally
losing the instruction in `Zcu.mapOldZirToNew`, since there is nothing
to gain from tracking a type when old instances of it can never be
reused.
Diffstat (limited to 'src/Compilation.zig')
0 files changed, 0 insertions, 0 deletions
