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:
Alex Crichton
2020-08-04 12:29:16 -05:00
committed by GitHub
parent c21fe0eb73
commit 3d2e0e55f2
26 changed files with 131 additions and 164 deletions

View File

@@ -72,7 +72,7 @@ impl ProfilingAgent for NullProfilerAgent {
#[allow(dead_code)]
fn debug_name(module: &Module, index: DefinedFuncIndex) -> String {
let index = module.local.func_index(index);
let index = module.func_index(index);
match module.func_names.get(&index) {
Some(s) => s.clone(),
None => format!("wasm::wasm-function[{}]", index.index()),