Merge branch 'master' into fix/doc-comment-runtimeerror

This commit is contained in:
Ivan Enderlin
2020-04-30 09:47:56 +02:00
committed by GitHub
7 changed files with 9 additions and 19 deletions

View File

@ -54,6 +54,7 @@ impl IsExport for Export {
/// n
/// }
/// ```
#[derive(Clone)]
pub struct ImportObject {
map: Arc<Mutex<HashMap<String, Box<dyn LikeNamespace + Send>>>>,
pub(crate) state_creator:
@ -158,15 +159,6 @@ impl ImportObject {
.and_then(|ns| f(ns))
}
/// Create a clone ref of this namespace.
pub fn clone_ref(&self) -> Self {
Self {
map: Arc::clone(&self.map),
state_creator: self.state_creator.clone(),
allow_missing_functions: false,
}
}
fn get_objects(&self) -> VecDeque<(String, String, Export)> {
let mut out = VecDeque::new();
let guard = self.map.lock().unwrap();

View File

@ -103,7 +103,7 @@ impl Instance {
module,
inner,
exports,
import_object: imports.clone_ref(),
import_object: imports.clone(),
};
if let Some(start_index) = instance.module.info.start_func {