Document emscripten's unwind impl and remove unused function

This commit is contained in:
Brian Anderson 2016-09-27 21:25:52 +00:00
parent badfd6200b
commit 3c038c0505

View File

@ -8,6 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Unwinding for emscripten
//!
//! Whereas Rust's usual unwinding implementation for Unix platforms
//! calls into the libunwind APIs directly, on emscripten we instead
//! call into the C++ unwinding APIs. This is just an expedience since
//! emscripten's runtime always implements those APIs and does not
//! implement libunwind.
#![allow(private_no_mangle_fns)]
use core::any::Any;
@ -55,12 +63,6 @@ unsafe extern "C" fn rust_eh_personality(version: c_int,
context)
}
#[lang = "eh_unwind_resume"]
#[unwind]
unsafe extern "C" fn rust_eh_unwind_resume(panic_ctx: *mut u8) -> ! {
uw::_Unwind_Resume(panic_ctx as *mut uw::_Unwind_Exception);
}
extern {
fn __cxa_allocate_exception(thrown_size: libc::size_t) -> *mut libc::c_void;
fn __cxa_free_exception(thrown_exception: *mut libc::c_void);