mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-22 21:21:33 +00:00
fix(llvm-backend) Remove unused variables or functions.
This commit is contained in:
@ -449,9 +449,8 @@ impl<'a> CtxType<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn memory(&mut self, index: MemoryIndex) -> MemoryCache {
|
pub fn memory(&mut self, index: MemoryIndex) -> MemoryCache {
|
||||||
let (cached_memories, builder, info, ctx_ptr_value, intrinsics, cache_builder) = (
|
let (cached_memories, info, ctx_ptr_value, intrinsics, cache_builder) = (
|
||||||
&mut self.cached_memories,
|
&mut self.cached_memories,
|
||||||
self.builder,
|
|
||||||
self.info,
|
self.info,
|
||||||
self.ctx_ptr_value,
|
self.ctx_ptr_value,
|
||||||
self.intrinsics,
|
self.intrinsics,
|
||||||
@ -607,10 +606,8 @@ impl<'a> CtxType<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn dynamic_sigindex(&mut self, index: SigIndex) -> IntValue {
|
pub fn dynamic_sigindex(&mut self, index: SigIndex) -> IntValue {
|
||||||
let (cached_sigindices, builder, info, ctx_ptr_value, intrinsics, cache_builder) = (
|
let (cached_sigindices, ctx_ptr_value, intrinsics, cache_builder) = (
|
||||||
&mut self.cached_sigindices,
|
&mut self.cached_sigindices,
|
||||||
self.builder,
|
|
||||||
self.info,
|
|
||||||
self.ctx_ptr_value,
|
self.ctx_ptr_value,
|
||||||
self.intrinsics,
|
self.intrinsics,
|
||||||
&self.cache_builder,
|
&self.cache_builder,
|
||||||
@ -640,9 +637,8 @@ impl<'a> CtxType<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn global_cache(&mut self, index: GlobalIndex) -> GlobalCache {
|
pub fn global_cache(&mut self, index: GlobalIndex) -> GlobalCache {
|
||||||
let (cached_globals, builder, ctx_ptr_value, info, intrinsics, cache_builder) = (
|
let (cached_globals, ctx_ptr_value, info, intrinsics, cache_builder) = (
|
||||||
&mut self.cached_globals,
|
&mut self.cached_globals,
|
||||||
self.builder,
|
|
||||||
self.ctx_ptr_value,
|
self.ctx_ptr_value,
|
||||||
self.info,
|
self.info,
|
||||||
self.intrinsics,
|
self.intrinsics,
|
||||||
@ -717,9 +713,8 @@ impl<'a> CtxType<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn imported_func(&mut self, index: ImportedFuncIndex) -> (PointerValue, PointerValue) {
|
pub fn imported_func(&mut self, index: ImportedFuncIndex) -> (PointerValue, PointerValue) {
|
||||||
let (cached_imported_functions, builder, ctx_ptr_value, intrinsics, cache_builder) = (
|
let (cached_imported_functions, ctx_ptr_value, intrinsics, cache_builder) = (
|
||||||
&mut self.cached_imported_functions,
|
&mut self.cached_imported_functions,
|
||||||
self.builder,
|
|
||||||
self.ctx_ptr_value,
|
self.ctx_ptr_value,
|
||||||
self.intrinsics,
|
self.intrinsics,
|
||||||
&self.cache_builder,
|
&self.cache_builder,
|
||||||
@ -759,38 +754,4 @@ impl<'a> CtxType<'a> {
|
|||||||
|
|
||||||
(imported_func_cache.func_ptr, imported_func_cache.ctx_ptr)
|
(imported_func_cache.func_ptr, imported_func_cache.ctx_ptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build_trap(&self) {
|
|
||||||
self.builder.build_call(self.intrinsics.trap, &[], "trap");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// pub struct Ctx {
|
|
||||||
// /// A pointer to an array of locally-defined memories, indexed by `MemoryIndex`.
|
|
||||||
// pub(crate) memories: *mut *mut LocalMemory,
|
|
||||||
|
|
||||||
// /// A pointer to an array of locally-defined tables, indexed by `TableIndex`.
|
|
||||||
// pub(crate) tables: *mut *mut LocalTable,
|
|
||||||
|
|
||||||
// /// A pointer to an array of locally-defined globals, indexed by `GlobalIndex`.
|
|
||||||
// pub(crate) globals: *mut *mut LocalGlobal,
|
|
||||||
|
|
||||||
// /// A pointer to an array of imported memories, indexed by `MemoryIndex,
|
|
||||||
// pub(crate) imported_memories: *mut *mut LocalMemory,
|
|
||||||
|
|
||||||
// /// A pointer to an array of imported tables, indexed by `TableIndex`.
|
|
||||||
// pub(crate) imported_tables: *mut *mut LocalTable,
|
|
||||||
|
|
||||||
// /// A pointer to an array of imported globals, indexed by `GlobalIndex`.
|
|
||||||
// pub(crate) imported_globals: *mut *mut LocalGlobal,
|
|
||||||
|
|
||||||
// /// A pointer to an array of imported functions, indexed by `FuncIndex`.
|
|
||||||
// pub(crate) imported_funcs: *mut ImportedFunc,
|
|
||||||
|
|
||||||
// local_backing: *mut LocalBacking,
|
|
||||||
// import_backing: *mut ImportBacking,
|
|
||||||
// module: *const ModuleInner,
|
|
||||||
|
|
||||||
// pub data: *mut c_void,
|
|
||||||
// pub data_finalizer: Option<extern "C" fn(data: *mut c_void)>,
|
|
||||||
// }
|
|
||||||
|
Reference in New Issue
Block a user