index inlined and builtin clausetypes inside a BTreeMap

This commit is contained in:
Mark Thom
2019-03-26 21:59:50 -06:00
parent 44f762a4f0
commit 32c8a5e55f
7 changed files with 92 additions and 97 deletions

View File

@@ -168,13 +168,13 @@ impl HeapCellValue {
}
}
#[derive(Clone, Copy, PartialEq)]
#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
pub enum IndexPtr {
Undefined,
Index(usize),
}
#[derive(Clone)]
#[derive(Clone, Ord, PartialOrd, Eq, PartialEq)]
pub struct CodeIndex(pub Rc<RefCell<(IndexPtr, ClauseName)>>);
impl CodeIndex {
@@ -505,7 +505,7 @@ impl IndexStore {
pub type CodeDir = HashMap<PredicateKey, CodeIndex>;
pub type TermDir = HashMap<PredicateKey, (Predicate, VecDeque<TopLevel>)>;
#[derive(Clone, Copy)]
#[derive(Clone, Copy, PartialEq, Eq, Ord, PartialOrd)]
pub enum CompileTimeHook {
GoalExpansion,
TermExpansion,