skip_max_list preliminaries
This commit is contained in:
@@ -705,6 +705,7 @@ pub enum ClauseType {
|
|||||||
Op(ClauseName, Fixity, CodeIndex),
|
Op(ClauseName, Fixity, CodeIndex),
|
||||||
Named(ClauseName, CodeIndex),
|
Named(ClauseName, CodeIndex),
|
||||||
SetupCallCleanup,
|
SetupCallCleanup,
|
||||||
|
SkipMaxList,
|
||||||
Sort,
|
Sort,
|
||||||
Throw,
|
Throw,
|
||||||
}
|
}
|
||||||
@@ -807,6 +808,7 @@ impl ClauseType {
|
|||||||
&ClauseType::Op(ref name, ..) => name.clone(),
|
&ClauseType::Op(ref name, ..) => name.clone(),
|
||||||
&ClauseType::Named(ref name, ..) => name.clone(),
|
&ClauseType::Named(ref name, ..) => name.clone(),
|
||||||
&ClauseType::SetupCallCleanup => clause_name!("setup_call_cleanup"),
|
&ClauseType::SetupCallCleanup => clause_name!("setup_call_cleanup"),
|
||||||
|
&ClauseType::SkipMaxList => clause_name!("'$skip_max_list'"),
|
||||||
&ClauseType::Sort => clause_name!("sort"),
|
&ClauseType::Sort => clause_name!("sort"),
|
||||||
&ClauseType::Throw => clause_name!("throw")
|
&ClauseType::Throw => clause_name!("throw")
|
||||||
}
|
}
|
||||||
@@ -836,6 +838,7 @@ impl ClauseType {
|
|||||||
("keysort", 2) => ClauseType::KeySort,
|
("keysort", 2) => ClauseType::KeySort,
|
||||||
("\\==", 2) => ClauseType::NotEq,
|
("\\==", 2) => ClauseType::NotEq,
|
||||||
("setup_call_cleanup", 3) => ClauseType::SetupCallCleanup,
|
("setup_call_cleanup", 3) => ClauseType::SetupCallCleanup,
|
||||||
|
("'$skip_max_list'", 4) => ClauseType::SkipMaxList,
|
||||||
("sort", 2) => ClauseType::Sort,
|
("sort", 2) => ClauseType::Sort,
|
||||||
("throw", 1) => ClauseType::Throw,
|
("throw", 1) => ClauseType::Throw,
|
||||||
_ => if let Some(fixity) = fixity {
|
_ => if let Some(fixity) = fixity {
|
||||||
@@ -1232,7 +1235,7 @@ pub enum BuiltInInstruction {
|
|||||||
ResetBlock,
|
ResetBlock,
|
||||||
RestoreCutPolicy,
|
RestoreCutPolicy,
|
||||||
SetBall,
|
SetBall,
|
||||||
SetCutPoint(RegType),
|
SetCutPoint(RegType),
|
||||||
Succeed,
|
Succeed,
|
||||||
Unify,
|
Unify,
|
||||||
UnwindStack
|
UnwindStack
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ impl<'a, TermMarker: Allocator<'a>> CodeGenerator<TermMarker>
|
|||||||
GenContext::Last(chunk_num)
|
GenContext::Last(chunk_num)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
self.update_var_count(chunked_term.post_order_iter());
|
self.update_var_count(chunked_term.post_order_iter());
|
||||||
vs.mark_vars_in_chunk(chunked_term.post_order_iter(), lt_arity, term_loc);
|
vs.mark_vars_in_chunk(chunked_term.post_order_iter(), lt_arity, term_loc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,8 +119,7 @@ impl fmt::Display for ClauseType {
|
|||||||
let idx = idx.0.borrow();
|
let idx = idx.0.borrow();
|
||||||
write!(f, "{}:{}/{}", idx.1, name, idx.0)
|
write!(f, "{}:{}/{}", idx.1, name, idx.0)
|
||||||
},
|
},
|
||||||
ref ct =>
|
ref ct => write!(f, "{}", ct.name())
|
||||||
write!(f, "{}", ct.name())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -212,6 +211,10 @@ impl fmt::Display for BuiltInInstruction {
|
|||||||
write!(f, "install_new_block"),
|
write!(f, "install_new_block"),
|
||||||
&BuiltInInstruction::InternalCallN =>
|
&BuiltInInstruction::InternalCallN =>
|
||||||
write!(f, "internal_call_N"),
|
write!(f, "internal_call_N"),
|
||||||
|
&BuiltInInstruction::RemoveCallPolicyCheck =>
|
||||||
|
write!(f, "remove_call_policy_check"),
|
||||||
|
&BuiltInInstruction::RemoveInferenceCounter(r1, r2) =>
|
||||||
|
write!(f, "remove_inference_counter {}, {}", r1, r2),
|
||||||
&BuiltInInstruction::ResetBlock =>
|
&BuiltInInstruction::ResetBlock =>
|
||||||
write!(f, "reset_block"),
|
write!(f, "reset_block"),
|
||||||
&BuiltInInstruction::RestoreCutPolicy =>
|
&BuiltInInstruction::RestoreCutPolicy =>
|
||||||
@@ -226,10 +229,6 @@ impl fmt::Display for BuiltInInstruction {
|
|||||||
write!(f, "unwind_stack"),
|
write!(f, "unwind_stack"),
|
||||||
&BuiltInInstruction::Unify =>
|
&BuiltInInstruction::Unify =>
|
||||||
write!(f, "unify"),
|
write!(f, "unify"),
|
||||||
&BuiltInInstruction::RemoveCallPolicyCheck =>
|
|
||||||
write!(f, "remove_call_policy_check"),
|
|
||||||
&BuiltInInstruction::RemoveInferenceCounter(r1, r2) =>
|
|
||||||
write!(f, "remove_inference_counter {}, {}", r1, r2)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user