Revert "remove Term"

This reverts commit 3b5879841aedecba5057c70c71da0ba23e5cd84a.
This commit is contained in:
Mark Thom
2025-03-15 13:19:26 -07:00
committed by Mark Thom
parent eef7b06919
commit 9e1e99f961
53 changed files with 3726 additions and 4517 deletions

View File

@@ -1,3 +1,10 @@
#[cfg(test)]
use fxhash::FxBuildHasher;
#[cfg(test)]
use indexmap::IndexMap;
#[cfg(test)]
use std::collections::BTreeMap;
#[cfg(test)]
use crate::atom_table::*;
#[cfg(test)]
@@ -8,17 +15,6 @@ use crate::types::*;
#[cfg(test)]
use crate::heap_iter::{FocusedHeapIter, HeapOrStackTag, IterStackLoc};
#[cfg(test)]
use std::collections::BTreeMap;
#[cfg(test)]
use std::ops::Deref;
#[cfg(test)]
use fxhash::FxBuildHasher;
#[cfg(test)]
use indexmap::IndexMap;
#[cfg(test)]
pub(crate) trait UnmarkPolicy {
fn forward_attr_var(iter: &mut StacklessPreOrderHeapIter<Self>) -> Option<HeapCellValue>
@@ -185,15 +181,6 @@ pub(crate) struct StacklessPreOrderHeapIter<'a, UMP: UnmarkPolicy> {
pstr_loc_values: PStrLocValuesMap,
}
#[cfg(test)]
impl<'a> Deref for StacklessPreOrderHeapIter<'a, IteratorUMP> {
type Target = Heap;
fn deref(&self) -> &Self::Target {
self.heap
}
}
#[cfg(test)]
impl<'a> FocusedHeapIter for StacklessPreOrderHeapIter<'a, IteratorUMP> {
#[inline]
@@ -778,7 +765,7 @@ mod tests {
// two-part complete string, then a three-part cyclic string
// involving an uncompacted list of chars.
let pstr_cell = wam.machine_st.allocate_pstr("abc ").unwrap();
let pstr_cell = wam.machine_st.heap.allocate_pstr("abc ").unwrap();
wam.machine_st.heap.push_cell(heap_loc_as_cell!(1)).unwrap();
@@ -812,7 +799,7 @@ mod tests {
wam.machine_st.heap[1] = pstr_loc_as_cell!(heap_index!(3));
wam.machine_st.allocate_pstr("abcdef ").unwrap();
wam.machine_st.heap.allocate_pstr("abcdef ").unwrap();
wam.machine_st.heap.push_cell(heap_loc_as_cell!(5)).unwrap();
mark_cells(&mut wam.machine_st.heap, 2);