Handle exported predicates in meta-calls
This commit is contained in:
parent
6a2d74ac6e
commit
9560aa026e
6
C/exec.c
6
C/exec.c
@ -315,7 +315,7 @@ inline static bool do_execute(Term t, Term mod USES_REGS) {
|
|||||||
/* I cannot use the standard macro here because
|
/* I cannot use the standard macro here because
|
||||||
otherwise I would dereference the argument and
|
otherwise I would dereference the argument and
|
||||||
might skip a svar */
|
might skip a svar */
|
||||||
if (pen->PredFlags & MetaPredFlag) {
|
if (pen->PredFlags & (MetaPredFlag|UndefPredFlag)) {
|
||||||
return CallMetaCall(t, mod PASS_REGS);
|
return CallMetaCall(t, mod PASS_REGS);
|
||||||
}
|
}
|
||||||
pt = RepAppl(t) + 1;
|
pt = RepAppl(t) + 1;
|
||||||
@ -441,7 +441,7 @@ inline static bool do_execute_n(Term t, Term mod, unsigned int n USES_REGS) {
|
|||||||
pen = RepPredProp(PredPropByFunc(f, mod));
|
pen = RepPredProp(PredPropByFunc(f, mod));
|
||||||
/* You thought we would be over by now */
|
/* You thought we would be over by now */
|
||||||
/* but no meta calls require special preprocessing */
|
/* but no meta calls require special preprocessing */
|
||||||
if (pen->PredFlags & MetaPredFlag) {
|
if (pen->PredFlags & (MetaPredFlag|UndefPredFlag)) {
|
||||||
Term t = copy_execn_to_heap(f, pt, n, arity, mod PASS_REGS);
|
Term t = copy_execn_to_heap(f, pt, n, arity, mod PASS_REGS);
|
||||||
return (CallMetaCall(t, mod PASS_REGS));
|
return (CallMetaCall(t, mod PASS_REGS));
|
||||||
}
|
}
|
||||||
@ -1812,7 +1812,7 @@ Term Yap_RunTopGoal(Term t, bool handle_errors) {
|
|||||||
HR[1] = MkAtomTerm(Yap_LookupAtom("top"));
|
HR[1] = MkAtomTerm(Yap_LookupAtom("top"));
|
||||||
arity = 2;
|
arity = 2;
|
||||||
HR += 2;
|
HR += 2;
|
||||||
} else if (ppe->PredFlags & MetaPredFlag) {
|
} else if (ppe->PredFlags & (MetaPredFlag|UndefPredFlag)) {
|
||||||
// we're in a meta-call, rake care about modules
|
// we're in a meta-call, rake care about modules
|
||||||
//
|
//
|
||||||
Term ts[2];
|
Term ts[2];
|
||||||
|
Reference in New Issue
Block a user