about summary refs log tree commit diff
path: root/tests/codegen/inherit_overflow.rs
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2023-12-22 21:42:49 -0500
committerMark Rousskov <mark.simulacrum@gmail.com>2023-12-23 14:10:28 -0500
commit6630d690859d882b2528a39317a701da64fe1203 (patch)
tree46b62bb8bc3550aba198ab860a866c8982ac7fbb /tests/codegen/inherit_overflow.rs
parentedcbcc768a484d52deb315e7c583fe4b2ab4f25b (diff)
downloadrust-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