report pre-marked values from eager stackful iterator (#2097)

This commit is contained in:
Mark
2023-10-10 11:13:42 -06:00
parent c9df19ca30
commit 77de570aa4
2 changed files with 19 additions and 0 deletions

View File

@@ -59,6 +59,14 @@ impl<'a> EagerStackfulPreOrderHeapIter<'a> {
fn follow(&mut self) -> Option<HeapCellValue> {
while let Some(value) = self.iter_stack.pop() {
if value.get_mark_bit() == self.mark_phase {
if value.is_var() {
let h = value.get_value() as usize;
if self.heap[h].is_var() && self.heap[h].get_value() as usize == h {
return Some(unmark_cell_bits!(value));
}
}
continue;
}