clean up (second pass)

This commit is contained in:
Mark McCaskey
2019-03-27 14:08:17 -07:00
parent 09068c1a74
commit 315d8286c4
6 changed files with 9 additions and 2 deletions

View File

@ -39,7 +39,7 @@ impl Drop for InstanceInner {
pub struct Instance {
module: Arc<ModuleInner>,
inner: Box<InstanceInner>,
#[allow(dead_code)]
import_object: ImportObject,
}

View File

@ -72,7 +72,8 @@ pub fn compile_with(
.map(|inner| module::Module::new(Arc::new(inner)))
}
/// The same as `compile_with` but takes a symbol map for use with debugging
/// The same as `compile_with` but changes the compiler behavior
/// with the values in the `CompilerConfig`
pub fn compile_with_config(
wasm: &[u8],
compiler: &dyn backend::Compiler,

View File

@ -57,6 +57,7 @@ pub struct ModuleInfo {
pub namespace_table: StringTable<NamespaceIndex>,
pub name_table: StringTable<NameIndex>,
/// Symbol information from emscripten
pub em_symbol_map: Option<HashMap<u32, String>>,
}

View File

@ -159,6 +159,7 @@ impl Ctx {
}
}
/// Gives access to the emscripten symbol map, used for debugging
pub unsafe fn borrow_symbol_map(&self) -> &Option<HashMap<u32, String>> {
&(*self.module).info.em_symbol_map
}