Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlansneff committed Apr 9, 2019
1 parent c212ba3 commit 0745274
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/dynasm-backend/src/codegen_x64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;

Expand Down
7 changes: 7 additions & 0 deletions lib/emscripten/src/varargs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
}
10 changes: 10 additions & 0 deletions lib/wasi/src/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {}
Expand Down

0 comments on commit 0745274

Please sign in to comment.