Port wasmer-emscripten to use WasmerEnv

This commit is contained in:
Mark McCaskey
2020-11-17 16:19:00 -08:00
parent 38b296e36f
commit 2b0464a4b2
11 changed files with 352 additions and 341 deletions

View File

@@ -124,8 +124,7 @@ pub unsafe fn copy_cstr_into_wasm(ctx: &mut EmEnv, cstr: *const c_char) -> u32 {
pub unsafe fn allocate_on_stack<'a, T: Copy>(ctx: &'a mut EmEnv, count: u32) -> (u32, &'a mut [T]) {
let offset = get_emscripten_data(ctx)
.stack_alloc
.as_ref()
.stack_alloc_ref()
.unwrap()
.call(count * (size_of::<T>() as u32))
.unwrap();