fix meta-call on system predicates bug

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1181 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2004-11-22 05:48:43 +00:00
parent 9dfcbc1de9
commit fda0b76f18
3 changed files with 15 additions and 11 deletions

View File

@ -77,7 +77,11 @@ inline static Int
CallMetaCall(Term mod) {
ARG2 = cp_as_integer(B); /* p_save_cp */
ARG3 = ARG1;
ARG4 = mod;
if (mod) {
ARG4 = mod;
} else {
ARG4 = TermProlog;
}
return (CallPredicate(PredMetaCall, B, PredMetaCall->CodeOfPred));
}

View File

@ -675,10 +675,10 @@ incore(G) :- '$execute'(G).
;
'$call'(B,CP,G0,M)
).
'$call'(\+ X, _, _,_) :- !,
\+ '$execute'(X).
'$call'(not(X), _, _,_) :- !,
\+ '$execute'(X).
'$call'(\+ X, CP, G0, M) :- !,
\+ '$call'(X, CP, G0, M).
'$call'(not(X), CP, G0, M) :- !,
\+ '$call'(X, CP, G0, M).
'$call'(!, CP, _,_) :- !,
'$$cut_by'(CP).
'$call'([A|B], _, _, M) :- !,

View File

@ -27,12 +27,12 @@ false :- fail.
(:- G) :- '$execute'(G), !.
'$$!'(CP) :- '$cut_by'(CP).
[] :- true.
','(A,B) :- '$current_module'(Module), '$meta_call'((A,B),Module).
';'(A,B) :- '$current_module'(Module), '$meta_call'((A;B),Module).
'|'(A,B) :- '$current_module'(Module), '$meta_call'((A;B),Module).
'->'(A,B) :- '$current_module'(Module), '$meta_call'((A->B),Module).
\+(G) :- '$current_module'(Module), '$meta_call'(\+(G),Module).
not(G) :- '$current_module'(Module), '$meta_call'(not(G),Module).
','(A,B) :- '$execute'(A), '$execute'(B).
';'(A,B) :- ('$execute'(A) ; '$execute'(B)).
'|'(A,B) :- ('$execute'(A) ; '$execute'(B)).
'->'(A,B) :- ('$execute'(A) -> '$execute'(B)).
\+(G) :- \+ '$execute'(G).
not(G) :- \+ '$execute'(G).
:- set_value('$doindex',true).