restore more tabu_list use to compare_term_tests (#2633)

This commit is contained in:
Mark Thom
2025-04-10 21:06:44 -07:00
committed by Mark Thom
parent 8981ab72d1
commit 549a26dd03

View File

@@ -628,6 +628,12 @@ impl MachineState {
(HeapCellValueTag::PStrLoc, l1) => { (HeapCellValueTag::PStrLoc, l1) => {
read_heap_cell!(v2, read_heap_cell!(v2,
(HeapCellValueTag::PStrLoc, l2) => { (HeapCellValueTag::PStrLoc, l2) => {
if tabu_list.contains(&(l1, l2)) {
continue;
}
tabu_list.insert((l1, l2));
match self.heap.compare_pstr_segments(l1, l2) { match self.heap.compare_pstr_segments(l1, l2) {
PStrSegmentCmpResult::Continue(v1, v2) => { PStrSegmentCmpResult::Continue(v1, v2) => {
self.pdl.push(v1); self.pdl.push(v1);
@@ -642,6 +648,12 @@ impl MachineState {
} }
} }
(HeapCellValueTag::Lis, l2) => { (HeapCellValueTag::Lis, l2) => {
if tabu_list.contains(&(l1, l2)) {
continue;
}
tabu_list.insert((l1, l2));
let (c, succ_cell) = self.heap.last_str_char_and_tail(l1); let (c, succ_cell) = self.heap.last_str_char_and_tail(l1);
self.pdl.push(succ_cell); self.pdl.push(succ_cell);
@@ -651,10 +663,16 @@ impl MachineState {
self.pdl.push(heap_loc_as_cell!(l2)); self.pdl.push(heap_loc_as_cell!(l2));
} }
(HeapCellValueTag::Str, s) => { (HeapCellValueTag::Str, s) => {
if tabu_list.contains(&(l1, s)) {
continue;
}
let (name, arity) = cell_as_atom_cell!(self.heap[s]) let (name, arity) = cell_as_atom_cell!(self.heap[s])
.get_name_and_arity(); .get_name_and_arity();
if name == atom!(".") && arity == 2 { if name == atom!(".") && arity == 2 {
tabu_list.insert((l1, s));
let (c, succ_cell) = self.heap.last_str_char_and_tail(l1); let (c, succ_cell) = self.heap.last_str_char_and_tail(l1);
self.pdl.push(heap_loc_as_cell!(s+2)); self.pdl.push(heap_loc_as_cell!(s+2));