diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2023-12-22 21:42:49 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2023-12-23 14:10:28 -0500 |
| commit | 6630d690859d882b2528a39317a701da64fe1203 (patch) | |
| tree | 46b62bb8bc3550aba198ab860a866c8982ac7fbb /tests/codegen/inherit_overflow.rs | |
| parent | edcbcc768a484d52deb315e7c583fe4b2ab4f25b (diff) | |
| download | rust-6630d690859d882b2528a39317a701da64fe1203.tar.gz rust-6630d690859d882b2528a39317a701da64fe1203.zip | |
Specialize DefPathHash table to skip crate IDs
Instead, we store just the local crate hash as a bare u64. On decoding, we recombine it with the crate's stable crate ID stored separately in metadata. The end result is that we save ~8 bytes/DefIndex in metadata size. One key detail here is that we no longer distinguish in encoded metadata between present and non-present DefPathHashes. It used to be highly likely we could distinguish as we used DefPathHash::default(), an all-zero representation. However in theory even that is fallible as nothing strictly prevents the StableCrateId from being zero.
Diffstat (limited to 'tests/codegen/inherit_overflow.rs')
0 files changed, 0 insertions, 0 deletions
