fix bad understanding of put_y_val in add_info/index.c

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@832 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2003-05-23 12:31:50 +00:00
parent a77ceeac69
commit 2bd2bcb68b

View File

@ -210,7 +210,7 @@ delete_regcopy(wamreg regs[MAX_REG_COPIES], int regs_count, wamreg copy)
}
i++;
}
/* this copy had overflowed */
/* this copy had overflowed, or it just was not there */
return regs_count;
}
@ -1083,18 +1083,20 @@ add_info(ClauseDef *clause, UInt regno)
break;
case _put_y_val:
case _put_unsafe:
if (regcopy_in(myregs, nofregs, cl->u.yx.x)) {
ycopy = cl->u.yx.y;
if (ycopy == cl->u.yx.y) {
nofregs = add_regcopy(myregs, nofregs, cl->u.yx.x);
} else {
nofregs = delete_regcopy(myregs, nofregs, cl->u.yx.x);
}
cl = NEXTOP(cl,yx);
break;
case _get_y_val:
if (regcopy_in(myregs, nofregs, cl->u.xy.x)) {
if (regcopy_in(myregs, nofregs, cl->u.yx.x)) {
ycopy = cl->u.yx.y;
} else if (ycopy == cl->u.yx.y) {
nofregs = add_regcopy(myregs, nofregs, cl->u.xy.x);
nofregs = add_regcopy(myregs, nofregs, cl->u.yx.x);
}
cl = NEXTOP(cl,xy);
cl = NEXTOP(cl,yx);
break;
case _get_atom:
if (regcopy_in(myregs, nofregs, cl->u.xc.x)) {