-
Notifications
You must be signed in to change notification settings - Fork 13k
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
cache dtorck constraints on ADTs #41485
Conversation
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.
r=me modulo cleanup nits
@@ -1332,17 +1334,6 @@ impl<'a, 'tcx> ParameterEnvironment<'tcx> { | |||
pub struct Destructor { | |||
/// The def-id of the destructor method | |||
pub did: DefId, |
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.
Can this struct be replaced with just DefId?
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.
I want to be more clear that this is the method def-id, rather than the impl-defid.
depth: usize, | ||
ty: Ty<'tcx>) | ||
-> Result<ty::DtorckConstraint<'tcx>, ErrorReported> | ||
{ |
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.
Does this need to be in librustc?
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 is used on both "local" and "remote" providers, and typeck
provides only "local" things. I bet you can bypass that.
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.
I already added something in librustc/ty/mod.rs
like that (also see the driver). We'll clean it up when we have more uniform intercrate caching.
3c13198
to
6d01b88
Compare
@bors r=eddyb |
📌 Commit 6d01b88 has been approved by |
⌛ Testing commit 6d01b88 with merge 3004380... |
💔 Test failed - status-travis |
This avoids visiting the fields of all structs multiple times, improving item-bodies checking time by 10% (!).
stupid "refactored and didn't clean up" error @bors r=eddyb |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 6d01b88 has been approved by |
@bors r- |
6d01b88
to
d3476f4
Compare
@bors r=eddyb |
📌 Commit d3476f4 has been approved by |
cache dtorck constraints on ADTs This avoids visiting the fields of all structs multiple times, improving item-bodies checking time by 10% (!). Not sure whether we want this in 1.18 or 1.19. It's a big-ish patch, but the 10% win is very tempting. r? @eddyb
☀️ Test successful - status-appveyor, status-travis |
This avoids visiting the fields of all structs multiple times, improving item-bodies checking time by 10% (!).
Not sure whether we want this in 1.18 or 1.19. It's a big-ish patch, but the 10% win is very tempting.
r? @eddyb