move several builtins to control.

This commit is contained in:
Mark Thom
2018-02-12 18:30:44 -07:00
parent 47055d189d
commit a1fb4f529b
4 changed files with 146 additions and 135 deletions

View File

@@ -820,28 +820,17 @@ pub enum ArithmeticInstruction {
}
pub enum BuiltInInstruction {
CleanUpBlock,
CompareNumber(CompareNumberQT, ArithmeticTerm, ArithmeticTerm),
CleanUpBlock,
EraseBall,
Fail,
GetArgCall,
GetArgExecute,
GetBall,
GetCurrentBlock,
GetCutPoint(RegType),
DynamicCompareNumber(CompareNumberQT),
DynamicIs,
GetCutPoint(RegType),
InstallCleaner,
InstallNewBlock,
InternalCallN,
IsAtomic(RegType),
IsCompound(RegType),
IsFloat(RegType),
IsInteger(RegType),
IsNonVar(RegType),
IsRational(RegType),
IsString(RegType),
IsVar(RegType),
InternalCallN,
ResetBlock,
RestoreCutPolicy,
SetBall,
@@ -861,11 +850,14 @@ pub enum ControlInstruction {
CatchCall,
CatchExecute,
CheckCpExecute,
CompareNumber(CompareNumberQT, ArithmeticTerm, ArithmeticTerm),
DisplayCall,
DisplayExecute,
Deallocate,
DuplicateTermCall,
DuplicateTermExecute,
DynamicCompareNumber(CompareNumberQT),
DynamicIs,
EqCall,
EqExecute,
Execute(TabledRc<Atom>, usize),
@@ -876,10 +868,18 @@ pub enum ControlInstruction {
GotoCall(usize, usize), // p, arity.
GotoExecute(usize, usize), // p, arity.
GroundCall,
GroundExecute,
GroundExecute,
JmpByCall(usize, usize), // arity, global_offset.
JmpByExecute(usize, usize),
IsCall(RegType, ArithmeticTerm),
IsAtomic(RegType),
IsCompound(RegType),
IsFloat(RegType),
IsInteger(RegType),
IsNonVar(RegType),
IsRational(RegType),
IsString(RegType),
IsVar(RegType),
IsExecute(RegType, ArithmeticTerm),
NotEqCall,
NotEqExecute,
@@ -896,10 +896,13 @@ impl ControlInstruction {
&ControlInstruction::Call(_, _, _) => true,
&ControlInstruction::CatchCall => true,
&ControlInstruction::CatchExecute => true,
&ControlInstruction::CompareNumber(..) => true,
&ControlInstruction::DisplayCall => true,
&ControlInstruction::DisplayExecute => true,
&ControlInstruction::DuplicateTermCall => true,
&ControlInstruction::DuplicateTermExecute => true,
&ControlInstruction::DynamicCompareNumber(_) => true,
&ControlInstruction::DynamicIs => true,
&ControlInstruction::EqCall => true,
&ControlInstruction::EqExecute => true,
&ControlInstruction::Execute(_, _) => true,
@@ -916,6 +919,14 @@ impl ControlInstruction {
&ControlInstruction::GotoExecute(..) => true,
&ControlInstruction::GroundCall => true,
&ControlInstruction::GroundExecute => true,
&ControlInstruction::IsAtomic(_) => true,
&ControlInstruction::IsCompound(_) => true,
&ControlInstruction::IsFloat(_) => true,
&ControlInstruction::IsInteger(_) => true,
&ControlInstruction::IsNonVar(_) => true,
&ControlInstruction::IsRational(_) => true,
&ControlInstruction::IsString(_) => true,
&ControlInstruction::IsVar(_) => true,
&ControlInstruction::IsCall(..) => true,
&ControlInstruction::IsExecute(..) => true,
&ControlInstruction::JmpByCall(..) => true,