provide read_term_from_chars/2 (#334)

This commit is contained in:
Mark Thom
2020-04-12 17:26:11 -06:00
parent 7621155a89
commit d3a9392421
6 changed files with 147 additions and 63 deletions

View File

@@ -208,10 +208,7 @@ impl<'a> TermWriter<'a> {
&TermRef::AnonVar(Level::Root) | &TermRef::Constant(Level::Root, ..) |
&TermRef::Var(Level::Root, ..) => {
let addr = self.term_as_addr(&term, h);
if !addr.is_heap_bound() {
self.machine_st.heap.push(HeapCellValue::Addr(addr));
}
self.machine_st.heap.push(HeapCellValue::Addr(addr));
}
&TermRef::AnonVar(_) => {
if let Some((arity, site_h)) = self.queue.pop_front() {