Fix reseting of the heap when compiling a module containing multiple functions.

This commit is contained in:
Dan Gohman
2017-10-03 13:30:12 -07:00
parent 31a962fa1b
commit 412fedcc6d

View File

@@ -334,6 +334,7 @@ impl WasmRuntime for Runtime {
self.has_current_memory = None;
self.has_grow_memory = None;
self.func_indices.clear();
self.the_heap = PackedOption::default();
}
fn declare_global(&mut self, global: Global) {
debug_assert!(!self.instantiated);