first cut at call counter.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@580 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -252,6 +252,8 @@ emit_cp_inst(compiler_vm_op op, yamop * Address, int Flag, int NClausesAfter)
|
||||
indexed_code_for_cut = NIL;
|
||||
if (op != try_op && profiling)
|
||||
emit(retry_profiled_op, Unsigned(CurrentPred), Zero);
|
||||
else if (op != try_op && call_counting)
|
||||
emit(count_retry_op, Unsigned(CurrentPred), Zero);
|
||||
if (NGroups == 1)
|
||||
Flag = Flag | LoneGroup;
|
||||
else if (Flag & LastGroup) {
|
||||
@@ -1335,6 +1337,8 @@ PredIsIndexable(PredEntry *ap)
|
||||
CurrentPred = ap;
|
||||
if (CurrentPred->PredFlags & ProfiledPredFlag)
|
||||
profiling = TRUE;
|
||||
else if (CurrentPred->PredFlags & CountPredFlag)
|
||||
call_counting = TRUE;
|
||||
else
|
||||
profiling = FALSE;
|
||||
IPredArity = ap->ArityOfPE;
|
||||
|
Reference in New Issue
Block a user