mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-22 13:11:32 +00:00
Fix some assorted warnings.
This commit is contained in:
@ -111,7 +111,7 @@ pub struct EmscriptenData<'a> {
|
|||||||
pub dyn_call_iii: Option<Func<'a, (i32, i32, i32), i32>>,
|
pub dyn_call_iii: Option<Func<'a, (i32, i32, i32), i32>>,
|
||||||
pub dyn_call_iiii: Option<Func<'a, (i32, i32, i32, i32), i32>>,
|
pub dyn_call_iiii: Option<Func<'a, (i32, i32, i32, i32), i32>>,
|
||||||
pub dyn_call_iifi: Option<Func<'a, (i32, i32, f64, i32), i32>>,
|
pub dyn_call_iifi: Option<Func<'a, (i32, i32, f64, i32), i32>>,
|
||||||
pub dyn_call_v: Option<Func<'a, (i32)>>,
|
pub dyn_call_v: Option<Func<'a, i32>>,
|
||||||
pub dyn_call_vi: Option<Func<'a, (i32, i32)>>,
|
pub dyn_call_vi: Option<Func<'a, (i32, i32)>>,
|
||||||
pub dyn_call_vii: Option<Func<'a, (i32, i32, i32)>>,
|
pub dyn_call_vii: Option<Func<'a, (i32, i32, i32)>>,
|
||||||
pub dyn_call_viii: Option<Func<'a, (i32, i32, i32, i32)>>,
|
pub dyn_call_viii: Option<Func<'a, (i32, i32, i32, i32)>>,
|
||||||
@ -168,7 +168,7 @@ pub struct EmscriptenData<'a> {
|
|||||||
pub temp_ret_0: i32,
|
pub temp_ret_0: i32,
|
||||||
|
|
||||||
pub stack_save: Option<Func<'a, (), i32>>,
|
pub stack_save: Option<Func<'a, (), i32>>,
|
||||||
pub stack_restore: Option<Func<'a, (i32)>>,
|
pub stack_restore: Option<Func<'a, i32>>,
|
||||||
pub set_threw: Option<Func<'a, (i32, i32)>>,
|
pub set_threw: Option<Func<'a, (i32, i32)>>,
|
||||||
pub mapped_dirs: HashMap<String, PathBuf>,
|
pub mapped_dirs: HashMap<String, PathBuf>,
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ fn bench_metering(c: &mut Criterion) {
|
|||||||
let wasm_binary = wat2wasm(WAT).unwrap();
|
let wasm_binary = wat2wasm(WAT).unwrap();
|
||||||
let module = compile_with(&wasm_binary, &compiler).unwrap();
|
let module = compile_with(&wasm_binary, &compiler).unwrap();
|
||||||
let import_object = imports! {};
|
let import_object = imports! {};
|
||||||
let mut instance = module.instantiate(&import_object).unwrap();
|
let instance = module.instantiate(&import_object).unwrap();
|
||||||
let add_to: Func<(i32, i32), i32> = instance.func("add_to").unwrap();
|
let add_to: Func<(i32, i32), i32> = instance.func("add_to").unwrap();
|
||||||
b.iter(|| black_box(add_to.call(100, 4)))
|
b.iter(|| black_box(add_to.call(100, 4)))
|
||||||
})
|
})
|
||||||
@ -202,7 +202,7 @@ fn bench_metering(c: &mut Criterion) {
|
|||||||
"gas" => Func::new(gas),
|
"gas" => Func::new(gas),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
let mut gas_instance = gas_module.instantiate(&gas_import_object).unwrap();
|
let gas_instance = gas_module.instantiate(&gas_import_object).unwrap();
|
||||||
let gas_add_to: Func<(i32, i32), i32> = gas_instance.func("add_to").unwrap();
|
let gas_add_to: Func<(i32, i32), i32> = gas_instance.func("add_to").unwrap();
|
||||||
b.iter(|| black_box(gas_add_to.call(100, 4)))
|
b.iter(|| black_box(gas_add_to.call(100, 4)))
|
||||||
})
|
})
|
||||||
|
@ -4,7 +4,7 @@ use criterion::Criterion;
|
|||||||
use tempfile::tempdir;
|
use tempfile::tempdir;
|
||||||
use wasmer_runtime::{
|
use wasmer_runtime::{
|
||||||
cache::{Cache, FileSystemCache, WasmHash},
|
cache::{Cache, FileSystemCache, WasmHash},
|
||||||
compile, func, imports, instantiate, validate, ImportObject,
|
compile, func, imports, instantiate, validate,
|
||||||
};
|
};
|
||||||
use wasmer_runtime_core::vm::Ctx;
|
use wasmer_runtime_core::vm::Ctx;
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ fn calling_fn_benchmark(c: &mut Criterion) {
|
|||||||
);
|
);
|
||||||
let instance = instantiate(SIMPLE_WASM, &imports).unwrap();
|
let instance = instantiate(SIMPLE_WASM, &imports).unwrap();
|
||||||
c.bench_function("calling fn", move |b| {
|
c.bench_function("calling fn", move |b| {
|
||||||
let entry_point = instance.func::<(i32), i32>("plugin_entrypoint").unwrap();
|
let entry_point = instance.func::<i32, i32>("plugin_entrypoint").unwrap();
|
||||||
b.iter(|| entry_point.call(2).unwrap())
|
b.iter(|| entry_point.call(2).unwrap())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1274,9 +1274,9 @@ impl Emitter for Assembler {
|
|||||||
fn emit_inline_breakpoint(&mut self, ty: InlineBreakpointType) {
|
fn emit_inline_breakpoint(&mut self, ty: InlineBreakpointType) {
|
||||||
dynasm!(self
|
dynasm!(self
|
||||||
; ud2
|
; ud2
|
||||||
; .byte 0x0f ; .byte (0xb9u8 as i8) // ud
|
; .byte 0x0f ; .byte 0xb9u8 as i8 // ud
|
||||||
; int -1
|
; int -1
|
||||||
; .byte (ty as u8 as i8)
|
; .byte ty as u8 as i8
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user