you may have code and dbrefs at the same time.

try to expand trail in single sweep


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@769 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2003-02-12 13:20:52 +00:00
parent 8c2af87600
commit b37ee94fe9
8 changed files with 70 additions and 53 deletions

View File

@@ -470,19 +470,16 @@ RestoreDBEntry(DBRef dbr)
YP_fprintf(errout, " a var\n");
#endif
dbr->Parent = (DBProp)AddrAdjust((ADDR)(dbr->Parent));
if (dbr->Flags & DBCode) {
if (dbr->u.Code != NULL)
dbr->u.Code = PtoOpAdjust(dbr->u.Code);
} else {
if (dbr->Flags & DBWithRefs) {
DBRef *cp;
DBRef tm;
if (dbr->Code != NULL)
dbr->Code = PtoOpAdjust(dbr->Code);
if (dbr->Flags & DBWithRefs) {
DBRef *cp;
DBRef tm;
dbr->u.DBRefs = DBRefPAdjust(dbr->u.DBRefs);
cp = dbr->u.DBRefs;
while ((tm = *--cp) != 0)
*cp = DBRefAdjust(tm);
}
dbr->DBRefs = DBRefPAdjust(dbr->DBRefs);
cp = dbr->DBRefs;
while ((tm = *--cp) != 0)
*cp = DBRefAdjust(tm);
}
if (dbr->Flags & DBAtomic) {
if (IsAtomTerm(dbr->Entry))