get rid of dynamic lookup for
$call_with_default_policy.
This commit is contained in:
@@ -136,10 +136,19 @@ macro_rules! is_var {
|
||||
|
||||
macro_rules! call_clause {
|
||||
($ct:expr, $arity:expr, $pvs:expr) => (
|
||||
Line::Control(ControlInstruction::CallClause($ct, $arity, $pvs, false))
|
||||
Line::Control(ControlInstruction::CallClause($ct, $arity, $pvs, false, false))
|
||||
);
|
||||
($ct:expr, $arity:expr, $pvs:expr, $lco:expr) => (
|
||||
Line::Control(ControlInstruction::CallClause($ct, $arity, $pvs, $lco))
|
||||
Line::Control(ControlInstruction::CallClause($ct, $arity, $pvs, $lco, false))
|
||||
)
|
||||
}
|
||||
|
||||
macro_rules! call_clause_by_default {
|
||||
($ct:expr, $arity:expr, $pvs:expr) => (
|
||||
Line::Control(ControlInstruction::CallClause($ct, $arity, $pvs, false, true))
|
||||
);
|
||||
($ct:expr, $arity:expr, $pvs:expr, $lco:expr) => (
|
||||
Line::Control(ControlInstruction::CallClause($ct, $arity, $pvs, $lco, true))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -155,6 +164,12 @@ macro_rules! is_call {
|
||||
)
|
||||
}
|
||||
|
||||
macro_rules! is_call_by_default {
|
||||
($r:expr, $at:expr) => (
|
||||
call_clause_by_default!(ClauseType::BuiltIn(BuiltInClauseType::Is($r, $at)), 2, 0)
|
||||
)
|
||||
}
|
||||
|
||||
macro_rules! set_cp {
|
||||
($r:expr) => (
|
||||
call_clause!(ClauseType::System(SystemClauseType::SetCutPoint($r)), 1, 0)
|
||||
|
||||
Reference in New Issue
Block a user