add copy_term/3 (#232)
This commit is contained in:
@@ -2044,6 +2044,7 @@ impl MachineState {
|
||||
copy_term(
|
||||
CopyBallTerm::new(&mut self.and_stack, &mut self.heap, &mut self.ball.stub),
|
||||
addr,
|
||||
AttrVarPolicy::DeepCopy,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2941,13 +2942,13 @@ impl MachineState {
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn copy_term(&mut self) {
|
||||
pub(super) fn copy_term(&mut self, attr_var_policy: AttrVarPolicy) {
|
||||
let old_h = self.heap.h;
|
||||
|
||||
let a1 = self[temp_v!(1)].clone();
|
||||
let a2 = self[temp_v!(2)].clone();
|
||||
|
||||
copy_term(CopyTerm::new(self), a1);
|
||||
copy_term(CopyTerm::new(self), a1, attr_var_policy);
|
||||
self.unify(Addr::HeapCell(old_h), a2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user