fix bad marking of dbterms (obs from Ines Dutra).
This commit is contained in:
parent
e7f5c50707
commit
378035a4b0
18
C/agc.c
18
C/agc.c
@ -74,6 +74,7 @@ CleanAtomMarkedBit(Atom a)
|
|||||||
return (Atom)c;
|
return (Atom)c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline Functor
|
static inline Functor
|
||||||
FuncAdjust(Functor f)
|
FuncAdjust(Functor f)
|
||||||
{
|
{
|
||||||
@ -111,6 +112,22 @@ AtomAdjust(Atom a)
|
|||||||
return(a);
|
return(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Term AdjustDBTerm(Term, Term *);
|
||||||
|
|
||||||
|
static Term
|
||||||
|
CodeComposedTermAdjust(Term t)
|
||||||
|
{
|
||||||
|
Term *base;
|
||||||
|
|
||||||
|
if (IsApplTerm(t)) {
|
||||||
|
base = RepAppl(t);
|
||||||
|
} else {
|
||||||
|
base = RepPair(t);
|
||||||
|
}
|
||||||
|
return AdjustDBTerm(t, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define IsOldCode(P) FALSE
|
#define IsOldCode(P) FALSE
|
||||||
#define IsOldCodeCellPtr(P) FALSE
|
#define IsOldCodeCellPtr(P) FALSE
|
||||||
#define IsOldDelay(P) FALSE
|
#define IsOldDelay(P) FALSE
|
||||||
@ -145,7 +162,6 @@ AtomAdjust(Atom a)
|
|||||||
#define AtomEntryAdjust(P) (P)
|
#define AtomEntryAdjust(P) (P)
|
||||||
#define GlobalEntryAdjust(P) (P)
|
#define GlobalEntryAdjust(P) (P)
|
||||||
#define BlobTermAdjust(P) (P)
|
#define BlobTermAdjust(P) (P)
|
||||||
#define CodeComposedTermAdjust(P) (P)
|
|
||||||
#define CellPtoHeapAdjust(P) (P)
|
#define CellPtoHeapAdjust(P) (P)
|
||||||
#define PtoAtomHashEntryAdjust(P) (P)
|
#define PtoAtomHashEntryAdjust(P) (P)
|
||||||
#define CellPtoHeapCellAdjust(P) (P)
|
#define CellPtoHeapCellAdjust(P) (P)
|
||||||
|
@ -792,11 +792,13 @@ ConstantTermAdjust (Term t)
|
|||||||
return AtomTermAdjust(t);
|
return AtomTermAdjust(t);
|
||||||
else if (IsIntTerm(t))
|
else if (IsIntTerm(t))
|
||||||
return t;
|
return t;
|
||||||
else if (IsApplTerm(t))
|
else if (IsApplTerm(t) && IsBlobFunctor(FunctorOfTerm(t))) {
|
||||||
return BlobTermAdjust(t);
|
return BlobTermAdjust(t);
|
||||||
else if (IsPairTerm(t))
|
} else if (IsApplTerm(t) || IsPairTerm(t)) {
|
||||||
return CodeComposedTermAdjust(t);
|
return CodeComposedTermAdjust(t);
|
||||||
else return t;
|
} else {
|
||||||
|
return t;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -246,11 +246,13 @@ ConstantTermAdjust (Term t)
|
|||||||
return AtomTermAdjust(t);
|
return AtomTermAdjust(t);
|
||||||
else if (IsIntTerm(t))
|
else if (IsIntTerm(t))
|
||||||
return t;
|
return t;
|
||||||
else if (IsApplTerm(t))
|
else if (IsApplTerm(t) && IsBlobFunctor(FunctorOfTerm(t))) {
|
||||||
return BlobTermAdjust(t);
|
return BlobTermAdjust(t);
|
||||||
else if (IsPairTerm(t))
|
} else if (IsApplTerm(t) || IsPairTerm(t)) {
|
||||||
return CodeComposedTermAdjust(t);
|
return CodeComposedTermAdjust(t);
|
||||||
else return t;
|
} else {
|
||||||
|
return t;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now, everything on its place so you must adjust the pointers */
|
/* Now, everything on its place so you must adjust the pointers */
|
||||||
|
Reference in New Issue
Block a user