Merge branch 'master' of ssh://github.com/mthom/scryer-prolog

This commit is contained in:
Mark
2023-10-11 10:11:50 -06:00
2 changed files with 13 additions and 7 deletions

View File

@@ -86,17 +86,23 @@ impl<'a> EagerStackfulPreOrderHeapIter<'a> {
let arity = cell_as_atom_cell!(self.heap[s]).get_arity();
for idx in (s + 1 .. s + arity + 1).rev() {
if self.heap[idx].get_mark_bit() != self.mark_phase {
self.iter_stack.push(self.heap[idx]);
self.heap[idx].set_mark_bit(self.mark_phase);
}
}
}
(HeapCellValueTag::Lis, l) => {
if self.heap[l+1].get_mark_bit() != self.mark_phase {
self.iter_stack.push(self.heap[l+1]);
self.iter_stack.push(self.heap[l]);
self.heap[l].set_mark_bit(self.mark_phase);
self.heap[l+1].set_mark_bit(self.mark_phase);
}
if self.heap[l].get_mark_bit() != self.mark_phase {
self.iter_stack.push(self.heap[l]);
self.heap[l].set_mark_bit(self.mark_phase);
}
}
(HeapCellValueTag::AttrVar | HeapCellValueTag::Var, h) => {
let var_value = self.heap[h];
self.heap[h].set_mark_bit(self.mark_phase);

View File

@@ -45,7 +45,7 @@ test("term_variables#2097", (
test("term_variables#2100", (
termt2(T), term_variables(T,Vs),
T = [[T|_B]|_A], Vs == [_A,_B]
T = [[T|A]|B], Vs == [A,B]
)).
test("term_variables#2101", (