-
Notifications
You must be signed in to change notification settings - Fork 700
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
Explicit vtable pointer refactor #1084
Explicit vtable pointer refactor #1084
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, sorry for the lag getting to this :(
src/ir/analysis/has_vtable.rs
Outdated
} | ||
|
||
TypeKind::Comp(ref info) => { | ||
trace!(" comp considers its own methods and bases"); | ||
let mut result = HasVtableResult::default(); |
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 think it's clearer and shorter if you use No
here directly instead of default
.
We didn't previously handle this case until the `HasVtableAnalysis` was updated to determine which items have explicit vtable pointers.
28ebbc6
to
6f87f0b
Compare
Addressed feedback and rebased -- thanks @emilio ! @bors-servo r+ |
📌 Commit 6f87f0b has been approved by |
…zgen Explicit vtable pointer refactor r? @emilio This should make it easier to move padding into its own pass, rather than inside codegen, which should in turn let us start handling (or at least intelligently determining when we *can't* handle) `#pragma pack(..)` and other things that affect layout in exotic ways that we can only indirectly observe. See each commit for details. The reason for the first commit is this: when we compare, we rustfmt both expected and actual, so the expectations don't get updated to be formatted nicely until some patch that changes what gets generated. This is annoying, however, when debugging some minor difference, and not being able to see what it is easily. Best to just bite the bullet and format all the expectations the once and make the problem go away.
☀️ Test successful - status-travis |
r? @emilio
This should make it easier to move padding into its own pass, rather than inside codegen, which should in turn let us start handling (or at least intelligently determining when we can't handle)
#pragma pack(..)
and other things that affect layout in exotic ways that we can only indirectly observe.See each commit for details.
The reason for the first commit is this: when we compare, we rustfmt both expected and actual, so the expectations don't get updated to be formatted nicely until some patch that changes what gets generated. This is annoying, however, when debugging some minor difference, and not being able to see what it is easily. Best to just bite the bullet and format all the expectations the once and make the problem go away.