1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 18:00:40 -08:00

Improve control over checking:

1. Where Type is a pointer type with a signature, replace CHECKL(TypeCheck(val)) with CHECKD(Type, val).
2. Where Type is a pointer type with no signature, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val).
3. Where Type is a pointer type with a signature, but the structure is not visible at point of checking, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val). Reference <design/check/#.hidden-type>
4. Make BTCheck extern and use it where possible.
5. Replace AVER(TypeCheck(val)) with AVERT(Type, val).

Copied from Perforce
 Change: 185263
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-04-06 22:51:05 +01:00
parent 9c54379464
commit d3d2795fce
46 changed files with 287 additions and 278 deletions

View file

@ -89,7 +89,7 @@ static Bool GenDescCheck(GenDesc gen)
CHECKL(gen->mortality <= 1.0);
CHECKL(gen->proflow >= 0.0);
CHECKL(gen->proflow <= 1.0);
CHECKL(RingCheck(&gen->locusRing));
CHECKD_NOSIG(Ring, &gen->locusRing);
return TRUE;
}
@ -192,7 +192,7 @@ Bool ChainCheck(Chain chain)
CHECKS(Chain, chain);
CHECKU(Arena, chain->arena);
CHECKL(RingCheck(&chain->chainRing));
CHECKD_NOSIG(Ring, &chain->chainRing);
CHECKL(TraceSetCheck(chain->activeTraces));
CHECKL(chain->genCount > 0);
for (i = 0; i < chain->genCount; ++i) {
@ -458,7 +458,7 @@ Bool PoolGenCheck(PoolGen gen)
/* nothing to check about serial */
CHECKU(Pool, gen->pool);
CHECKU(Chain, gen->chain);
CHECKL(RingCheck(&gen->genRing));
CHECKD_NOSIG(Ring, &gen->genRing);
CHECKL(gen->newSize <= gen->totalSize);
return TRUE;
}
@ -501,7 +501,7 @@ void LocusFinish(Arena arena)
Bool LocusCheck(Arena arena)
{
/* Can't check arena, because this is part of ArenaCheck. */
CHECKL(GenDescCheck(&arena->topGen));
CHECKD(GenDesc, &arena->topGen);
return TRUE;
}