remove Term

This commit is contained in:
Mark Thom
2024-07-16 15:38:22 -06:00
committed by Mark Thom
parent 34ac85bb6d
commit 1ef681bd21
43 changed files with 3823 additions and 2720 deletions

View File

@@ -1155,8 +1155,17 @@ impl MachineState {
value: HeapCellValue,
) -> Result<Number, MachineStub> {
let stub_gen = || functor_stub(atom!("is"), 2);
let mut iter =
stackful_post_order_iter::<NonListElider>(&mut self.heap, &mut self.stack, value);
let root_loc = if value.is_ref() {
value.get_value() as usize
} else {
let type_error = self.type_error(ValidType::Evaluable, value);
return Err(self.error_form(type_error, stub_gen()));
};
let mut iter = stackful_post_order_iter::<NonListElider>(
&mut self.heap, &mut self.stack, root_loc,
);
while let Some(value) = iter.next() {
if value.get_forwarding_bit() {