fix module change over meta-calls (partially)

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@216 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2001-12-07 16:32:36 +00:00
parent 443a795472
commit f46101a01a
3 changed files with 12 additions and 16 deletions

View File

@ -11155,8 +11155,8 @@ absmi(int inp)
if (pen->PredFlags & MetaPredFlag) { if (pen->PredFlags & MetaPredFlag) {
if (f == FunctorModule) { if (f == FunctorModule) {
Term tmod = LookupModule(ArgOfTerm(1,d0)); Term tmod = LookupModule(ArgOfTerm(1,d0));
if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { if (!IsVarTerm(tmod) && IsAtomTerm(tmod) &&
mod = LookupModule(tmod); LookupModule(tmod) == mod) {
d0 = ArgOfTerm(2,d0); d0 = ArgOfTerm(2,d0);
goto execute_nvar; goto execute_nvar;
} }
@ -11278,8 +11278,8 @@ absmi(int inp)
if (f == FunctorModule) { if (f == FunctorModule) {
Term tmod; Term tmod;
tmod = ArgOfTerm(1,d0); tmod = ArgOfTerm(1,d0);
if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { if (!IsVarTerm(tmod) && IsAtomTerm(tmod) &&
mod = LookupModule(tmod); mod == LookupModule(tmod)) {
d0 = ArgOfTerm(2,d0); d0 = ArgOfTerm(2,d0);
goto execute_within_nvar; goto execute_within_nvar;
} }
@ -11422,8 +11422,8 @@ absmi(int inp)
if (pen->PredFlags & MetaPredFlag) { if (pen->PredFlags & MetaPredFlag) {
if (f == FunctorModule) { if (f == FunctorModule) {
Term tmod = ArgOfTerm(1,d0); Term tmod = ArgOfTerm(1,d0);
if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { if (!IsVarTerm(tmod) && IsAtomTerm(tmod) &&
mod = LookupModule(tmod); mod == LookupModule(tmod)) {
d0 = ArgOfTerm(2,d0); d0 = ArgOfTerm(2,d0);
goto last_execute_within_nvar; goto last_execute_within_nvar;
} }

View File

@ -226,8 +226,8 @@ do_execute(Term t, int mod)
if (pen->PredFlags & MetaPredFlag) { if (pen->PredFlags & MetaPredFlag) {
if (f == FunctorModule) { if (f == FunctorModule) {
Term tmod = ArgOfTerm(1,t); Term tmod = ArgOfTerm(1,t);
if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { if (!IsVarTerm(tmod) && IsAtomTerm(tmod) &&
mod = LookupModule(tmod); mod == LookupModule(tmod)) {
t = ArgOfTerm(2,t); t = ArgOfTerm(2,t);
goto restart_exec; goto restart_exec;
} }
@ -332,8 +332,8 @@ p_execute_within(void)
if (pen->PredFlags & MetaPredFlag) { if (pen->PredFlags & MetaPredFlag) {
if (f == FunctorModule) { if (f == FunctorModule) {
Term tmod = ArgOfTerm(1,t); Term tmod = ArgOfTerm(1,t);
if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { if (!IsVarTerm(tmod) && IsAtomTerm(tmod) &&
mod = LookupModule(tmod); mod == LookupModule(tmod)) {
t = ArgOfTerm(2,t); t = ArgOfTerm(2,t);
goto restart_exec; goto restart_exec;
} }
@ -798,8 +798,8 @@ p_at_execute(void)
return(FALSE); return(FALSE);
if (f == FunctorModule) { if (f == FunctorModule) {
Term tmod = ArgOfTerm(1,t); Term tmod = ArgOfTerm(1,t);
if (!IsVarTerm(tmod) && IsAtomTerm(tmod)) { if (!IsVarTerm(tmod) && IsAtomTerm(tmod) &&
mod = LookupModule(tmod); mod == LookupModule(tmod)) {
t = ArgOfTerm(2,t); t = ArgOfTerm(2,t);
goto restart_exec; goto restart_exec;
} }

View File

@ -182,10 +182,6 @@ mywrite(int fd, char *buff, Int len)
#else /* SHORT_INTS */ #else /* SHORT_INTS */
#if SUN
#include <sys/file.h>
#endif
inline static inline static
void myread(int fd, char *buffer, Int len) { void myread(int fd, char *buffer, Int len) {
int nread; int nread;