@@ -628,6 +628,12 @@ impl MachineState {
628628 ( HeapCellValueTag :: PStrLoc , l1) => {
629629 read_heap_cell!( v2,
630630 ( HeapCellValueTag :: PStrLoc , l2) => {
631+ if tabu_list. contains( & ( l1, l2) ) {
632+ continue ;
633+ }
634+
635+ tabu_list. insert( ( l1, l2) ) ;
636+
631637 match self . heap. compare_pstr_segments( l1, l2) {
632638 PStrSegmentCmpResult :: Continue ( v1, v2) => {
633639 self . pdl. push( v1) ;
@@ -642,6 +648,12 @@ impl MachineState {
642648 }
643649 }
644650 ( HeapCellValueTag :: Lis , l2) => {
651+ if tabu_list. contains( & ( l1, l2) ) {
652+ continue ;
653+ }
654+
655+ tabu_list. insert( ( l1, l2) ) ;
656+
645657 let ( c, succ_cell) = self . heap. last_str_char_and_tail( l1) ;
646658
647659 self . pdl. push( succ_cell) ;
@@ -651,10 +663,16 @@ impl MachineState {
651663 self . pdl. push( heap_loc_as_cell!( l2) ) ;
652664 }
653665 ( HeapCellValueTag :: Str , s) => {
666+ if tabu_list. contains( & ( l1, s) ) {
667+ continue ;
668+ }
669+
654670 let ( name, arity) = cell_as_atom_cell!( self . heap[ s] )
655671 . get_name_and_arity( ) ;
656672
657673 if name == atom!( "." ) && arity == 2 {
674+ tabu_list. insert( ( l1, s) ) ;
675+
658676 let ( c, succ_cell) = self . heap. last_str_char_and_tail( l1) ;
659677
660678 self . pdl. push( heap_loc_as_cell!( s+2 ) ) ;
0 commit comments