mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-22 23:04:12 -07:00
Fix assertion text in the manual.
Place a cross-reference by each assertion the appears in the manual, to assist in keeping the manual up to date. Copied from Perforce Change: 192097 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
88a58c8848
commit
55adbe705d
15 changed files with 46 additions and 34 deletions
|
|
@ -485,7 +485,7 @@ Res BufferReserve(Addr *pReturn, Buffer buffer, Size size)
|
|||
AVERT(Buffer, buffer);
|
||||
AVER(size > 0);
|
||||
AVER(SizeIsAligned(size, BufferPool(buffer)->alignment));
|
||||
AVER(BufferIsReady(buffer));
|
||||
AVER(BufferIsReady(buffer)); /* <design/check/#.common> */
|
||||
|
||||
/* Is there enough room in the unallocated portion of the buffer to */
|
||||
/* satisfy the request? If so, just increase the alloc marker and */
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* dbgpool.c: POOL DEBUG MIXIN
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*
|
||||
* .source: design.mps.object-debug
|
||||
|
|
@ -523,7 +523,7 @@ static void fenceFree(PoolDebugMixin debug,
|
|||
{
|
||||
Size alignedFenceSize, alignedSize;
|
||||
|
||||
ASSERT(fenceCheck(debug, pool, old, size), "fencepost check on free");
|
||||
ASSERT(fenceCheck(debug, pool, old, size), "fencepost check on free"); /* <design/check/#.common> */
|
||||
|
||||
alignedFenceSize = SizeAlignUp(debug->fenceSize, PoolAlignment(pool));
|
||||
alignedSize = SizeAlignUp(size, PoolAlignment(pool));
|
||||
|
|
@ -738,7 +738,7 @@ void DebugPoolFreeCheck(Pool pool, Addr base, Addr limit)
|
|||
AVERT(PoolDebugMixin, debug);
|
||||
if (debug->freeSize != 0)
|
||||
ASSERT(freeCheck(debug, pool, base, limit),
|
||||
"free space corrupted on release");
|
||||
"free space corrupted on release"); /* <design/check/#.common> */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -784,7 +784,7 @@ void PoolClassMixInDebug(PoolClass klass)
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (C) 2001-2016 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* format.c: OBJECT FORMATS
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (c) 2002 Global Graphics Software.
|
||||
*
|
||||
* DESIGN
|
||||
|
|
@ -168,7 +168,7 @@ Res FormatCreate(Format *formatReturn, Arena arena, ArgList args)
|
|||
void FormatDestroy(Format format)
|
||||
{
|
||||
AVERT(Format, format);
|
||||
AVER(format->poolCount == 0);
|
||||
AVER(format->poolCount == 0); /* <design/check/#.common> */
|
||||
|
||||
RingRemove(&format->arenaRing);
|
||||
|
||||
|
|
@ -250,7 +250,7 @@ Res FormatDescribe(Format format, mps_lib_FILE *stream, Count depth)
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (C) 2001-2016 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -464,12 +464,12 @@ void GlobalsPrepareToDestroy(Globals arenaGlobals)
|
|||
* and so RingCheck dereferences a pointer into that unmapped memory
|
||||
* and we get a crash instead of an assertion. See job000652.
|
||||
*/
|
||||
AVER(RingIsSingle(&arena->formatRing));
|
||||
AVER(RingIsSingle(&arena->chainRing));
|
||||
AVER(RingIsSingle(&arena->formatRing)); /* <design/check/#.common> */
|
||||
AVER(RingIsSingle(&arena->chainRing)); /* <design/check/#.common> */
|
||||
AVER(RingIsSingle(&arena->messageRing));
|
||||
AVER(RingIsSingle(&arena->threadRing));
|
||||
AVER(RingIsSingle(&arena->threadRing)); /* <design/check/#.common> */
|
||||
AVER(RingIsSingle(&arena->deadRing));
|
||||
AVER(RingIsSingle(&arenaGlobals->rootRing));
|
||||
AVER(RingIsSingle(&arenaGlobals->rootRing)); /* <design/check/#.common> */
|
||||
for(rank = RankMIN; rank < RankLIMIT; ++rank)
|
||||
AVER(RingIsSingle(&arena->greyRing[rank]));
|
||||
|
||||
|
|
@ -479,7 +479,7 @@ void GlobalsPrepareToDestroy(Globals arenaGlobals)
|
|||
* 2. arena->controlPoolStruct.blockPoolStruct
|
||||
* 3. arena->controlPoolStruct.spanPoolStruct
|
||||
*/
|
||||
AVER(RingLength(&arenaGlobals->poolRing) == 4);
|
||||
AVER(RingLength(&arenaGlobals->poolRing) == 4); /* <design/check/#.common> */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* lockix.c: RECURSIVE LOCKS FOR POSIX SYSTEMS
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* .posix: The implementation uses a POSIX interface, and should be reusable
|
||||
* for many Unix-like operating systems.
|
||||
|
|
@ -122,7 +122,7 @@ void (LockClaim)(Lock lock)
|
|||
|
||||
res = pthread_mutex_lock(&lock->mut);
|
||||
/* pthread_mutex_lock will error if we own the lock already. */
|
||||
AVER(res == 0);
|
||||
AVER(res == 0); /* <design/check/#.common> */
|
||||
|
||||
/* This should be the first claim. Now we own the mutex */
|
||||
/* it is ok to check this. */
|
||||
|
|
@ -245,7 +245,7 @@ void (LockReleaseGlobal)(void)
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (C) 2001-2016 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* lockli.c: RECURSIVE LOCKS FOR POSIX SYSTEMS
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* .linux: This implementation currently just supports LinuxThreads
|
||||
* (platform MPS_OS_LI), Single Unix i/f.
|
||||
|
|
@ -136,7 +136,7 @@ void (LockClaim)(Lock lock)
|
|||
|
||||
res = pthread_mutex_lock(&lock->mut);
|
||||
/* pthread_mutex_lock will error if we own the lock already. */
|
||||
AVER(res == 0);
|
||||
AVER(res == 0); /* <design/check/#.common> */
|
||||
|
||||
/* This should be the first claim. Now we own the mutex */
|
||||
/* it is ok to check this. */
|
||||
|
|
@ -259,7 +259,7 @@ void (LockReleaseGlobal)(void)
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (C) 2001-2016 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* lockw3.c: RECURSIVE LOCKS IN WIN32
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* .design: These are implemented using critical sections.
|
||||
* See the section titled "Synchronization functions" in the Groups
|
||||
|
|
@ -75,7 +75,7 @@ void (LockClaim)(Lock lock)
|
|||
EnterCriticalSection(&lock->cs);
|
||||
/* This should be the first claim. Now we are inside the
|
||||
* critical section it is ok to check this. */
|
||||
AVER(lock->claims == 0);
|
||||
AVER(lock->claims == 0); /* <design/check/#.common> */
|
||||
lock->claims = 1;
|
||||
}
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ void (LockReleaseGlobal)(void)
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (C) 2001-2016 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ void ChainDestroy(Chain chain)
|
|||
size_t i;
|
||||
|
||||
AVERT(Chain, chain);
|
||||
AVER(chain->activeTraces == TraceSetEMPTY);
|
||||
AVER(chain->activeTraces == TraceSetEMPTY); /* <design/check/#.common> */
|
||||
|
||||
arena = chain->arena;
|
||||
genCount = chain->genCount;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* mpsi.c: MEMORY POOL SYSTEM C INTERFACE LAYER
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2015 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (c) 2002 Global Graphics Software.
|
||||
*
|
||||
* .purpose: This code bridges between the MPS interface to C,
|
||||
|
|
@ -1060,7 +1060,7 @@ mps_res_t mps_ap_fill(mps_addr_t *p_o, mps_ap_t mps_ap, size_t size)
|
|||
AVER(p_o != NULL);
|
||||
AVERT(Buffer, buf);
|
||||
AVER(size > 0);
|
||||
AVER(SizeIsAligned(size, BufferPool(buf)->alignment));
|
||||
AVER(SizeIsAligned(size, BufferPool(buf)->alignment)); /* <design/check/#.common> */
|
||||
|
||||
res = BufferFill(&p, buf, size);
|
||||
|
||||
|
|
@ -2141,7 +2141,7 @@ void _mps_args_set_key(mps_arg_s args[MPS_ARGS_MAX], unsigned i,
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (C) 2001-2015 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (C) 2001-2016 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1491,7 +1491,7 @@ static Res AMSFix(Pool pool, ScanState ss, Seg seg, Ref *refIO)
|
|||
case RankFINAL:
|
||||
case RankWEAK:
|
||||
AVER_CRITICAL(AddrIsAligned(base, PoolAlignment(pool)));
|
||||
AVER_CRITICAL(AMS_ALLOCED(seg, i));
|
||||
AVER_CRITICAL(AMS_ALLOCED(seg, i)); /* <design/check/#.common> */
|
||||
if (AMS_IS_WHITE(seg, i)) {
|
||||
ss->wasMarked = FALSE;
|
||||
if (ss->rank == RankWEAK) { /* then splat the reference */
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ static Res SNCFramePop(Pool pool, Buffer buf, AllocFrame frame)
|
|||
arena = PoolArena(pool);
|
||||
addr = (Addr)frame;
|
||||
foundSeg = SegOfAddr(&seg, arena, addr);
|
||||
AVER(foundSeg);
|
||||
AVER(foundSeg); /* <design/check/#.common> */
|
||||
AVER(SegPool(seg) == pool);
|
||||
|
||||
if (SegBuffer(seg) == buf) {
|
||||
|
|
|
|||
|
|
@ -1086,7 +1086,7 @@ static void gcSegFinish(Seg seg)
|
|||
gcseg->sig = SigInvalid;
|
||||
|
||||
/* Don't leave a dangling buffer allocating into hyperspace. */
|
||||
AVER(gcseg->buffer == NULL);
|
||||
AVER(gcseg->buffer == NULL); /* <design/check/#.common> */
|
||||
|
||||
RingFinish(&gcseg->greyRing);
|
||||
|
||||
|
|
|
|||
|
|
@ -1178,7 +1178,7 @@ static Res traceScanSegRes(TraceSet ts, Rank rank, Arena arena, Seg seg)
|
|||
/* .verify.segsummary: were the seg contents, as found by this
|
||||
* scan, consistent with the recorded SegSummary?
|
||||
*/
|
||||
AVER(RefSetSub(ScanStateUnfixedSummary(ss), SegSummary(seg)));
|
||||
AVER(RefSetSub(ScanStateUnfixedSummary(ss), SegSummary(seg))); /* <design/check/#.common> */
|
||||
|
||||
/* Write barrier deferral -- see design.mps.write-barrier.deferral. */
|
||||
/* Did the segment refer to the white set? */
|
||||
|
|
@ -1373,7 +1373,7 @@ mps_res_t _mps_fix2(mps_ss_t mps_ss, mps_addr_t *mps_ref_io)
|
|||
if (!BTGet(chunk->allocTable, i)) {
|
||||
/* Reference points into a chunk but not to an allocated tract.
|
||||
* See <design/trace/#exact.legal> */
|
||||
AVER_CRITICAL(ss->rank < RankEXACT);
|
||||
AVER_CRITICAL(ss->rank < RankEXACT); /* <design/check/#.common> */
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,6 +122,18 @@ reference this tag. The structure could be considered for addition to
|
|||
``mpmst.h``.
|
||||
|
||||
|
||||
Common assertions
|
||||
-----------------
|
||||
|
||||
_`.common`: Some assertions are commonly triggered by mistakes in the
|
||||
:term:`client program`. These are listed in the section "Common
|
||||
assertions and their causes" in the MPS Reference, together with an
|
||||
explanation of their likely cause, and advice for fixing the problem.
|
||||
To assist with keeping the MPS Reference up to date, these assertions
|
||||
are marked with a cross-reference to this tag. When you update the
|
||||
assertion, you must also update the MPS Reference.
|
||||
|
||||
|
||||
Document History
|
||||
----------------
|
||||
|
||||
|
|
@ -138,7 +150,7 @@ Document History
|
|||
Copyright and License
|
||||
---------------------
|
||||
|
||||
Copyright © 2013-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
Copyright © 2013-2016 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
All rights reserved. This is an open source license. Contact
|
||||
Ravenbrook for commercial licensing options.
|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ this documentation.
|
|||
It is necessary to call :c:func:`mps_fmt_destroy` first.
|
||||
|
||||
|
||||
``global.c: RingIsSingle(&arena->rootRing)``
|
||||
``global.c: RingIsSingle(&arenaGlobals->rootRing)``
|
||||
|
||||
The client program called :c:func:`mps_arena_destroy` without
|
||||
destroying all the :term:`roots` belonging to the arena.
|
||||
|
|
@ -300,7 +300,7 @@ this documentation.
|
|||
It is necessary to call :c:func:`mps_thread_dereg` first.
|
||||
|
||||
|
||||
``global.c: RingLength(&arenaGlobals->poolRing) == 5``
|
||||
``global.c: RingLength(&arenaGlobals->poolRing) == 4``
|
||||
|
||||
The client program called :c:func:`mps_arena_destroy` without
|
||||
destroying all the :term:`pools` belonging to the arena.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue