Add memory and register checking when required in the VM

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-02-09 14:10:02 -05:00
parent f1ed41f98b
commit 00027c4542
4 changed files with 71 additions and 44 deletions

View File

@@ -54,7 +54,6 @@ impl<'a> Assemble<'a> {
});
}
}
self.symbols.globals_mut().extend(exports);
}
@@ -151,6 +150,8 @@ impl<'a> Assemble<'a> {
}
}
}
// TODO : make sure we aren't trying to export anything that doesn't exist
// only return exports if specified
if export {
labels.retain(|k, _| exports.contains(k));