Update to new runtime

This commit is contained in:
Brandon Fish
2019-01-23 01:27:13 -06:00
parent 3e9ef57d9d
commit 157183d212
17 changed files with 397 additions and 414 deletions

View File

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