Merge branch 'master' into library-use-case

This commit is contained in:
Nicolas Luck
2023-11-02 11:12:54 +01:00
21 changed files with 787 additions and 549 deletions

View File

@@ -949,6 +949,25 @@ impl MachineState {
}
);
}
#[inline(always)]
pub(super) fn cut_prev_body(&mut self, value: HeapCellValue) {
let b = self.b;
read_heap_cell!(value,
(HeapCellValueTag::CutPoint, b0) => {
let b0 = b0.get_num() as usize;
let b0 = self.stack.index_or_frame(b0).prelude.b;
if b > b0 {
self.b = b0;
}
}
_ => {
self.fail = true;
}
);
}
}
#[derive(Debug)]