fix previous fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2235 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
f4173813ff
commit
897224b36e
10
C/agc.c
10
C/agc.c
@ -188,13 +188,7 @@ mark_hash_entry(AtomHashEntry *HashPtr)
|
||||
if (atm) {
|
||||
AtomEntry *at = RepAtom(atm);
|
||||
do {
|
||||
#ifdef DEBUG_RESTORE1 /* useful during debug */
|
||||
if (IsWideAtom(atm))
|
||||
fprintf(errout, "Restoring %S\n", at->WStrOfAE);
|
||||
else
|
||||
fprintf(errout, "Restoring %s\n", at->StrOfAE);
|
||||
#endif
|
||||
RestoreEntries(RepProp(at->PropsOfAE), FALSE);
|
||||
RestoreAtom(at);
|
||||
atm = at->NextOfAE;
|
||||
at = RepAtom(CleanAtomMarkedBit(atm));
|
||||
} while (!EndOfPAEntr(at));
|
||||
@ -240,6 +234,8 @@ mark_atoms(void)
|
||||
HashPtr++;
|
||||
}
|
||||
mark_hash_entry(&INVISIBLECHAIN);
|
||||
RestoreAtom(RepAtom(AtomFoundVar));
|
||||
RestoreAtom(RepAtom(AtomFreeTerm));
|
||||
mark_hash_preds();
|
||||
}
|
||||
|
||||
|
15
C/save.c
15
C/save.c
@ -1271,16 +1271,9 @@ RestoreAtomList(Atom atm)
|
||||
if (EndOfPAEntr(at))
|
||||
return;
|
||||
do {
|
||||
#ifdef DEBUG_RESTORE2 /* useful during debug */
|
||||
fprintf(errout, "Restoring %s\n", at->StrOfAE);
|
||||
#endif
|
||||
at->PropsOfAE = PropAdjust(at->PropsOfAE);
|
||||
RestoreEntries(RepProp(at->PropsOfAE), FALSE);
|
||||
atm = at->NextOfAE;
|
||||
at->NextOfAE = atm = AtomAdjust(atm);
|
||||
at = RepAtom(atm);
|
||||
}
|
||||
while (!EndOfPAEntr(at));
|
||||
RestoreAtom(at);
|
||||
at = RepAtom(at->NextOfAE);
|
||||
} while (!EndOfPAEntr(at));
|
||||
}
|
||||
|
||||
|
||||
@ -1354,6 +1347,8 @@ restore_heap(void)
|
||||
}
|
||||
INVISIBLECHAIN.Entry = AtomAdjust(INVISIBLECHAIN.Entry);
|
||||
RestoreAtomList(INVISIBLECHAIN.Entry);
|
||||
RestoreAtom(RepAtom(AtomFoundVar));
|
||||
RestoreAtom(RepAtom(AtomFreeTerm));
|
||||
RestoreHashPreds();
|
||||
RestoreForeignCodeStructure();
|
||||
RestoreIOStructures();
|
||||
|
27
H/rheap.h
27
H/rheap.h
@ -11,8 +11,11 @@
|
||||
* File: rheap.h *
|
||||
* comments: walk through heap code *
|
||||
* *
|
||||
* Last rev: $Date: 2008-05-12 14:04:23 $,$Author: vsc $ *
|
||||
* Last rev: $Date: 2008-05-12 22:31:37 $,$Author: vsc $ *
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.97 2008/05/12 14:04:23 vsc
|
||||
* updates to restore
|
||||
*
|
||||
* Revision 1.96 2008/04/11 16:58:17 ricroc
|
||||
* yapor: seq_def initialization
|
||||
*
|
||||
@ -259,9 +262,9 @@ static Term
|
||||
AdjustDBTerm(Term trm, Term *p_base)
|
||||
{
|
||||
if (IsVarTerm(trm))
|
||||
return AtomTermAdjust(trm);
|
||||
if (IsAtomTerm(trm))
|
||||
return CodeVarAdjust(trm);
|
||||
if (IsAtomTerm(trm))
|
||||
return AtomTermAdjust(trm);
|
||||
if (IsPairTerm(trm)) {
|
||||
Term *p;
|
||||
Term out;
|
||||
@ -1467,3 +1470,21 @@ RestoreEntries(PropEntry *pp, int int_key)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
RestoreAtom(AtomEntry *at)
|
||||
{
|
||||
AtomEntry *nat;
|
||||
|
||||
#ifdef DEBUG_RESTORE2 /* useful during debug */
|
||||
if (IsWideAtom(AbsAtom(at)))
|
||||
fprintf(errout, "Restoring %S\n", at->WStrOfAE);
|
||||
else
|
||||
fprintf(errout, "Restoring %s\n", at->StrOfAE);
|
||||
#endif
|
||||
at->PropsOfAE = PropAdjust(at->PropsOfAE);
|
||||
RestoreEntries(RepProp(at->PropsOfAE), FALSE);
|
||||
/* cannot use AtomAdjust without breaking agc */
|
||||
nat = RepAtom(at->NextOfAE);
|
||||
if (nat)
|
||||
at->NextOfAE = AbsAtom(AtomEntryAdjust(nat));
|
||||
}
|
||||
|
Reference in New Issue
Block a user