]> Repositorios git - scryer-prolog.git/commitdiff
push cyclic pstr's tail to iterator stack of printer (#3086)
authorMark Thom <[email protected]>
Thu, 18 Sep 2025 03:21:54 +0000 (20:21 -0700)
committerMark Thom <[email protected]>
Thu, 18 Sep 2025 03:21:54 +0000 (20:21 -0700)
src/heap_print.rs

index 44989fb6356a13df6919caecf123057e190e7449..3f5b25641647fcd83a9587cec4e0d9bdb82d9471 100644 (file)
@@ -893,8 +893,9 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
 
                                                         return Some(unmark_cell_bits!(next_cell));
                                                     }
-                                                    (HeapCellValueTag::PStrLoc) => {
-                                                        self.iter.push_stack(h);
+                                                    (HeapCellValueTag::PStrLoc, l) => {
+                                                        let tail_idx = self.iter.heap.scan_slice_to_str(l).tail_idx;
+                                                        self.iter.push_stack(IterStackLoc::marked_loc(tail_idx, HeapOrStackTag::Heap));
                                                         return Some(unmark_cell_bits!(next_cell));
                                                     }
                                                     _ => {}