trail: Trail
}
-pub(crate) trait CopierTarget
+pub(crate) trait CopierTarget: IndexMut<usize, Output=HeapCellValue>
{
fn source(&self) -> usize;
fn threshold(&self) -> usize;
fn stack(&mut self) -> &mut AndStack;
fn unwind_trail(&mut self, redirect: RedirectInfo)
- where Self: IndexMut<usize, Output=HeapCellValue>
{
for (r, hcv) in redirect.trail {
match r {
}
fn reinstantiate_var(&mut self, ra: Addr, scan: usize, trail: &mut Trail)
- where Self: IndexMut<usize, Output=HeapCellValue>
{
self[scan] = HeapCellValue::Addr(Addr::HeapCell(scan));
// at L1 to L2. trail is kept to restore the innards of L1 after
// it's been copied to L2.
fn duplicate_term_impl(&mut self, addr: Addr) -> RedirectInfo
- where Self: IndexMut<usize, Output=HeapCellValue>
{
let mut trail = Trail::new();
let mut scan = self.source();
}
fn duplicate_term(&mut self, addr: Addr)
- where Self: IndexMut<usize, Output=HeapCellValue>
{
let redirect = self.duplicate_term_impl(addr);
self.unwind_trail(redirect);