mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-16 16:20:49 +00:00
Cleanup
This commit is contained in:
parent
cc656b26a9
commit
782bb384ad
@ -18,6 +18,7 @@ use wasmer_runtime_core::{
|
||||
memory::MemoryType,
|
||||
module::{ModuleInfo, ModuleInner},
|
||||
structures::{Map, TypedIndex},
|
||||
typed_func::Wasm,
|
||||
types::{
|
||||
FuncIndex, FuncSig, ImportedMemoryIndex, LocalFuncIndex, LocalGlobalIndex,
|
||||
LocalMemoryIndex, LocalOrImport, MemoryIndex, SigIndex, Type, Value,
|
||||
@ -459,6 +460,10 @@ impl ProtectedCaller for X64ExecutionContext {
|
||||
})
|
||||
}
|
||||
|
||||
fn get_wasm_trampoline(&self, _module: &ModuleInner, _sig_index: SigIndex) -> Option<Wasm> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn get_early_trapper(&self) -> Box<dyn UserTrapper> {
|
||||
pub struct Trapper;
|
||||
|
||||
|
@ -20,4 +20,11 @@ impl VarArgs {
|
||||
|
||||
unsafe impl WasmExternType for VarArgs {
|
||||
const TYPE: Type = Type::I32;
|
||||
|
||||
fn to_bits(self) -> u64 {
|
||||
self.pointer as u64
|
||||
}
|
||||
fn from_bits(n: u64) -> Self {
|
||||
Self { pointer: n as u32 }
|
||||
}
|
||||
}
|
||||
|
@ -72,6 +72,16 @@ impl<T: Copy + ValueType> WasmPtr<T, Array> {
|
||||
|
||||
unsafe impl<T: Copy, Ty> WasmExternType for WasmPtr<T, Ty> {
|
||||
const TYPE: Type = Type::I32;
|
||||
|
||||
fn to_bits(self) -> u64 {
|
||||
self.offset as u64
|
||||
}
|
||||
fn from_bits(n: u64) -> Self {
|
||||
Self {
|
||||
offset: n as u32,
|
||||
_phantom: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<T: Copy, Ty> ValueType for WasmPtr<T, Ty> {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user