get rid of dynamic lookup for

$call_with_default_policy.
This commit is contained in:
Mark Thom
2018-08-12 23:14:28 -06:00
parent 00d4ef7ad8
commit c1ad5cd33f
8 changed files with 128 additions and 53 deletions

View File

@@ -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)