-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
std: Optimize panic::catch_unwind slightly #35444
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
fn do_call<F: FnOnce() -> R, R>(data: *mut u8) { | ||
unsafe { | ||
let data = data as *mut Data<F, R>; | ||
let f = mem::replace(&mut (*data).f, mem::uninitialized()); |
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.
ptr::read
.
8a75cb0
to
2420e81
Compare
☔ The latest upstream changes (presumably #34866) made this pull request unmergeable. Please resolve the merge conflicts. |
The previous implementation of this function was overly conservative with liberal usage of `Option` and `.unwrap()` which in theory never triggers. This commit essentially removes the `Option`s in favor of unsafe implementations, improving the code generation of the fast path for LLVM to see through what's happening more clearly. cc rust-lang#34727
2420e81
to
045c8c8
Compare
r? @brson |
@bors r+ |
📌 Commit 045c8c8 has been approved by |
… r=brson std: Optimize panic::catch_unwind slightly The previous implementation of this function was overly conservative with liberal usage of `Option` and `.unwrap()` which in theory never triggers. This commit essentially removes the `Option`s in favor of unsafe implementations, improving the code generation of the fast path for LLVM to see through what's happening more clearly. cc rust-lang#34727
… r=brson std: Optimize panic::catch_unwind slightly The previous implementation of this function was overly conservative with liberal usage of `Option` and `.unwrap()` which in theory never triggers. This commit essentially removes the `Option`s in favor of unsafe implementations, improving the code generation of the fast path for LLVM to see through what's happening more clearly. cc rust-lang#34727
⌛ Testing commit 045c8c8 with merge 367b59e... |
💔 Test failed - auto-linux-64-debug-opt |
@bors: retry On Sat, Aug 13, 2016 at 3:29 PM, bors [email protected] wrote:
|
@bors rollup |
… r=brson std: Optimize panic::catch_unwind slightly The previous implementation of this function was overly conservative with liberal usage of `Option` and `.unwrap()` which in theory never triggers. This commit essentially removes the `Option`s in favor of unsafe implementations, improving the code generation of the fast path for LLVM to see through what's happening more clearly. cc rust-lang#34727
… r=brson std: Optimize panic::catch_unwind slightly The previous implementation of this function was overly conservative with liberal usage of `Option` and `.unwrap()` which in theory never triggers. This commit essentially removes the `Option`s in favor of unsafe implementations, improving the code generation of the fast path for LLVM to see through what's happening more clearly. cc rust-lang#34727
Rollup of 30 pull requests - Successful merges: #34941, #35392, #35444, #35447, #35491, #35533, #35539, #35558, #35573, #35574, #35577, #35586, #35588, #35594, #35596, #35597, #35598, #35606, #35611, #35615, #35616, #35620, #35622, #35640, #35643, #35644, #35646, #35647, #35648, #35661 - Failed merges: #35395, #35415
The previous implementation of this function was overly conservative with
liberal usage of
Option
and.unwrap()
which in theory never triggers. Thiscommit essentially removes the
Option
s in favor of unsafe implementations,improving the code generation of the fast path for LLVM to see through what's
happening more clearly.
cc #34727