fix meta_calls with modules inside comma

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@753 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2003-01-30 18:00:26 +00:00
parent f5dad3ac1f
commit 533365611c
3 changed files with 7 additions and 3 deletions

View File

@ -11770,12 +11770,15 @@ Yap_absmi(int inp)
execute_comma_nvar:
if (IsAtomTerm(d1)) {
E_YREG[-EnvSizeInCells-2] = MkIntegerTerm((Int)PredPropByAtom(AtomOfTerm(d1),mod));
E_YREG[-EnvSizeInCells-3] = MkIntTerm(mod);
} else if (IsApplTerm(d1)) {
Functor f = FunctorOfTerm(d1);
if (IsExtensionFunctor(f)) {
goto execute_metacall;
} else {
if (f == FunctorModule) goto execute_metacall;
E_YREG[-EnvSizeInCells-2] = MkIntegerTerm((Int)PredPropByFunc(f,mod));
E_YREG[-EnvSizeInCells-3] = MkIntTerm(mod);
}
} else {
goto execute_metacall;
@ -11787,7 +11790,6 @@ Yap_absmi(int inp)
E_YREG[E_DEPTH] = DEPTH;
#endif /* DEPTH_LIMIT */
E_YREG[-EnvSizeInCells-1] = d1;
E_YREG[-EnvSizeInCells-3] = MkIntTerm(mod);
ENV = E_YREG;
E_YREG -= EnvSizeInCells+3;
PREG = COMMA_CODE;

View File

@ -248,17 +248,18 @@ do_execute(Term t, SMALLUNSGN mod)
}
} else if (f == FunctorComma) {
Term d1 = ArgOfTerm(2,t);
YENV = ASP;
if (IsVarTerm(d1)) {
return CallMetaCall(mod);
}
if (IsAtomTerm(d1)) {
YENV = ASP;
YENV[-EnvSizeInCells-2] = MkIntegerTerm((Int)PredPropByAtom(AtomOfTerm(d1),mod));
} else if (IsApplTerm(d1)) {
Functor f = FunctorOfTerm(d1);
if (IsExtensionFunctor(f)) {
if (IsExtensionFunctor(f) || f == FunctorModule) {
return CallMetaCall(mod);
} else {
YENV = ASP;
YENV[-EnvSizeInCells-2] = MkIntegerTerm((Int)PredPropByFunc(f,mod));
}
} else {

View File

@ -34,6 +34,7 @@ false :- fail.
\+(G) :- '$meta_call'(\+(G),prolog).
not(G) :- '$meta_call'(not(G),prolog).
:- '$set_value'('$doindex',true).
:- ['errors.yap',