simplify and optimize attributed variables (#1590, #1634, #1730)

This commit is contained in:
Mark Thom
2023-02-10 00:09:22 -07:00
parent 9454d670c7
commit 359619e035
6 changed files with 289 additions and 243 deletions

View File

@@ -870,7 +870,18 @@ impl Machine {
let l = self.machine_st.trail[i + 1].get_value() as usize;
if l < self.machine_st.hb {
self.machine_st.heap[h] = list_loc_as_cell!(l);
if h == l {
self.machine_st.heap[h] = heap_loc_as_cell!(h);
} else {
read_heap_cell!(self.machine_st.heap[l],
(HeapCellValueTag::Var) => {
self.machine_st.heap[h] = list_loc_as_cell!(l);
}
_ => {
self.machine_st.heap[h] = heap_loc_as_cell!(l);
}
);
}
} else {
self.machine_st.heap[h] = heap_loc_as_cell!(h);
}