correct copier.
This commit is contained in:
@@ -3,20 +3,12 @@ use prolog::instructions::*;
|
||||
|
||||
use std::ops::IndexMut;
|
||||
|
||||
//type ListTrail = HashMap<usize, usize>;
|
||||
type Trail = Vec<(Ref, HeapCellValue)>;
|
||||
|
||||
pub(crate) struct RedirectInfo {
|
||||
//list_trail: ListTrail,
|
||||
trail: Trail
|
||||
}
|
||||
/*
|
||||
impl RedirectInfo {
|
||||
fn new() -> Self {
|
||||
RedirectInfo { list_trail: ListTrail::new(), trail: Trail::new() }
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
pub(crate) trait CopierTarget
|
||||
{
|
||||
fn source(&self) -> usize;
|
||||
@@ -59,7 +51,6 @@ pub(crate) trait CopierTarget
|
||||
fn duplicate_term_impl(&mut self, addr: Addr) -> RedirectInfo
|
||||
where Self: IndexMut<usize, Output=HeapCellValue>
|
||||
{
|
||||
// let mut redirect_info = RedirectInfo::new();
|
||||
let mut trail = Trail::new();
|
||||
let mut scan = self.source();
|
||||
let old_h = self.threshold();
|
||||
|
||||
@@ -60,10 +60,8 @@ impl<'a> HCPreOrderIterator<'a> {
|
||||
|
||||
da
|
||||
},
|
||||
Addr::HeapCell(_) | Addr::StackCell(_, _) =>
|
||||
da,
|
||||
Addr::Str(s) =>
|
||||
self.follow_heap(s) // record terms of structure.
|
||||
Addr::HeapCell(_) | Addr::StackCell(_, _) => da,
|
||||
Addr::Str(s) => self.follow_heap(s) // record terms of structure.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user