first step for quick loader, and fix an instruction format.

This commit is contained in:
Vitor Santos Costa
2011-07-30 00:07:35 +01:00
parent 545a3a2b03
commit a56402303e
12 changed files with 444 additions and 43 deletions

View File

@@ -1679,18 +1679,18 @@ Yap_absmi(int inp)
*****************************************************************/
/* ensure_space */
BOp(ensure_space, Osbpi);
BOp(ensure_space, Osbpa);
{
Int sz = PREG->u.Osbpi.i;
UInt arity = PREG->u.Osbpi.p->ArityOfPE;
Int sz = PREG->u.Osbpa.i;
UInt arity = PREG->u.Osbpa.p->ArityOfPE;
if (Unsigned(H) + sz > Unsigned(YREG)-CreepFlag) {
YENV[E_CP] = (CELL) CPREG;
YENV[E_E] = (CELL) ENV;
#ifdef DEPTH_LIMIT
YENV[E_DEPTH] = DEPTH;
#endif /* DEPTH_LIMIT */
SET_ASP(YREG, PREG->u.Osbpi.s);
PREG = NEXTOP(PREG,Osbpi);
SET_ASP(YREG, PREG->u.Osbpa.s);
PREG = NEXTOP(PREG,Osbpa);
saveregs();
if (!Yap_gcl(sz, arity, YENV, PREG)) {
Yap_Error(OUT_OF_STACK_ERROR,TermNil,LOCAL_ErrorMessage);
@@ -1700,7 +1700,7 @@ Yap_absmi(int inp)
setregs();
}
} else {
PREG = NEXTOP(PREG,Osbpi);
PREG = NEXTOP(PREG,Osbpa);
}
}
JMPNext();