-
Notifications
You must be signed in to change notification settings - Fork 13.3k
incr.comp.: Make DepNode's std::fmt::Debug implementation useful again. #42625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@bors r+ |
📌 Commit 5b5499d has been approved by |
@bors r- |
let (def_id_0, def_id_1) = *self; | ||
|
||
let def_path_hash_0 = tcx.def_path_hash(def_id_0); | ||
let def_path_hash_1 = tcx.def_path_hash(def_id_1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd be good to add a comment clarifying that this is a micro-opt, and the generic impl also suffices
…mance optimization
@bors r+ |
📌 Commit e323652 has been approved by |
⌛ Testing commit e323652 with merge 9430800... |
💔 Test failed - status-travis |
@bors retry (looks like a time-out) |
incr.comp.: Make DepNode's std::fmt::Debug implementation useful again. With #42537 a regular `DepNode` only contains an opaque hash as its identifier. In most cases, this hash is actually a `DefPathHash` and we can reconstruct the `DefId` it came from via a table lookup --- and then use that to print something intelligible for debug outputs. For cases where we cannot reconstruct information from the DepNode's hash, this PR will cache a string representation of the `DepNode` in a side-table. This string is later used for debug outputs. r? @nikomatsakis
💔 Test failed - status-travis |
@bors retry
|
Hm so the timed out build compared to the previous successful build shows that stage0-rustc jumped from 1000s to 2600s and stage1-rustc jumped from 1300s to 3500s. This PR doesn't seem particularly at fault, I'm messaging Travis to hopefully clarify |
incr.comp.: Make DepNode's std::fmt::Debug implementation useful again. With #42537 a regular `DepNode` only contains an opaque hash as its identifier. In most cases, this hash is actually a `DefPathHash` and we can reconstruct the `DefId` it came from via a table lookup --- and then use that to print something intelligible for debug outputs. For cases where we cannot reconstruct information from the DepNode's hash, this PR will cache a string representation of the `DepNode` in a side-table. This string is later used for debug outputs. r? @nikomatsakis
☀️ Test successful - status-appveyor, status-travis |
With #42537 a regular
DepNode
only contains an opaque hash as its identifier. In most cases, this hash is actually aDefPathHash
and we can reconstruct theDefId
it came from via a table lookup --- and then use that to print something intelligible for debug outputs. For cases where we cannot reconstruct information from the DepNode's hash, this PR will cache a string representation of theDepNode
in a side-table. This string is later used for debug outputs.r? @nikomatsakis