@@ -628,6 +628,12 @@ impl MachineState {
628
628
( HeapCellValueTag :: PStrLoc , l1) => {
629
629
read_heap_cell!( v2,
630
630
( HeapCellValueTag :: PStrLoc , l2) => {
631
+ if tabu_list. contains( & ( l1, l2) ) {
632
+ continue ;
633
+ }
634
+
635
+ tabu_list. insert( ( l1, l2) ) ;
636
+
631
637
match self . heap. compare_pstr_segments( l1, l2) {
632
638
PStrSegmentCmpResult :: Continue ( v1, v2) => {
633
639
self . pdl. push( v1) ;
@@ -642,6 +648,12 @@ impl MachineState {
642
648
}
643
649
}
644
650
( HeapCellValueTag :: Lis , l2) => {
651
+ if tabu_list. contains( & ( l1, l2) ) {
652
+ continue ;
653
+ }
654
+
655
+ tabu_list. insert( ( l1, l2) ) ;
656
+
645
657
let ( c, succ_cell) = self . heap. last_str_char_and_tail( l1) ;
646
658
647
659
self . pdl. push( succ_cell) ;
@@ -651,10 +663,16 @@ impl MachineState {
651
663
self . pdl. push( heap_loc_as_cell!( l2) ) ;
652
664
}
653
665
( HeapCellValueTag :: Str , s) => {
666
+ if tabu_list. contains( & ( l1, s) ) {
667
+ continue ;
668
+ }
669
+
654
670
let ( name, arity) = cell_as_atom_cell!( self . heap[ s] )
655
671
. get_name_and_arity( ) ;
656
672
657
673
if name == atom!( "." ) && arity == 2 {
674
+ tabu_list. insert( ( l1, s) ) ;
675
+
658
676
let ( c, succ_cell) = self . heap. last_str_char_and_tail( l1) ;
659
677
660
678
self . pdl. push( heap_loc_as_cell!( s+2 ) ) ;
0 commit comments