-
Notifications
You must be signed in to change notification settings - Fork 13.8k
compiler: remove AbiAlign inside TargetDataLayout #147116
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
This maintains AbiAlign usage in public API and most of the compiler, but direct access of these fields is now in terms of Align only.
Some changes occurred in cfg and check-cfg configuration cc @Urgau |
The job Click to see the possible cause of the failure (guessed by this bot)
|
...I have no idea how this affected rustdoc. |
It's protocol errors so likely a test suite error. |
LGTM @bors r+ |
AbiAlign::new(if c == self.default_address_space { | ||
self.default_address_space_pointer_spec.pointer_align | ||
} else if let Some(e) = self.address_space_info.iter().find(|(a, _)| a == &c) { |
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.
Remark: In general I'm not fond of putting a complex conditional in the constructor call; I would have written this as let align = ...;
followed by a separate AbiAlign::new(align)
.
(But in the context of a big ongoing cleanup it's also not worth haggling over, so whatever.)
Rollup merge of #147116 - workingjubilee:remove-tdl-abialign, r=Zalathar compiler: remove AbiAlign inside TargetDataLayout AbiAlign is a thin wrapper around Align, extant mostly because we used to track a separate quasi-notion of alignment that was never a real notion of alignment and removing all of it at once was too churny. This PR maintains AbiAlign usage in public API and most of the compiler, but direct access of these fields for TargetDataLayout is now in terms of Align only.
Rollup of 3 pull requests Successful merges: - rust-lang/rust#147100 (tests: Remove ignore-android directive for fixed issue) - rust-lang/rust#147116 (compiler: remove AbiAlign inside TargetDataLayout) - rust-lang/rust#147134 (remove explicit deref of AbiAlign for most methods) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 3 pull requests Successful merges: - rust-lang/rust#147100 (tests: Remove ignore-android directive for fixed issue) - rust-lang/rust#147116 (compiler: remove AbiAlign inside TargetDataLayout) - rust-lang/rust#147134 (remove explicit deref of AbiAlign for most methods) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 3 pull requests Successful merges: - rust-lang/rust#147100 (tests: Remove ignore-android directive for fixed issue) - rust-lang/rust#147116 (compiler: remove AbiAlign inside TargetDataLayout) - rust-lang/rust#147134 (remove explicit deref of AbiAlign for most methods) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 3 pull requests Successful merges: - rust-lang/rust#147100 (tests: Remove ignore-android directive for fixed issue) - rust-lang/rust#147116 (compiler: remove AbiAlign inside TargetDataLayout) - rust-lang/rust#147134 (remove explicit deref of AbiAlign for most methods) r? `@ghost` `@rustbot` modify labels: rollup
AbiAlign is a thin wrapper around Align, extant mostly because we used to track a separate quasi-notion of alignment that was never a real notion of alignment and removing all of it at once was too churny. This PR maintains AbiAlign usage in public API and most of the compiler, but direct access of these fields for TargetDataLayout is now in terms of Align only.
This PR is about the size limit I hit before it started to seem exhausting to continue working on or review, as changes elsewhere double the amount of "rest-of-compiler" code that gets touched.