remove GetLevelAndUnify and replace it with GetCutPoint

This commit is contained in:
Mark Thom
2022-12-27 23:42:35 -07:00
committed by Mark
parent 097849385e
commit 942095baa7
7 changed files with 5 additions and 70 deletions

View File

@@ -173,10 +173,6 @@ impl<'a> QueryIterator<'a> {
&QueryTerm::Cut => {
self.state_stack.push(TermIterState::Cut(lvl));
}
&QueryTerm::GetLevelAndUnify(ref cell, ref var) => {
// TODO: get rid of it if possible. or! specialized TermIterState variant.
self.state_stack.push(TermIterState::Var(lvl, cell, VarPtr::from(var)));
}
&QueryTerm::Not(ref terms) => {
self.state_stack.push(TermIterState::Fail(lvl));
self.state_stack.push(TermIterState::Cut(lvl));
@@ -521,11 +517,6 @@ impl<'a> ChunkedIterator<'a> {
ChunkedTerm::BodyTerm(&QueryTerm::Cut) => {
result.push(term);
}
ChunkedTerm::BodyTerm(&QueryTerm::GetLevelAndUnify(..)) => {
result.push(term);
arity = 1;
break;
}
ChunkedTerm::BodyTerm(&QueryTerm::Clause(_, ClauseType::Inlined(_), ..)) => {
result.push(term);
}