]> git.lizzy.rs Git - rust.git/commit
Shrink `SubregionOrigin`.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 12 Sep 2019 03:29:32 +0000 (13:29 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Thu, 12 Sep 2019 03:36:01 +0000 (13:36 +1000)
commit7f0637da5144c7435e88ea3805021882f077d50c
tree92596d57c675c314cf4091cdaa731963c3017737
parent2b8116dced2c6c5d02e1c4359e89dc0919d6001b
Shrink `SubregionOrigin`.

It's currently 120 bytes on x86-64, due to one oversized variant
(`Subtype`). This commit boxes `Subtype`'s contents, reducing the size
of `SubregionOrigin` to 32 bytes.

The change speeds things up by avoiding lots of `memcpy` calls, mostly
relating to `RegionConstraintData::constraints`, which is a `BTreeMap`
with `SubregionOrigin` values.
src/librustc/infer/equate.rs
src/librustc/infer/error_reporting/nice_region_error/placeholder_error.rs
src/librustc/infer/error_reporting/note.rs
src/librustc/infer/glb.rs
src/librustc/infer/lub.rs
src/librustc/infer/mod.rs
src/librustc/infer/sub.rs