new module system. BEWARE! BEWARE! BEWARE!

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@177 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2001-11-15 00:01:43 +00:00
parent a628251951
commit b289d9ac9c
57 changed files with 1859 additions and 2163 deletions

View File

@@ -376,7 +376,7 @@ YapCallProlog(Term t)
Int out;
BACKUP_MACHINE_REGS();
out = execute_goal(t,0);
out = execute_goal(t, 0, CurrentModule);
RECOVER_MACHINE_REGS();
return(out);
@@ -594,14 +594,16 @@ YapCompileClause(Term t)
{
char *ErrorMessage;
CODEADDR codeaddr;
int mod = CurrentModule;
BACKUP_MACHINE_REGS();
ErrorMessage = NULL;
ARG1 = t;
codeaddr = cclause (t,0);
codeaddr = cclause (t,0, mod);
if (codeaddr != NULL) {
t = Deref(ARG1); /* just in case there was an heap overflow */
addclause (t, codeaddr, TRUE);
addclause (t, codeaddr, TRUE, mod);
}
RECOVER_MACHINE_REGS();
@@ -677,7 +679,7 @@ YapInit(yap_init_args *yap_init)
InitYaamRegs();
#endif
/* slaves, waiting for work */
*CurrentModulePtr = MkIntTerm(1);
CurrentModule = 1;
P = GETWORK_FIRST_TIME;
exec_absmi(FALSE);
abort_optyap("abstract machine unexpected exit");