correct (\+)/1 (#2141)

This commit is contained in:
Mark
2023-10-31 23:58:59 -06:00
parent 8f06ef965a
commit dfd9e43405
6 changed files with 88 additions and 18 deletions

View File

@@ -941,6 +941,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)]