dereference compare_term_test args down from stack (#3286, #3295)

This commit is contained in:
Mark Thom
2026-04-21 16:02:55 -07:00
parent 5ea262e1d3
commit 703a6dddd1

View File

@@ -557,6 +557,11 @@ impl MachineState {
}
pub fn compare_term_test(&self, h1: HeapCellValue, h2: HeapCellValue) -> Option<Ordering> {
// all derefs downstack from this function are heap bound so
// dereference stack vars pointing into the heap while possible
let h1 = self.store(h1);
let h2 = self.store(h2);
for term_pair in ParallelHeapIter::from(self, h1, h2) {
match term_pair {
TermPair::Vars(v1_offset, v2_offset) if v1_offset != v2_offset => {