Move native signatures out of Module (#2362)

After compilation there's actually no need to hold onto the native
signature for a wasm function type, so this commit moves out the
`ir::Signature` value from a `Module` into a separate field that's
deallocated when compilation is finished. This simplifies the
`SignatureRegistry` because it only needs to track wasm functino types
and it also means less work is done for `Func::wrap`.
This commit is contained in:
Alex Crichton
2020-11-04 14:22:37 -06:00
committed by GitHub
parent dd9bfcefaa
commit 6b137c2a3d
13 changed files with 65 additions and 66 deletions

View File

@@ -158,8 +158,7 @@ impl Compiler {
vec![]
};
let (obj, unwind_info) =
build_object(&*self.isa, &translation.module, &funcs, dwarf_sections)?;
let (obj, unwind_info) = build_object(&*self.isa, &translation, &funcs, dwarf_sections)?;
Ok(Compilation {
obj,