Store module name on wasmtime_environ::Module (#1309)

* Store module name on `wasmtime_environ::Module`

This keeps all name information in one place so we dont' have to keep
extra structures around in `wasmtime::Module`.

* rustfmt
This commit is contained in:
Alex Crichton
2020-03-13 17:51:10 -05:00
committed by GitHub
parent 922b49744b
commit 65e32b3660
8 changed files with 47 additions and 47 deletions

View File

@@ -141,6 +141,9 @@ pub struct Module {
/// A unique identifier (within this process) for this module.
pub id: usize,
/// The name of this wasm module, often found in the wasm file.
pub name: Option<String>,
/// Local information about a module which is the bare minimum necessary to
/// translate a function body. This is derived as `Hash` whereas this module
/// isn't, since it contains too much information needed to translate a
@@ -222,6 +225,7 @@ impl Module {
Self {
id: NEXT_ID.fetch_add(1, SeqCst),
name: None,
imported_funcs: PrimaryMap::new(),
imported_tables: PrimaryMap::new(),
imported_memories: PrimaryMap::new(),