new meta-call scheme.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@751 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2003-01-29 14:47:17 +00:00
parent 0b17ff4174
commit 1369dfa410
24 changed files with 588 additions and 683 deletions

View File

@@ -1590,13 +1590,17 @@ c_goal(Term Goal, int mod)
#endif
}
return;
}
else {
} else {
if (profiling)
Yap_emit(enter_profiling_op, (CELL)p, Zero);
else if (call_counting)
Yap_emit(count_call_op, (CELL)p, Zero);
c_args(Goal, 0);
if (f == FunctorExecuteInMod) {
/* compile the first argument only */
c_arg(1, ArgOfTerm(1,Goal), 1, 0);
} else {
c_args(Goal, 0);
}
}
}
@@ -1628,7 +1632,11 @@ c_goal(Term Goal, int mod)
if (p->PredFlags & SyncPredFlag)
Yap_emit(sync_op, (CELL)p, (CELL)(p->ArityOfPE));
#endif /* YAPOR */
Yap_emit_3ops(call_op, (CELL) p0, Zero, Zero);
if (p->FunctorOfPred == FunctorExecuteInMod) {
Yap_emit_4ops(call_op, (CELL) p0, Zero, Zero, ArgOfTerm(2,Goal));
} else {
Yap_emit_3ops(call_op, (CELL) p0, Zero, Zero);
}
/* functor is allowed to call the garbage collector */
if (onlast) {
Yap_emit(deallocate_op, Zero, Zero);