do not print unbound vars at toplevel

This commit is contained in:
Mark Thom
2019-03-23 09:43:05 -06:00
parent 380375228b
commit 0b79ae0524
2 changed files with 14 additions and 1 deletions

View File

@@ -249,7 +249,18 @@ impl Machine {
Ok(())
}
pub fn remove_unbound_vars(&self, heap_locs: &mut HeapVarDict) {
for (var, addr) in heap_locs.clone() {
match self.machine_st.store(self.machine_st.deref(addr.clone())) {
new_addr =>
if addr.is_ref() && new_addr == addr {
heap_locs.remove(&var);
}
}
}
}
pub fn add_batched_code(&mut self, code: Code, code_dir: CodeDir)
{
// error detection has finished, so update the master index of keys.