about summary refs log tree commit diff
path: root/src/liballoc_jemalloc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-10-15 06:08:55 -0700
committerGitHub <noreply@github.com>2016-10-15 06:08:55 -0700
commit8e05e7ee3c19a5594b79d67c8390cef78970be7c (patch)
treee0615a78412f64068e45b563b9fa6f83728e723a /src/liballoc_jemalloc
parent030bc49bb44834e691fd67452b39b438fa6d826d (diff)
parent48b3dd11f59f48819031206ee2b3ab98ceae1550 (diff)
downloadrust-8e05e7ee3c19a5594b79d67c8390cef78970be7c.tar.gz
rust-8e05e7ee3c19a5594b79d67c8390cef78970be7c.zip
Auto merge of #37100 - dikaiosune:master, r=eddyb
Change Substs to type alias for Slice<Kind> for interning

This changes the definition of `librustc::ty::subst::Substs` to be a type alias to `Slice<Kind>`. `Substs` was already interned, but can now make use of the efficient `PartialEq` and `Hash` impls on `librustc::ty::Slice`.

I'm working on collecting some timing data for this, will update when it's done.

I chose to leave the impls on `Substs<'tcx>` even though it's now just a type alias to `Slice<Kind<'tcx>>` because it has the smallest footprint on other portions of the compiler which depend on its API. It turns out to be a pretty huge diff if you change where Substs's methods live :smile:. That said, I'm not necessarily sure it's the *best* implementation but it's probably the easiest/smallest to review.

Many thanks to @eddyb for both suggesting this as a project for learning more about the compiler, and the tireless ~~handholding~~ mentorship he provided.
Diffstat (limited to 'src/liballoc_jemalloc')
0 files changed, 0 insertions, 0 deletions