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:
@@ -229,10 +229,9 @@ pub fn create_handle_with_function(
|
||||
// First up we manufacture a trampoline which has the ABI specified by `ft`
|
||||
// and calls into `stub_fn`...
|
||||
let sig_id = module
|
||||
.local
|
||||
.signatures
|
||||
.push((ft.to_wasm_func_type(), sig.clone()));
|
||||
let func_id = module.local.functions.push(sig_id);
|
||||
let func_id = module.functions.push(sig_id);
|
||||
module
|
||||
.exports
|
||||
.insert("trampoline".to_string(), EntityIndex::Function(func_id));
|
||||
@@ -289,10 +288,9 @@ pub unsafe fn create_handle_with_raw_function(
|
||||
let mut trampolines = HashMap::new();
|
||||
|
||||
let sig_id = module
|
||||
.local
|
||||
.signatures
|
||||
.push((ft.to_wasm_func_type(), sig.clone()));
|
||||
let func_id = module.local.functions.push(sig_id);
|
||||
let func_id = module.functions.push(sig_id);
|
||||
module
|
||||
.exports
|
||||
.insert("trampoline".to_string(), EntityIndex::Function(func_id));
|
||||
|
||||
Reference in New Issue
Block a user