Add typed functions and weird type parameter things

This commit is contained in:
Lachlan Sneff
2019-02-02 15:28:50 -08:00
parent 6c33aa5803
commit eba66f3b33
24 changed files with 706 additions and 463 deletions

View File

@ -3,14 +3,14 @@ use super::process::_abort;
use wasmer_runtime_core::vm::Ctx;
/// emscripten: ___cxa_allocate_exception
pub extern "C" fn ___cxa_allocate_exception(size: u32, ctx: &mut Ctx) -> u32 {
pub fn ___cxa_allocate_exception(size: u32, ctx: &mut Ctx) -> u32 {
debug!("emscripten::___cxa_allocate_exception");
env::call_malloc(size as _, ctx)
}
/// emscripten: ___cxa_throw
/// TODO: We don't have support for exceptions yet
pub extern "C" fn ___cxa_throw(_ptr: u32, _ty: u32, _destructor: u32, ctx: &mut Ctx) {
pub fn ___cxa_throw(_ptr: u32, _ty: u32, _destructor: u32, ctx: &mut Ctx) {
debug!("emscripten::___cxa_throw");
_abort(ctx);
}