fix duplicate_term bug
This commit is contained in:
@@ -338,6 +338,7 @@ pub enum QueryTerm {
|
||||
Catch(Vec<Box<Term>>),
|
||||
Cut,
|
||||
Display(Vec<Box<Term>>),
|
||||
DuplicateTerm(Vec<Box<Term>>),
|
||||
Functor(Vec<Box<Term>>),
|
||||
Inlined(InlinedQueryTerm),
|
||||
Is(Vec<Box<Term>>),
|
||||
@@ -350,8 +351,9 @@ impl QueryTerm {
|
||||
match self {
|
||||
&QueryTerm::Arg(_) => 3,
|
||||
&QueryTerm::Catch(_) => 3,
|
||||
&QueryTerm::Throw(_) => 1,
|
||||
&QueryTerm::Throw(_) => 1,
|
||||
&QueryTerm::Display(_) => 1,
|
||||
&QueryTerm::DuplicateTerm(_) => 2,
|
||||
&QueryTerm::Functor(_) => 3,
|
||||
&QueryTerm::Inlined(ref term) => term.arity(),
|
||||
&QueryTerm::Is(_) => 2,
|
||||
@@ -720,7 +722,6 @@ pub enum ArithmeticInstruction {
|
||||
pub enum BuiltInInstruction {
|
||||
CleanUpBlock,
|
||||
CompareNumber(CompareNumberQT, ArithmeticTerm, ArithmeticTerm),
|
||||
DuplicateTerm,
|
||||
EraseBall,
|
||||
Fail,
|
||||
GetArg,
|
||||
@@ -751,6 +752,8 @@ pub enum ControlInstruction {
|
||||
Deallocate,
|
||||
DisplayCall,
|
||||
DisplayExecute,
|
||||
DuplicateTermCall,
|
||||
DuplicateTermExecute,
|
||||
Execute(Rc<Atom>, usize),
|
||||
ExecuteN(usize),
|
||||
FunctorCall,
|
||||
@@ -773,6 +776,8 @@ impl ControlInstruction {
|
||||
&ControlInstruction::CatchExecute => true,
|
||||
&ControlInstruction::DisplayCall => true,
|
||||
&ControlInstruction::DisplayExecute => true,
|
||||
&ControlInstruction::DuplicateTermCall => true,
|
||||
&ControlInstruction::DuplicateTermExecute => true,
|
||||
&ControlInstruction::Execute(_, _) => true,
|
||||
&ControlInstruction::CallN(_) => true,
|
||||
&ControlInstruction::ExecuteN(_) => true,
|
||||
|
||||
Reference in New Issue
Block a user