-
Notifications
You must be signed in to change notification settings - Fork 694
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
Rewrite has destructor
analysis as a fixed-point analysis
#932
Conversation
r? @fitzgen |
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.
Looks great! Thanks @bd339 !
Just one nitpick to be addressed below and then we can merge this :)
src/ir/comp.rs
Outdated
@@ -989,6 +943,11 @@ impl CompInfo { | |||
return self.has_own_virtual_method; | |||
} | |||
|
|||
/// Does this type have a destructor? | |||
pub fn has_destructor(&self) -> bool { | |||
self.has_destructor |
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.
Let's rename these to either trivially_has_destructor
or has_own_destructor
to clarify that this isn't looking through template instantiations or base members.
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.
Sure, good idea.
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.
Let me know when you update the PR, sometimes I don't get the new-commits-pushed emails for whatever reason. Thanks again!
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.
Have done so, but squashed and did a force push. Maybe that's why you didn't get an email?
…e monotone framework
1832892
to
cd41e5c
Compare
@bors-servo r+ @bd339 thanks a bunch! Are you interested in hacking on bindgen some more? #933 could be a good issue to pick up, if you're interested :) |
📌 Commit cd41e5c has been approved by |
Rewrite `has destructor` analysis as a fixed-point analysis Fixes #927 . Note that this creates a dependency between the "cannot derive copy" and "has destructor" analysis, i.e. the "has destructor" analysis must run before the "cannot derive copy" analysis, because "cannot derive copy" needs the results of "has destructor".
☀️ Test successful - status-travis |
Fixes #927 . Note that this creates a dependency between the "cannot derive copy" and "has destructor" analysis, i.e. the "has destructor" analysis must run before the "cannot derive copy" analysis, because "cannot derive copy" needs the results of "has destructor".