Move the signature registry into Engine.
This commit moves the shared signature registry out of `Store` and into `Engine`. This helps eliminate work that was performed whenever a `Module` was instantiated into a `Store`. Now a `Module` is registered with the shared signature registry upon creation, storing the mapping from the module's signature index space to the shared index space. This also refactors the "frame info" registry into a general purpose "module registry" that is used to look up trap information, signature information, and (soon) stack map information.
This commit is contained in:
@@ -753,7 +753,7 @@ pub struct StackMapRegistry {
|
||||
struct StackMapRegistryInner {
|
||||
/// A map from the highest pc in a module, to its stack maps.
|
||||
///
|
||||
/// For details, see the comment above `GlobalFrameInfo::ranges`.
|
||||
/// For details, see the comment above `GlobalModuleRegistry`.
|
||||
ranges: BTreeMap<usize, ModuleStackMaps>,
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//! use a thread-local to store information about how to unwind. Additionally
|
||||
//! this requires that the check of whether a pc is a wasm trap or not is a
|
||||
//! global check rather than a per-thread check. This necessitates the existence
|
||||
//! of `GlobalFrameInfo` in the `wasmtime` crate.
|
||||
//! of `GlobalModuleRegistry` in the `wasmtime` crate.
|
||||
//!
|
||||
//! Otherwise this file heavily uses the `mach` Rust crate for type and
|
||||
//! function declarations. Many bits and pieces are copied or translated from
|
||||
|
||||
Reference in New Issue
Block a user