generalize compare_pstr_segments

This commit is contained in:
Mark Thom
2025-04-15 22:10:02 -07:00
committed by Mark Thom
parent 1297a24469
commit e563fd8e4f
4 changed files with 93 additions and 125 deletions

View File

@@ -2815,8 +2815,6 @@ impl Machine {
(HeapCellValueTag::Str |
HeapCellValueTag::Lis |
HeapCellValueTag::PStrLoc) => {
debug_assert!(store_v.is_ref());
self.machine_st.heap[0] = store_v;
let heap_pstr_iter = HeapPStrIter::new(&self.machine_st.heap, 0);
@@ -2841,8 +2839,7 @@ impl Machine {
self.machine_st.mode = MachineMode::Read;
}
None => {
self.machine_st.backtrack();
continue;
self.machine_st.fail = true;
}
}
}
@@ -2862,8 +2859,7 @@ impl Machine {
self.machine_st.mode = MachineMode::Write;
}
_ => {
self.machine_st.backtrack();
continue;
self.machine_st.fail = true;
}
);