few comments.

This commit is contained in:
Yury Delendik
2019-09-09 16:52:44 -05:00
committed by Dan Gohman
parent 263fa098a1
commit ee26b9ead7
2 changed files with 5 additions and 1 deletions

View File

@@ -110,7 +110,8 @@ impl Instance {
let export = mutable.lookup(name).expect("export"); let export = mutable.lookup(name).expect("export");
if let wasmtime_runtime::Export::Function { signature, .. } = &export { if let wasmtime_runtime::Export::Function { signature, .. } = &export {
// HACK ensure all handles, instantiated outside Store, present in // HACK ensure all handles, instantiated outside Store, present in
// the store's SignatureRegistry. // the store's SignatureRegistry, e.g. WASI instances that are
// imported into this store using the from_handle() method.
use crate::runtime::SignatureRegistry; use crate::runtime::SignatureRegistry;
let _ = store.borrow_mut().register_cranelift_signature(signature); let _ = store.borrow_mut().register_cranelift_signature(signature);
} }

View File

@@ -79,6 +79,9 @@ impl Engine {
// Store // Store
/// The SignatureRegistry allow register new cranelift signature,
/// and also quickly retrive the signature back using registration
/// index.
pub(crate) trait SignatureRegistry { pub(crate) trait SignatureRegistry {
fn register_cranelift_signature( fn register_cranelift_signature(
&mut self, &mut self,