Create a Context class to group together various state objects.

This commit is contained in:
Dan Gohman
2019-01-31 14:43:32 -08:00
parent 4675948c2a
commit 8b140cc748
8 changed files with 235 additions and 127 deletions

View File

@@ -760,8 +760,6 @@ impl Instance {
pub fn lookup(&mut self, field: &str) -> Option<Export> {
let export = if let Some(export) = self.module.exports.get(field) {
export.clone()
} else if let Some(export) = self.mmap_field.contents().lookup_global_export(field) {
return Some(export.clone());
} else {
return None;
};