record names of variables at root in write_term_to_heap (#487)
This commit is contained in:
@@ -267,11 +267,15 @@ impl<'a> TermWriter<'a> {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
&TermRef::AnonVar(Level::Root) | &TermRef::Constant(Level::Root, ..) |
|
||||
&TermRef::Var(Level::Root, ..) => {
|
||||
&TermRef::AnonVar(Level::Root) | &TermRef::Constant(Level::Root, ..) => {
|
||||
let addr = self.term_as_addr(&term, h);
|
||||
self.machine_st.heap.push(HeapCellValue::Addr(addr));
|
||||
}
|
||||
&TermRef::Var(Level::Root, _, ref var) => {
|
||||
let addr = self.term_as_addr(&term, h);
|
||||
self.var_dict.insert(var.clone(), Addr::HeapCell(h));
|
||||
self.machine_st.heap.push(HeapCellValue::Addr(addr));
|
||||
}
|
||||
&TermRef::AnonVar(_) => {
|
||||
if let Some((arity, site_h)) = self.queue.pop_front() {
|
||||
if arity > 1 {
|
||||
|
||||
Reference in New Issue
Block a user