Remove the local field of Module (#2091)
This was added long ago at this point to assist with caching, but caching has moved to a different level such that this wonky second level of a `Module` isn't necessary. This commit removes the `ModuleLocal` type to simplify accessors and generally make it easier to work with.
This commit is contained in:
@@ -39,13 +39,13 @@ pub(crate) fn build_object(
|
||||
unwind_info.extend(funcs.iter().filter_map(|(index, func)| {
|
||||
func.unwind_info
|
||||
.as_ref()
|
||||
.map(|info| ObjectUnwindInfo::Func(module.local.func_index(index), info.clone()))
|
||||
.map(|info| ObjectUnwindInfo::Func(module.func_index(index), info.clone()))
|
||||
}));
|
||||
|
||||
let mut trampolines = PrimaryMap::with_capacity(module.local.signatures.len());
|
||||
let mut trampolines = PrimaryMap::with_capacity(module.signatures.len());
|
||||
let mut cx = FunctionBuilderContext::new();
|
||||
// Build trampolines for every signature.
|
||||
for (i, (_, native_sig)) in module.local.signatures.iter() {
|
||||
for (i, (_, native_sig)) in module.signatures.iter() {
|
||||
let func = build_trampoline(isa, &mut cx, native_sig, std::mem::size_of::<u128>())?;
|
||||
// Preserve trampoline function unwind info.
|
||||
if let Some(info) = &func.unwind_info {
|
||||
|
||||
Reference in New Issue
Block a user