Skip to content
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

Merged
merged 6 commits into from Oct 23, 2017

Conversation

Projects
None yet
4 participants
@fitzgen
Copy link
Member

fitzgen commented Oct 13, 2017

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.

@highfive

This comment has been minimized.

Copy link
Collaborator

highfive commented Oct 13, 2017

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@emilio

emilio approved these changes Oct 21, 2017

Copy link
Collaborator

emilio left a comment

r=me, sorry for the lag getting to this :(

}

TypeKind::Comp(ref info) => {
trace!(" comp considers its own methods and bases");
let mut result = HasVtableResult::default();

This comment has been minimized.

@emilio

emilio Oct 21, 2017

Collaborator

I think it's clearer and shorter if you use No here directly instead of default.

@fitzgen fitzgen force-pushed the fitzgen:explicit-vtable-pointer-refactor branch from 28ebbc6 to 6f87f0b Oct 23, 2017

@fitzgen

This comment has been minimized.

Copy link
Member Author

fitzgen commented Oct 23, 2017

Addressed feedback and rebased -- thanks @emilio !

@bors-servo r+

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Oct 23, 2017

📌 Commit 6f87f0b has been approved by fitzgen

@highfive highfive assigned fitzgen and unassigned emilio Oct 23, 2017

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Oct 23, 2017

⌛️ Testing commit 6f87f0b with merge 17adb13...

bors-servo added a commit that referenced this pull request Oct 23, 2017

Auto merge of #1084 - fitzgen:explicit-vtable-pointer-refactor, r=fit…
…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.
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Oct 23, 2017

☀️ Test successful - status-travis
Approved by: fitzgen
Pushing 17adb13 to master...

@bors-servo bors-servo merged commit 6f87f0b into rust-lang:master Oct 23, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.