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

@@ -51,13 +51,19 @@ impl Machine {
};
let arity = match self.machine_st.store(self.machine_st.deref(arity)) {
Addr::Con(h) =>
Addr::Con(h) => {
if let HeapCellValue::Integer(ref arity) = &self.machine_st.heap[h] {
arity.to_usize().unwrap()
} else {
unreachable!()
},
_ => unreachable!(),
}
}
Addr::Usize(n) => {
n
}
_ => {
unreachable!()
}
};
(name, arity)