harmonize partial strings with complete strings (#276), make Addr a copyable type

This commit is contained in:
Mark Thom
2020-04-03 10:22:46 -06:00
parent cac76d4739
commit 141f3bcec3
33 changed files with 1229 additions and 885 deletions

View File

@@ -112,16 +112,6 @@ macro_rules! functor_term {
(number($e:expr), $arity:expr, $aux_lens:expr, $addendum:ident) => (
$e.into()
);
/*
(string($s:expr), $arity:expr, $aux_lens:expr, $addendum: ident) => ({
let len: usize = $aux_lens.iter().sum();
let h = len + $arity + 1 + $addendum.h();
$addendum.allocate_pstr(&$s);
HeapCell::PStrLocation(h, 0)
});
*/
(integer($e:expr), $arity:expr, $aux_lens:expr, $addendum: ident) => (
HeapCellValue::Integer(Rc::new(Integer::from($e)))
);
@@ -148,9 +138,6 @@ macro_rules! from_constant {
&Constant::CharCode(c) => {
HeapCellValue::Addr(Addr::CharCode(c))
}
&Constant::CutPoint(cp) => {
HeapCellValue::Addr(Addr::CutPoint(cp))
}
&Constant::Integer(ref n) => {
HeapCellValue::Integer(n.clone())
}