mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-26 07:01:33 +00:00
Moved ctx to be the first argument in emscripten
This commit is contained in:
@ -3,7 +3,7 @@ use libc::{c_int, c_void, memcpy, size_t};
|
||||
use wasmer_runtime_core::vm::Ctx;
|
||||
|
||||
/// emscripten: _emscripten_memcpy_big
|
||||
pub fn _emscripten_memcpy_big(dest: u32, src: u32, len: u32, ctx: &mut Ctx) -> u32 {
|
||||
pub fn _emscripten_memcpy_big(ctx: &mut Ctx, dest: u32, src: u32, len: u32) -> u32 {
|
||||
debug!(
|
||||
"emscripten::_emscripten_memcpy_big {}, {}, {}",
|
||||
dest, src, len
|
||||
@ -35,12 +35,12 @@ pub fn enlarge_memory(_ctx: &mut Ctx) -> u32 {
|
||||
/// emscripten: abortOnCannotGrowMemory
|
||||
pub fn abort_on_cannot_grow_memory(ctx: &mut Ctx) -> u32 {
|
||||
debug!("emscripten::abort_on_cannot_grow_memory");
|
||||
abort_with_message("Cannot enlarge memory arrays!", ctx);
|
||||
abort_with_message(ctx, "Cannot enlarge memory arrays!");
|
||||
0
|
||||
}
|
||||
|
||||
/// emscripten: ___map_file
|
||||
pub fn ___map_file(_one: u32, _two: u32, _ctx: &mut Ctx) -> c_int {
|
||||
pub fn ___map_file(_ctx: &mut Ctx, _one: u32, _two: u32) -> c_int {
|
||||
debug!("emscripten::___map_file");
|
||||
// NOTE: TODO: Em returns -1 here as well. May need to implement properly
|
||||
-1
|
||||
|
Reference in New Issue
Block a user