]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #37336 - michaelwoerister:debuginfo-type-ids, r=eddyb
authorJonathan Turner <jonathandturner@users.noreply.github.com>
Mon, 24 Oct 2016 22:41:29 +0000 (15:41 -0700)
committerGitHub <noreply@github.com>
Mon, 24 Oct 2016 22:41:29 +0000 (15:41 -0700)
commit691ab948ce2d8e2317aff4939f096a61bd67c5b8
tree41110215380d872afe20dddc61e86b52a475e433
parente7da61975f168ff91c55233f489923fa1acd47e9
parent025b27d6c8ba291aececc72eb8b0e5b8232d939d
Rollup merge of #37336 - michaelwoerister:debuginfo-type-ids, r=eddyb

debuginfo: Use TypeIdHasher for generating global debuginfo type IDs.

The only requirement for debuginfo type IDs is that they are globally unique. The `TypeIdHasher` (which is used for `std::intrinsic::type_id()` provides that, so we can get rid of some redundancy by re-using it for debuginfo. Values produced by the `TypeIdHasher` are also more stable than the current `UniqueTypeId` generation algorithm produces -- these incorporate the `NodeId`s, which is not good for incremental compilation.

@alexcrichton @eddyb : Could you take a look at the endianess adaptations that I made to the `TypeIdHasher`?

Also, are we sure that a 64 bit hash is wide enough for something that is supposed to be globally unique? For debuginfo I'm using 160 bits to make sure that we don't run into conflicts there.