add details when calling unimplemented!

This commit is contained in:
Patrick Ventuzelo
2019-10-03 11:26:54 +02:00
parent c8e9530805
commit 4b3880c88b
14 changed files with 54 additions and 51 deletions

View File

@ -22,11 +22,11 @@ pub trait Instance {
type Error: Debug;
fn call(&mut self, id: usize, args: &[Value]) -> Result<u128, Self::Error>;
fn read_memory(&mut self, _offset: u32, _len: u32) -> Result<Vec<u8>, Self::Error> {
unimplemented!()
unimplemented!("Instance::read_memory")
}
fn write_memory(&mut self, _offset: u32, _len: u32, _buf: &[u8]) -> Result<(), Self::Error> {
unimplemented!()
unimplemented!("Instance::write_memory")
}
}
@ -122,15 +122,15 @@ unsafe impl Sync for CodeMemory {}
#[cfg(not(unix))]
impl CodeMemory {
pub fn new(_size: usize) -> CodeMemory {
unimplemented!();
unimplemented!("CodeMemory::new");
}
pub fn make_executable(&self) {
unimplemented!();
unimplemented!("CodeMemory::make_executable");
}
pub fn make_writable(&self) {
unimplemented!();
unimplemented!("CodeMemory::make_writable");
}
}

View File

@ -916,15 +916,15 @@ mod vm_ctx_tests {
}
fn get_trampoline(&self, _module: &ModuleInfo, _sig_index: SigIndex) -> Option<Wasm> {
unimplemented!()
unimplemented!("generate_module::get_trampoline")
}
unsafe fn do_early_trap(&self, _: Box<dyn Any>) -> ! {
unimplemented!()
unimplemented!("generate_module::do_early_trap")
}
}
impl CacheGen for Placeholder {
fn generate_cache(&self) -> Result<(Box<[u8]>, Memory), CacheError> {
unimplemented!()
unimplemented!("generate_module::generate_cache")
}
}

View File

@ -150,11 +150,11 @@ pub unsafe extern "C" fn local_table_grow(
let _ = table_index;
let _ = delta;
let _ = ctx;
unimplemented!()
unimplemented!("vmcalls::local_table_grow")
}
pub unsafe extern "C" fn local_table_size(ctx: &vm::Ctx, table_index: LocalTableIndex) -> u32 {
let _ = table_index;
let _ = ctx;
unimplemented!()
unimplemented!("vmcalls::local_table_size")
}