mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Back out change 185626 (violates the design.mps.writef.snazzy).
Copied from Perforce Change: 185941 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
3f46ffffd3
commit
d1b44a4f05
28 changed files with 226 additions and 243 deletions
|
|
@ -166,10 +166,10 @@ Res ABQDescribe(ABQ abq, ABQDescribeElement describeElement, mps_lib_FILE *strea
|
|||
|
||||
res = WriteF(stream,
|
||||
"ABQ $P\n{\n", (WriteFP)abq,
|
||||
"elements: $U \n", (WriteFU)abq->elements,
|
||||
"in: $U \n", (WriteFU)abq->in,
|
||||
"out: $U \n", (WriteFU)abq->out,
|
||||
"queue: \n",
|
||||
" elements: $U \n", (WriteFU)abq->elements,
|
||||
" in: $U \n", (WriteFU)abq->in,
|
||||
" out: $U \n", (WriteFU)abq->out,
|
||||
" queue: \n",
|
||||
NULL);
|
||||
if(res != ResOK)
|
||||
return res;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ static Res ArenaTrivDescribe(Arena arena, mps_lib_FILE *stream)
|
|||
* subclass describe method should avoid invoking
|
||||
* ARENA_SUPERCLASS()->describe. RHSK 2007-04-27.
|
||||
*/
|
||||
return WriteF(stream, "No class-specific description available.\n", NULL);
|
||||
return WriteF(stream,
|
||||
" No class-specific description available.\n", NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -436,14 +437,14 @@ Res ArenaDescribe(Arena arena, mps_lib_FILE *stream)
|
|||
if (stream == NULL) return ResFAIL;
|
||||
|
||||
res = WriteF(stream, "Arena $P {\n", (WriteFP)arena,
|
||||
"class $P (\"$S\")\n",
|
||||
" class $P (\"$S\")\n",
|
||||
(WriteFP)arena->class, arena->class->name,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
if (arena->poolReady) {
|
||||
res = WriteF(stream,
|
||||
"controlPool $P\n", (WriteFP)&arena->controlPoolStruct,
|
||||
" controlPool $P\n", (WriteFP)&arena->controlPoolStruct,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
}
|
||||
|
|
@ -451,26 +452,26 @@ Res ArenaDescribe(Arena arena, mps_lib_FILE *stream)
|
|||
/* Note: this Describe clause calls a function */
|
||||
reserved = ArenaReserved(arena);
|
||||
res = WriteF(stream,
|
||||
"reserved $W <-- "
|
||||
" reserved $W <-- "
|
||||
"total size of address-space reserved\n",
|
||||
(WriteFW)reserved,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
res = WriteF(stream,
|
||||
"committed $W <-- "
|
||||
" committed $W <-- "
|
||||
"total bytes currently stored (in RAM or swap)\n",
|
||||
(WriteFW)arena->committed,
|
||||
"commitLimit $W\n", (WriteFW)arena->commitLimit,
|
||||
"spareCommitted $W\n", (WriteFW)arena->spareCommitted,
|
||||
"spareCommitLimit $W\n", (WriteFW)arena->spareCommitLimit,
|
||||
"zoneShift $U\n", (WriteFU)arena->zoneShift,
|
||||
"alignment $W\n", (WriteFW)arena->alignment,
|
||||
" commitLimit $W\n", (WriteFW)arena->commitLimit,
|
||||
" spareCommitted $W\n", (WriteFW)arena->spareCommitted,
|
||||
" spareCommitLimit $W\n", (WriteFW)arena->spareCommitLimit,
|
||||
" zoneShift $U\n", (WriteFU)arena->zoneShift,
|
||||
" alignment $W\n", (WriteFW)arena->alignment,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
res = WriteF(stream,
|
||||
"droppedMessages $U$S\n", (WriteFU)arena->droppedMessages,
|
||||
" droppedMessages $U$S\n", (WriteFU)arena->droppedMessages,
|
||||
(arena->droppedMessages == 0 ? "" : " -- MESSAGES DROPPED!"),
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
|
@ -478,8 +479,13 @@ Res ArenaDescribe(Arena arena, mps_lib_FILE *stream)
|
|||
res = (*arena->class->describe)(arena, stream);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
/* Do not call GlobalsDescribe: it makes too much output, thanks.
|
||||
* RHSK 2007-04-27
|
||||
*/
|
||||
#if 0
|
||||
res = GlobalsDescribe(ArenaGlobals(arena), stream);
|
||||
if (res != ResOK) return res;
|
||||
#endif
|
||||
|
||||
res = WriteF(stream,
|
||||
"} Arena $P ($U)\n", (WriteFP)arena,
|
||||
|
|
|
|||
|
|
@ -205,13 +205,13 @@ static Res VMArenaDescribe(Arena arena, mps_lib_FILE *stream)
|
|||
*/
|
||||
|
||||
res = WriteF(stream,
|
||||
"spareSize $U\n", (WriteFU)vmArena->spareSize,
|
||||
"extendBy $U\n", (WriteFU)vmArena->extendBy,
|
||||
"extendMin $U\n", (WriteFU)vmArena->extendMin,
|
||||
" spareSize: $U\n", (WriteFU)vmArena->spareSize,
|
||||
NULL);
|
||||
if(res != ResOK)
|
||||
return res;
|
||||
|
||||
/* (incomplete: some fields are not Described) */
|
||||
|
||||
return ResOK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,25 +156,25 @@ Res BufferDescribe(Buffer buffer, mps_lib_FILE *stream)
|
|||
res = WriteF(stream,
|
||||
"Buffer $P ($U) {\n",
|
||||
(WriteFP)buffer, (WriteFU)buffer->serial,
|
||||
"class $P (\"$S\")\n",
|
||||
" class $P (\"$S\")\n",
|
||||
(WriteFP)buffer->class, buffer->class->name,
|
||||
"Arena $P\n", (WriteFP)buffer->arena,
|
||||
"Pool $P\n", (WriteFP)buffer->pool,
|
||||
buffer->isMutator ? "Mutator" : "Internal", " Buffer\n",
|
||||
"mode $C$C$C$C (TRANSITION, LOGGED, FLIPPED, ATTACHED)\n",
|
||||
" Arena $P\n", (WriteFP)buffer->arena,
|
||||
" Pool $P\n", (WriteFP)buffer->pool,
|
||||
" ", buffer->isMutator ? "Mutator" : "Internal", " Buffer\n",
|
||||
" mode $C$C$C$C (TRANSITION, LOGGED, FLIPPED, ATTACHED)\n",
|
||||
(WriteFC)((buffer->mode & BufferModeTRANSITION) ? 't' : '_'),
|
||||
(WriteFC)((buffer->mode & BufferModeLOGGED) ? 'l' : '_'),
|
||||
(WriteFC)((buffer->mode & BufferModeFLIPPED) ? 'f' : '_'),
|
||||
(WriteFC)((buffer->mode & BufferModeATTACHED) ? 'a' : '_'),
|
||||
"fillSize $UKb\n", (WriteFU)(buffer->fillSize / 1024),
|
||||
"emptySize $UKb\n", (WriteFU)(buffer->emptySize / 1024),
|
||||
"alignment $W\n", (WriteFW)buffer->alignment,
|
||||
"base $A\n", buffer->base,
|
||||
"initAtFlip $A\n", buffer->initAtFlip,
|
||||
"init $A\n", buffer->ap_s.init,
|
||||
"alloc $A\n", buffer->ap_s.alloc,
|
||||
"limit $A\n", buffer->ap_s.limit,
|
||||
"poolLimit $A\n", buffer->poolLimit,
|
||||
" fillSize $UKb\n", (WriteFU)(buffer->fillSize / 1024),
|
||||
" emptySize $UKb\n", (WriteFU)(buffer->emptySize / 1024),
|
||||
" alignment $W\n", (WriteFW)buffer->alignment,
|
||||
" base $A\n", buffer->base,
|
||||
" initAtFlip $A\n", buffer->initAtFlip,
|
||||
" init $A\n", buffer->ap_s.init,
|
||||
" alloc $A\n", buffer->ap_s.alloc,
|
||||
" limit $A\n", buffer->ap_s.limit,
|
||||
" poolLimit $A\n", buffer->poolLimit,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
|
|
@ -1439,8 +1439,8 @@ static Res segBufDescribe(Buffer buffer, mps_lib_FILE *stream)
|
|||
if (res != ResOK) return res;
|
||||
|
||||
res = WriteF(stream,
|
||||
"Seg $P\n", (WriteFP)segbuf->seg,
|
||||
"rankSet $U\n", (WriteFU)segbuf->rankSet,
|
||||
" Seg $P\n", (WriteFP)segbuf->seg,
|
||||
" rankSet $U\n", (WriteFU)segbuf->rankSet,
|
||||
NULL);
|
||||
|
||||
return res;
|
||||
|
|
|
|||
|
|
@ -1066,11 +1066,11 @@ Res CBSDescribe(CBS cbs, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"CBS $P {\n", (WriteFP)cbs,
|
||||
"alignment: $U\n", (WriteFU)cbs->alignment,
|
||||
"blockPool: $P\n", (WriteFP)cbsBlockPool(cbs),
|
||||
"fastFind: $U\n", (WriteFU)cbs->fastFind,
|
||||
"inCBS: $U\n", (WriteFU)cbs->inCBS,
|
||||
"treeSize: $U\n", (WriteFU)cbs->treeSize,
|
||||
" alignment: $U\n", (WriteFU)cbs->alignment,
|
||||
" blockPool: $P\n", (WriteFP)cbsBlockPool(cbs),
|
||||
" fastFind: $U\n", (WriteFU)cbs->fastFind,
|
||||
" inCBS: $U\n", (WriteFU)cbs->inCBS,
|
||||
" treeSize: $U\n", (WriteFU)cbs->treeSize,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
|
|
@ -1079,7 +1079,7 @@ Res CBSDescribe(CBS cbs, mps_lib_FILE *stream)
|
|||
|
||||
METER_WRITE(cbs->treeSearch, stream);
|
||||
|
||||
res = WriteF(stream, "} CBS $P\n", (WriteFP)cbs, NULL);
|
||||
res = WriteF(stream, "}\n", NULL);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -331,24 +331,24 @@ Res EventDescribe(Event event, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"Event $P {\n", (WriteFP)event,
|
||||
"code $U\n", (WriteFU)event->any.code,
|
||||
"clock ", NULL);
|
||||
" code $U\n", (WriteFU)event->any.code,
|
||||
" clock ", NULL);
|
||||
if (res != ResOK) return res;
|
||||
res = EVENT_CLOCK_WRITE(stream, event->any.clock);
|
||||
if (res != ResOK) return res;
|
||||
res = WriteF(stream, "\nsize $U\n", (WriteFU)event->any.size, NULL);
|
||||
res = WriteF(stream, "\n size $U\n", (WriteFU)event->any.size, NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
switch (event->any.code) {
|
||||
|
||||
#define EVENT_DESC_PARAM(name, index, sort, ident) \
|
||||
"\n$S", (WriteFS)#ident, \
|
||||
"\n $S", (WriteFS)#ident, \
|
||||
EVENT_WRITE_PARAM_##sort(name, index, sort, ident)
|
||||
|
||||
#define EVENT_DESC(X, name, _code, always, kind) \
|
||||
case _code: \
|
||||
res = WriteF(stream, \
|
||||
"event \"$S\"", (WriteFS)#name, \
|
||||
" event \"$S\"", (WriteFS)#name, \
|
||||
EVENT_##name##_PARAMS(EVENT_DESC_PARAM, name) \
|
||||
NULL); \
|
||||
if (res != ResOK) return res; \
|
||||
|
|
@ -357,7 +357,7 @@ Res EventDescribe(Event event, mps_lib_FILE *stream)
|
|||
EVENT_LIST(EVENT_DESC, X)
|
||||
|
||||
default:
|
||||
res = WriteF(stream, "event type unknown", NULL);
|
||||
res = WriteF(stream, " event type unknown", NULL);
|
||||
if (res != ResOK) return res;
|
||||
/* TODO: Hexdump unknown event contents. */
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -199,14 +199,14 @@ Res FormatDescribe(Format format, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"Format $P ($U) {\n", (WriteFP)format, (WriteFU)format->serial,
|
||||
"arena $P ($U)\n",
|
||||
" arena $P ($U)\n",
|
||||
(WriteFP)format->arena, (WriteFU)format->arena->serial,
|
||||
"alignment $W\n", (WriteFW)format->alignment,
|
||||
"scan $F\n", (WriteFF)format->scan,
|
||||
"skip $F\n", (WriteFF)format->skip,
|
||||
"move $F\n", (WriteFF)format->move,
|
||||
"isMoved $F\n", (WriteFF)format->isMoved,
|
||||
"pad $F\n", (WriteFF)format->pad,
|
||||
" alignment $W\n", (WriteFW)format->alignment,
|
||||
" scan $F\n", (WriteFF)format->scan,
|
||||
" skip $F\n", (WriteFF)format->skip,
|
||||
" move $F\n", (WriteFF)format->move,
|
||||
" isMoved $F\n", (WriteFF)format->isMoved,
|
||||
" pad $F\n", (WriteFF)format->pad,
|
||||
"} Format $P ($U)\n", (WriteFP)format, (WriteFU)format->serial,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ static Bool freelistDescribeIterateMethod(Bool *deleteReturn, Range range,
|
|||
UNUSED(closureS);
|
||||
|
||||
res = WriteF(stream,
|
||||
"[$P,", (WriteFP)RangeBase(range),
|
||||
" [$P,", (WriteFP)RangeBase(range),
|
||||
"$P)", (WriteFP)RangeLimit(range),
|
||||
" {$U}\n", (WriteFU)RangeSize(range),
|
||||
NULL);
|
||||
|
|
@ -577,8 +577,8 @@ Res FreelistDescribe(Freelist fl, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"Freelist $P {\n", (WriteFP)fl,
|
||||
"alignment $U\n", (WriteFU)fl->alignment,
|
||||
"listSize $U\n", (WriteFU)fl->listSize,
|
||||
" alignment = $U\n", (WriteFU)fl->alignment,
|
||||
" listSize = $U\n", (WriteFU)fl->listSize,
|
||||
NULL);
|
||||
|
||||
FreelistIterate(fl, freelistDescribeIterateMethod, stream, 0);
|
||||
|
|
|
|||
|
|
@ -1048,53 +1048,50 @@ Res GlobalsDescribe(Globals arenaGlobals, mps_lib_FILE *stream)
|
|||
|
||||
arena = GlobalsArena(arenaGlobals);
|
||||
res = WriteF(stream,
|
||||
"Globals $P {\n", (WriteFP)arenaGlobals,
|
||||
"mpsVersion $S\n", arenaGlobals->mpsVersionString,
|
||||
"lock $P\n", (WriteFP)arenaGlobals->lock,
|
||||
"pollThreshold $U kB\n",
|
||||
" mpsVersion $S\n", arenaGlobals->mpsVersionString,
|
||||
" lock $P\n", (WriteFP)arenaGlobals->lock,
|
||||
" pollThreshold $U kB\n",
|
||||
(WriteFU)(arenaGlobals->pollThreshold / 1024),
|
||||
arenaGlobals->insidePoll ? "inside poll\n" : "outside poll\n",
|
||||
arenaGlobals->clamped ? "clamped\n" : "released\n",
|
||||
"fillMutatorSize $U kB\n",
|
||||
(WriteFU)(arenaGlobals->fillMutatorSize / 1024),
|
||||
"emptyMutatorSize $U kB\n",
|
||||
(WriteFU)(arenaGlobals->emptyMutatorSize / 1024),
|
||||
"allocMutatorSize $U kB\n",
|
||||
(WriteFU)(arenaGlobals->allocMutatorSize / 1024),
|
||||
"fillInternalSize $U kB\n",
|
||||
(WriteFU)(arenaGlobals->fillInternalSize / 1024),
|
||||
"emptyInternalSize $U kB\n",
|
||||
(WriteFU)(arenaGlobals->emptyInternalSize / 1024),
|
||||
"poolSerial $U\n", (WriteFU)arenaGlobals->poolSerial,
|
||||
"rootSerial $U\n", (WriteFU)arenaGlobals->rootSerial,
|
||||
"formatSerial $U\n", (WriteFU)arena->formatSerial,
|
||||
"threadSerial $U\n", (WriteFU)arena->threadSerial,
|
||||
" fillMutatorSize $U kB\n",
|
||||
(WriteFU)(arenaGlobals->fillMutatorSize / 1024),
|
||||
" emptyMutatorSize $U kB\n",
|
||||
(WriteFU)(arenaGlobals->emptyMutatorSize / 1024),
|
||||
" allocMutatorSize $U kB\n",
|
||||
(WriteFU)(arenaGlobals->allocMutatorSize / 1024),
|
||||
" fillInternalSize $U kB\n",
|
||||
(WriteFU)(arenaGlobals->fillInternalSize / 1024),
|
||||
" emptyInternalSize $U kB\n",
|
||||
(WriteFU)(arenaGlobals->emptyInternalSize / 1024),
|
||||
" poolSerial $U\n", (WriteFU)arenaGlobals->poolSerial,
|
||||
" rootSerial $U\n", (WriteFU)arenaGlobals->rootSerial,
|
||||
" formatSerial $U\n", (WriteFU)arena->formatSerial,
|
||||
" threadSerial $U\n", (WriteFU)arena->threadSerial,
|
||||
arena->insideShield ? "inside shield\n" : "outside shield\n",
|
||||
"busyTraces $B\n", (WriteFB)arena->busyTraces,
|
||||
"flippedTraces $B\n", (WriteFB)arena->flippedTraces,
|
||||
"epoch $U\n", (WriteFU)arena->epoch,
|
||||
"history {\n",
|
||||
" busyTraces $B\n", (WriteFB)arena->busyTraces,
|
||||
" flippedTraces $B\n", (WriteFB)arena->flippedTraces,
|
||||
" epoch $U\n", (WriteFU)arena->epoch,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
for(i=0; i < LDHistoryLENGTH; ++ i) {
|
||||
res = WriteF(stream,
|
||||
"[$U] = $B\n", i, arena->history[i],
|
||||
" history[$U] = $B\n", i, arena->history[i],
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
}
|
||||
|
||||
res = WriteF(stream,
|
||||
"[note: indices are raw, not rotated]\n"
|
||||
"prehistory = $B\n", (WriteFB)arena->prehistory,
|
||||
"}\n",
|
||||
" [note: indices are raw, not rotated]\n"
|
||||
" prehistory = $B\n", (WriteFB)arena->prehistory,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
res = WriteF(stream,
|
||||
"suspended $S\n", arena->suspended ? "YES" : "NO",
|
||||
"shDepth $U\n", arena->shDepth,
|
||||
"shCacheI $U\n", arena->shCacheI,
|
||||
" suspended $S\n", arena->suspended ? "YES" : "NO",
|
||||
" shDepth $U\n", arena->shDepth,
|
||||
" shCacheI $U\n", arena->shCacheI,
|
||||
/* @@@@ should SegDescribe the cached segs? */
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
|
@ -1134,8 +1131,6 @@ Res GlobalsDescribe(Globals arenaGlobals, mps_lib_FILE *stream)
|
|||
TRACE_SET_ITER_END(ti, trace, TraceSetUNIV, arena);
|
||||
|
||||
/* @@@@ What about grey rings? */
|
||||
|
||||
res = WriteF(stream, "} Globals $P\n", (WriteFP)arenaGlobals, NULL);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -454,8 +454,6 @@ Res WriteF_v(mps_lib_FILE *stream, va_list args)
|
|||
Res WriteF_firstformat_v(mps_lib_FILE *stream,
|
||||
const char *firstformat, va_list args)
|
||||
{
|
||||
static size_t depth = 0;
|
||||
static Bool line_start = TRUE;
|
||||
const char *format;
|
||||
int r;
|
||||
size_t i;
|
||||
|
|
@ -470,28 +468,9 @@ Res WriteF_firstformat_v(mps_lib_FILE *stream,
|
|||
break;
|
||||
|
||||
while(*format != '\0') {
|
||||
if (*format == '}' && depth > 0)
|
||||
-- depth;
|
||||
if (line_start) {
|
||||
for (i = 0; i < depth; ++i) {
|
||||
r = mps_lib_fputs(" ", stream);
|
||||
if (r == mps_lib_EOF) return ResIO;
|
||||
}
|
||||
line_start = FALSE;
|
||||
}
|
||||
if (*format != '$') {
|
||||
r = mps_lib_fputc(*format, stream); /* Could be more efficient */
|
||||
if (r == mps_lib_EOF) return ResIO;
|
||||
switch (*format) {
|
||||
case '{':
|
||||
++ depth;
|
||||
break;
|
||||
case '\n':
|
||||
line_start = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
++format;
|
||||
AVER(*format != '\0');
|
||||
|
|
|
|||
|
|
@ -414,12 +414,12 @@ Res NailboardDescribe(Nailboard board, mps_lib_FILE *stream)
|
|||
return ResFAIL;
|
||||
|
||||
res = WriteF(stream,
|
||||
"Nailboard $P {\n", (WriteFP)board,
|
||||
"base $P\n", (WriteFP)RangeBase(&board->range),
|
||||
"limit $P\n", (WriteFP)RangeLimit(&board->range),
|
||||
"levels $U\n", (WriteFU)board->levels,
|
||||
"newNails $S\n", board->newNails ? "TRUE" : "FALSE",
|
||||
"alignShift $U\n", (WriteFU)board->alignShift,
|
||||
"Nailboard $P\n{\n", (WriteFP)board,
|
||||
" base: $P\n", (WriteFP)RangeBase(&board->range),
|
||||
" limit: $P\n", (WriteFP)RangeLimit(&board->range),
|
||||
" levels: $U\n", (WriteFU)board->levels,
|
||||
" newNails: $S\n", board->newNails ? "TRUE" : "FALSE",
|
||||
" alignShift: $U\n", (WriteFU)board->alignShift,
|
||||
NULL);
|
||||
if (res != ResOK)
|
||||
return res;
|
||||
|
|
@ -427,7 +427,7 @@ Res NailboardDescribe(Nailboard board, mps_lib_FILE *stream)
|
|||
for(i = 0; i < board->levels; ++i) {
|
||||
Count levelNails = nailboardLevelBits(nailboardNails(board), i);
|
||||
Count resetNails = BTCountResRange(board->level[i], 0, levelNails);
|
||||
res = WriteF(stream, "Level $U ($U bits, $U set): ",
|
||||
res = WriteF(stream, " Level $U ($U bits, $U set): ",
|
||||
i, levelNails, levelNails - resetNails, NULL);
|
||||
if (res != ResOK)
|
||||
return res;
|
||||
|
|
@ -441,7 +441,7 @@ Res NailboardDescribe(Nailboard board, mps_lib_FILE *stream)
|
|||
if (res != ResOK)
|
||||
return res;
|
||||
}
|
||||
res = WriteF(stream, "} Nailboard $P\n", (WriteFP)board, NULL);
|
||||
res = WriteF(stream, "}\n", NULL);
|
||||
if (res != ResOK)
|
||||
return res;
|
||||
|
||||
|
|
|
|||
|
|
@ -532,11 +532,11 @@ Res PoolDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"Pool $P ($U) {\n", (WriteFP)pool, (WriteFU)pool->serial,
|
||||
"class $P (\"$S\")\n",
|
||||
" class $P (\"$S\")\n",
|
||||
(WriteFP)pool->class, pool->class->name,
|
||||
"arena $P ($U)\n",
|
||||
" arena $P ($U)\n",
|
||||
(WriteFP)pool->arena, (WriteFU)pool->arena->serial,
|
||||
"alignment $W\n", (WriteFW)pool->alignment,
|
||||
" alignment $W\n", (WriteFW)pool->alignment,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
if (NULL != pool->format) {
|
||||
|
|
@ -544,14 +544,14 @@ Res PoolDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
if (res != ResOK) return res;
|
||||
}
|
||||
res = WriteF(stream,
|
||||
"fillMutatorSize $UKb\n",
|
||||
(WriteFU)(pool->fillMutatorSize / 1024),
|
||||
"emptyMutatorSize $UKb\n",
|
||||
(WriteFU)(pool->emptyMutatorSize / 1024),
|
||||
"fillInternalSize $UKb\n",
|
||||
(WriteFU)(pool->fillInternalSize / 1024),
|
||||
"emptyInternalSize $UKb\n",
|
||||
(WriteFU)(pool->emptyInternalSize / 1024),
|
||||
" fillMutatorSize $UKb\n",
|
||||
(WriteFU)(pool->fillMutatorSize / 1024),
|
||||
" emptyMutatorSize $UKb\n",
|
||||
(WriteFU)(pool->emptyMutatorSize / 1024),
|
||||
" fillInternalSize $UKb\n",
|
||||
(WriteFU)(pool->fillInternalSize / 1024),
|
||||
" emptyInternalSize $UKb\n",
|
||||
(WriteFU)(pool->emptyInternalSize / 1024),
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ Res PoolTrivDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
{
|
||||
AVERT(Pool, pool);
|
||||
AVER(stream != NULL);
|
||||
return WriteF(stream, "No class-specific description available.\n", NULL);
|
||||
return WriteF(stream, " No class-specific description available.\n", NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -259,23 +259,23 @@ static Res AMCSegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
limit = SegLimit(seg);
|
||||
|
||||
res = WriteF(stream,
|
||||
"AMC seg $P [$A,$A) {\n",
|
||||
"AMC seg $P [$A,$A){\n",
|
||||
(WriteFP)seg, (WriteFA)base, (WriteFA)limit,
|
||||
NULL);
|
||||
if(res != ResOK)
|
||||
return res;
|
||||
|
||||
if(amcSegHasNailboard(seg)) {
|
||||
res = WriteF(stream, "Boarded\n", NULL);
|
||||
res = WriteF(stream, " Boarded\n", NULL);
|
||||
} else if(SegNailed(seg) == TraceSetEMPTY) {
|
||||
res = WriteF(stream, "Mobile\n", NULL);
|
||||
res = WriteF(stream, " Mobile\n", NULL);
|
||||
} else {
|
||||
res = WriteF(stream, "Stuck\n", NULL);
|
||||
res = WriteF(stream, " Stuck\n", NULL);
|
||||
}
|
||||
if(res != ResOK)
|
||||
return res;
|
||||
|
||||
res = WriteF(stream, "Map: *===:object @+++:nails bbbb:buffer {\n", NULL);
|
||||
res = WriteF(stream, " Map: *===:object @+++:nails bbbb:buffer\n", NULL);
|
||||
if(res != ResOK)
|
||||
return res;
|
||||
|
||||
|
|
@ -288,7 +288,7 @@ static Res AMCSegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
Addr j;
|
||||
char c;
|
||||
|
||||
res = WriteF(stream, "$A ", i, NULL);
|
||||
res = WriteF(stream, " $A ", i, NULL);
|
||||
if(res != ResOK)
|
||||
return res;
|
||||
|
||||
|
|
@ -319,7 +319,7 @@ static Res AMCSegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
}
|
||||
|
||||
AMCSegSketch(seg, abzSketch, NELEMS(abzSketch));
|
||||
res = WriteF(stream, "}\nSketch: $S\n", (WriteFS)abzSketch, NULL);
|
||||
res = WriteF(stream, " Sketch: $S\n", (WriteFS)abzSketch, NULL);
|
||||
if(res != ResOK)
|
||||
return res;
|
||||
|
||||
|
|
@ -715,14 +715,14 @@ static Res amcGenDescribe(amcGen gen, mps_lib_FILE *stream)
|
|||
return ResFAIL;
|
||||
|
||||
res = WriteF(stream,
|
||||
"amcGen $P ($U) {\n",
|
||||
" amcGen $P ($U) {\n",
|
||||
(WriteFP)gen, (WriteFU)amcGenNr(gen),
|
||||
"buffer $P\n", gen->forward,
|
||||
"segs $U, totalSize $U, newSize $U\n",
|
||||
" buffer $P\n", gen->forward,
|
||||
" segs $U, totalSize $U, newSize $U\n",
|
||||
(WriteFU)gen->segs,
|
||||
(WriteFU)gen->pgen.totalSize,
|
||||
(WriteFU)gen->pgen.newSize,
|
||||
"} amcGen\n", NULL);
|
||||
" } amcGen\n", NULL);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -2279,7 +2279,7 @@ static Res AMCDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
(amc->rankSet == RankSetEMPTY) ? "AMCZ" : "AMC",
|
||||
" $P {\n", (WriteFP)amc, "pool $P ($U)\n",
|
||||
" $P {\n", (WriteFP)amc, " pool $P ($U)\n",
|
||||
(WriteFP)AMC2Pool(amc), (WriteFU)AMC2Pool(amc)->serial,
|
||||
NULL);
|
||||
if(res != ResOK)
|
||||
|
|
@ -2300,7 +2300,9 @@ static Res AMCDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
break;
|
||||
|
||||
}
|
||||
res = WriteF(stream, rampmode, " ($U)\n", (WriteFU)amc->rampCount, NULL);
|
||||
res = WriteF(stream,
|
||||
" ", rampmode, " ($U)\n", (WriteFU)amc->rampCount,
|
||||
NULL);
|
||||
if(res != ResOK)
|
||||
return res;
|
||||
|
||||
|
|
|
|||
|
|
@ -551,24 +551,24 @@ static Res AMSSegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
buffer = SegBuffer(seg);
|
||||
|
||||
res = WriteF(stream,
|
||||
"AMS $P\n", (WriteFP)amsseg->ams,
|
||||
"grains $W\n", (WriteFW)amsseg->grains,
|
||||
" AMS $P\n", (WriteFP)amsseg->ams,
|
||||
" grains $W\n", (WriteFW)amsseg->grains,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
if (amsseg->allocTableInUse)
|
||||
res = WriteF(stream,
|
||||
"alloctable $P\n", (WriteFP)amsseg->allocTable,
|
||||
" alloctable $P\n", (WriteFP)amsseg->allocTable,
|
||||
NULL);
|
||||
else
|
||||
res = WriteF(stream,
|
||||
"firstFree $W\n", (WriteFW)amsseg->firstFree,
|
||||
" firstFree $W\n", (WriteFW)amsseg->firstFree,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
res = WriteF(stream,
|
||||
"tables: nongrey $P, nonwhite $P\n",
|
||||
" tables: nongrey $P, nonwhite $P\n",
|
||||
(WriteFP)amsseg->nongreyTable,
|
||||
(WriteFP)amsseg->nonwhiteTable,
|
||||
"map: {\n",
|
||||
" map: \n",
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
|
|
@ -576,7 +576,7 @@ static Res AMSSegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
char c = 0;
|
||||
|
||||
if (i % 64 == 0) {
|
||||
res = WriteF(stream, "\n", NULL);
|
||||
res = WriteF(stream, "\n ", NULL);
|
||||
if (res != ResOK) return res;
|
||||
}
|
||||
|
||||
|
|
@ -606,7 +606,7 @@ static Res AMSSegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
WRITE_BUFFER_LIMIT(stream, seg, i+1, buffer, BufferLimit, "]");
|
||||
}
|
||||
|
||||
res = WriteF(stream, "}\n", NULL);
|
||||
res = WriteF(stream, "\n", NULL);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -1661,21 +1661,21 @@ static Res AMSDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"AMS $P {\n", (WriteFP)ams,
|
||||
"pool $P ($U)\n",
|
||||
" pool $P ($U)\n",
|
||||
(WriteFP)pool, (WriteFU)pool->serial,
|
||||
"size $W\n",
|
||||
" size $W\n",
|
||||
(WriteFW)ams->size,
|
||||
"grain shift $U\n", (WriteFU)ams->grainShift,
|
||||
"chain $P\n",
|
||||
" grain shift $U\n", (WriteFU)ams->grainShift,
|
||||
" chain $P\n",
|
||||
(WriteFP)ams->chain,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
res = WriteF(stream,
|
||||
"segments\n"
|
||||
" segments\n"
|
||||
" * = black, + = grey, - = white, . = alloc, ! = bad\n"
|
||||
" buffers: [ = base, < = scan limit, | = init,"
|
||||
" > = alloc, ] = limit\n",
|
||||
" buffers: [ = base, < = scan limit, | = init,\n"
|
||||
" > = alloc, ] = limit\n",
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
|
|
|
|||
|
|
@ -323,11 +323,11 @@ static Res MFSDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
AVER(stream != NULL);
|
||||
|
||||
res = WriteF(stream,
|
||||
"unrounded unit size $W\n", (WriteFW)mfs->unroundedUnitSize,
|
||||
"unit size $W\n", (WriteFW)mfs->unitSize,
|
||||
"extent size $W\n", (WriteFW)mfs->extendBy,
|
||||
"free list begins at $P\n", (WriteFP)mfs->freeList,
|
||||
"tract list begin at $P\n", (WriteFP)mfs->tractList,
|
||||
" unrounded unit size $W\n", (WriteFW)mfs->unroundedUnitSize,
|
||||
" unit size $W\n", (WriteFW)mfs->unitSize,
|
||||
" extent size $W\n", (WriteFW)mfs->extendBy,
|
||||
" free list begins at $P\n", (WriteFP)mfs->freeList,
|
||||
" tract list begin at $P\n", (WriteFP)mfs->tractList,
|
||||
NULL);
|
||||
if(res != ResOK) return res;
|
||||
|
||||
|
|
|
|||
|
|
@ -806,19 +806,17 @@ static Res MRGDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
if (stream == NULL) return ResFAIL;
|
||||
|
||||
arena = PoolArena(pool);
|
||||
res = WriteF(stream, "extendBy $W\n", mrg->extendBy, NULL);
|
||||
res = WriteF(stream, " extendBy $W\n", mrg->extendBy, NULL);
|
||||
if (res != ResOK) return res;
|
||||
res = WriteF(stream, "Entry queue {\n", NULL);
|
||||
res = WriteF(stream, " Entry queue:\n", NULL);
|
||||
if (res != ResOK) return res;
|
||||
RING_FOR(node, &mrg->entryRing, nextNode) {
|
||||
refPart = MRGRefPartOfLink(linkOfRing(node), arena);
|
||||
res = WriteF(stream, "at $A Ref $A\n",
|
||||
res = WriteF(stream, " at $A Ref $A\n",
|
||||
(WriteFA)refPart, (WriteFA)MRGRefPartRef(arena, refPart),
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
}
|
||||
res = WriteF(stream, "}\n", NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
return ResOK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -688,14 +688,14 @@ static Res MVDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
if(stream == NULL) return ResFAIL;
|
||||
|
||||
res = WriteF(stream,
|
||||
"blockPool $P ($U)\n",
|
||||
" blockPool $P ($U)\n",
|
||||
(WriteFP)mvBlockPool(mv), (WriteFU)mvBlockPool(mv)->serial,
|
||||
"spanPool $P ($U)\n",
|
||||
" spanPool $P ($U)\n",
|
||||
(WriteFP)mvSpanPool(mv), (WriteFU)mvSpanPool(mv)->serial,
|
||||
"extendBy $W\n", (WriteFW)mv->extendBy,
|
||||
"avgSize $W\n", (WriteFW)mv->avgSize,
|
||||
"maxSize $W\n", (WriteFW)mv->maxSize,
|
||||
"space $P\n", (WriteFP)mv->space,
|
||||
" extendBy $W\n", (WriteFW)mv->extendBy,
|
||||
" avgSize $W\n", (WriteFW)mv->avgSize,
|
||||
" maxSize $W\n", (WriteFW)mv->maxSize,
|
||||
" space $P\n", (WriteFP)mv->space,
|
||||
NULL);
|
||||
if(res != ResOK) return res;
|
||||
|
||||
|
|
@ -711,11 +711,11 @@ static Res MVDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
if(res != ResOK) return res;
|
||||
|
||||
res = WriteF(stream,
|
||||
"span $P\n", (WriteFP)span,
|
||||
"tract $P\n", (WriteFP)span->tract,
|
||||
"space $W\n", (WriteFW)span->space,
|
||||
"blocks $U\n", (WriteFU)span->blockCount,
|
||||
"largest ",
|
||||
" span $P\n", (WriteFP)span,
|
||||
" tract $P\n", (WriteFP)span->tract,
|
||||
" space $W\n", (WriteFW)span->space,
|
||||
" blocks $U\n", (WriteFU)span->blockCount,
|
||||
" largest ",
|
||||
NULL);
|
||||
if(res != ResOK) return res;
|
||||
|
||||
|
|
@ -723,12 +723,13 @@ static Res MVDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
res = WriteF(stream, "$W\n", (WriteFW)span->largest, NULL);
|
||||
else
|
||||
res = WriteF(stream, "unknown\n", NULL);
|
||||
|
||||
if(res != ResOK) return res;
|
||||
|
||||
block = span->blocks;
|
||||
|
||||
for(i = span->base.base; i < span->limit.limit; i = AddrAdd(i, length)) {
|
||||
res = WriteF(stream, "$A ", i, NULL);
|
||||
res = WriteF(stream, " $A ", i, NULL);
|
||||
if(res != ResOK) return res;
|
||||
|
||||
for(j = i;
|
||||
|
|
@ -757,9 +758,6 @@ static Res MVDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
res = WriteF(stream, "\n", NULL);
|
||||
if(res != ResOK) return res;
|
||||
}
|
||||
|
||||
res = WriteF(stream, "} MVSpan $P\n", (WriteFP)span, NULL);
|
||||
if(res != ResOK) return res;
|
||||
}
|
||||
|
||||
return ResOK;
|
||||
|
|
|
|||
|
|
@ -1015,21 +1015,21 @@ static Res MVTDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"MVT $P\n{\n", (WriteFP)mvt,
|
||||
"minSize: $U \n", (WriteFU)mvt->minSize,
|
||||
"meanSize: $U \n", (WriteFU)mvt->meanSize,
|
||||
"maxSize: $U \n", (WriteFU)mvt->maxSize,
|
||||
"fragLimit: $U \n", (WriteFU)mvt->fragLimit,
|
||||
"reuseSize: $U \n", (WriteFU)mvt->reuseSize,
|
||||
"fillSize: $U \n", (WriteFU)mvt->fillSize,
|
||||
"availLimit: $U \n", (WriteFU)mvt->availLimit,
|
||||
"abqOverflow: $S \n", mvt->abqOverflow?"TRUE":"FALSE",
|
||||
"splinter: $S \n", mvt->splinter?"TRUE":"FALSE",
|
||||
"splinterBase: $A \n", (WriteFA)mvt->splinterBase,
|
||||
"splinterLimit: $A \n", (WriteFU)mvt->splinterLimit,
|
||||
"size: $U \n", (WriteFU)mvt->size,
|
||||
"allocated: $U \n", (WriteFU)mvt->allocated,
|
||||
"available: $U \n", (WriteFU)mvt->available,
|
||||
"unavailable: $U \n", (WriteFU)mvt->unavailable,
|
||||
" minSize: $U \n", (WriteFU)mvt->minSize,
|
||||
" meanSize: $U \n", (WriteFU)mvt->meanSize,
|
||||
" maxSize: $U \n", (WriteFU)mvt->maxSize,
|
||||
" fragLimit: $U \n", (WriteFU)mvt->fragLimit,
|
||||
" reuseSize: $U \n", (WriteFU)mvt->reuseSize,
|
||||
" fillSize: $U \n", (WriteFU)mvt->fillSize,
|
||||
" availLimit: $U \n", (WriteFU)mvt->availLimit,
|
||||
" abqOverflow: $S \n", mvt->abqOverflow?"TRUE":"FALSE",
|
||||
" splinter: $S \n", mvt->splinter?"TRUE":"FALSE",
|
||||
" splinterBase: $A \n", (WriteFA)mvt->splinterBase,
|
||||
" splinterLimit: $A \n", (WriteFU)mvt->splinterLimit,
|
||||
" size: $U \n", (WriteFU)mvt->size,
|
||||
" allocated: $U \n", (WriteFU)mvt->allocated,
|
||||
" available: $U \n", (WriteFU)mvt->available,
|
||||
" unavailable: $U \n", (WriteFU)mvt->unavailable,
|
||||
NULL);
|
||||
if(res != ResOK) return res;
|
||||
|
||||
|
|
@ -1074,7 +1074,7 @@ static Res MVTDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
METER_WRITE(mvt->exceptionSplinters, stream);
|
||||
METER_WRITE(mvt->exceptionReturns, stream);
|
||||
|
||||
res = WriteF(stream, "} MVT $P\n", (WriteFP)mvt, NULL);
|
||||
res = WriteF(stream, "}\n", NULL);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -681,12 +681,12 @@ static Res MVFFDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"MVFF $P {\n", (WriteFP)mvff,
|
||||
"pool $P ($U)\n",
|
||||
" pool $P ($U)\n",
|
||||
(WriteFP)pool, (WriteFU)pool->serial,
|
||||
"extendBy $W\n", (WriteFW)mvff->extendBy,
|
||||
"avgSize $W\n", (WriteFW)mvff->avgSize,
|
||||
"total $U\n", (WriteFU)mvff->total,
|
||||
"free $U\n", (WriteFU)mvff->free,
|
||||
" extendBy $W\n", (WriteFW)mvff->extendBy,
|
||||
" avgSize $W\n", (WriteFW)mvff->avgSize,
|
||||
" total $U\n", (WriteFU)mvff->total,
|
||||
" free $U\n", (WriteFU)mvff->free,
|
||||
NULL);
|
||||
if (res != ResOK)
|
||||
return res;
|
||||
|
|
@ -699,7 +699,7 @@ static Res MVFFDescribe(Pool pool, mps_lib_FILE *stream)
|
|||
if (res != ResOK)
|
||||
return res;
|
||||
|
||||
res = WriteF(stream, "} MVFF $P\n", (WriteFP)mvff, NULL);
|
||||
res = WriteF(stream, "}\n", NULL);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ Res RangeDescribe(Range range, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"Range $P\n{\n", (WriteFP)range,
|
||||
"base $P\n", (WriteFP)RangeBase(range),
|
||||
"limit $P\n", (WriteFP)RangeLimit(range),
|
||||
"size $U\n", (WriteFU)RangeSize(range),
|
||||
" base: $P\n", (WriteFP)RangeBase(range),
|
||||
" limit: $P\n", (WriteFP)RangeLimit(range),
|
||||
" size: $U\n", (WriteFU)RangeSize(range),
|
||||
"}\n", NULL);
|
||||
if (res != ResOK) {
|
||||
return res;
|
||||
|
|
|
|||
|
|
@ -589,25 +589,25 @@ Res RootDescribe(Root root, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"Root $P ($U) {\n", (WriteFP)root, (WriteFU)root->serial,
|
||||
"arena $P ($U)\n", (WriteFP)root->arena,
|
||||
" arena $P ($U)\n", (WriteFP)root->arena,
|
||||
(WriteFU)root->arena->serial,
|
||||
"rank $U\n", (WriteFU)root->rank,
|
||||
"grey $B\n", (WriteFB)root->grey,
|
||||
"summary $B\n", (WriteFB)root->summary,
|
||||
" rank $U\n", (WriteFU)root->rank,
|
||||
" grey $B\n", (WriteFB)root->grey,
|
||||
" summary $B\n", (WriteFB)root->summary,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
switch(root->var) {
|
||||
case RootTABLE:
|
||||
res = WriteF(stream,
|
||||
"table base $A limit $A\n",
|
||||
" table base $A limit $A\n",
|
||||
root->the.table.base, root->the.table.limit,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
break;
|
||||
|
||||
case RootTABLE_MASKED:
|
||||
res = WriteF(stream, "table base $A limit $A mask $B\n",
|
||||
res = WriteF(stream, " table base $A limit $A mask $B\n",
|
||||
root->the.tableMasked.base, root->the.tableMasked.limit,
|
||||
root->the.tableMasked.mask,
|
||||
NULL);
|
||||
|
|
@ -616,8 +616,8 @@ Res RootDescribe(Root root, mps_lib_FILE *stream)
|
|||
|
||||
case RootFUN:
|
||||
res = WriteF(stream,
|
||||
"scan function $F\n", (WriteFF)root->the.fun.scan,
|
||||
"environment p $P s $W\n",
|
||||
" scan function $F\n", (WriteFF)root->the.fun.scan,
|
||||
" environment p $P s $W\n",
|
||||
root->the.fun.p, (WriteFW)root->the.fun.s,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
|
@ -625,16 +625,16 @@ Res RootDescribe(Root root, mps_lib_FILE *stream)
|
|||
|
||||
case RootREG:
|
||||
res = WriteF(stream,
|
||||
"thread $P\n", (WriteFP)root->the.reg.thread,
|
||||
"environment p $P", root->the.reg.p,
|
||||
" thread $P\n", (WriteFP)root->the.reg.thread,
|
||||
" environment p $P", root->the.reg.p,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
break;
|
||||
|
||||
case RootFMT:
|
||||
res = WriteF(stream,
|
||||
"scan function $F\n", (WriteFF)root->the.fmt.scan,
|
||||
"format base $A limit $A\n",
|
||||
" scan function $F\n", (WriteFF)root->the.fmt.scan,
|
||||
" format base $A limit $A\n",
|
||||
root->the.fmt.base, root->the.fmt.limit,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
|
|
|||
|
|
@ -368,9 +368,9 @@ Res SegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
res = WriteF(stream,
|
||||
"Segment $P [$A,$A) {\n", (WriteFP)seg,
|
||||
(WriteFA)SegBase(seg), (WriteFA)SegLimit(seg),
|
||||
"class $P (\"$S\")\n",
|
||||
" class $P (\"$S\")\n",
|
||||
(WriteFP)seg->class, seg->class->name,
|
||||
"pool $P ($U)\n",
|
||||
" pool $P ($U)\n",
|
||||
(WriteFP)pool, (WriteFU)pool->serial,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
|
@ -378,7 +378,8 @@ Res SegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
res = seg->class->describe(seg, stream);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
res = WriteF(stream, "} Segment $P\n", (WriteFP)seg, NULL);
|
||||
res = WriteF(stream, "\n",
|
||||
"} Segment $P\n", (WriteFP)seg, NULL);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -1030,8 +1031,8 @@ static Res segTrivDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
if (stream == NULL) return ResFAIL;
|
||||
|
||||
res = WriteF(stream,
|
||||
"shield depth $U\n", (WriteFU)seg->depth,
|
||||
"protection mode:",
|
||||
" shield depth $U\n", (WriteFU)seg->depth,
|
||||
" protection mode:",
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
if (SegPM(seg) & AccessREAD) {
|
||||
|
|
@ -1042,7 +1043,7 @@ static Res segTrivDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
res = WriteF(stream, " write", NULL);
|
||||
if (res != ResOK) return res;
|
||||
}
|
||||
res = WriteF(stream, "\nshield mode:", NULL);
|
||||
res = WriteF(stream, "\n shield mode:", NULL);
|
||||
if (res != ResOK) return res;
|
||||
if (SegSM(seg) & AccessREAD) {
|
||||
res = WriteF(stream, " read", NULL);
|
||||
|
|
@ -1052,7 +1053,7 @@ static Res segTrivDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
res = WriteF(stream, " write", NULL);
|
||||
if (res != ResOK) return res;
|
||||
}
|
||||
res = WriteF(stream, "\nranks:", NULL);
|
||||
res = WriteF(stream, "\n ranks:", NULL);
|
||||
if (res != ResOK) return res;
|
||||
/* This bit ought to be in a RankSetDescribe in ref.c. */
|
||||
if (RankSetIsMember(seg->rankSet, RankAMBIG)) {
|
||||
|
|
@ -1071,10 +1072,10 @@ static Res segTrivDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
res = WriteF(stream, " weak", NULL);
|
||||
if (res != ResOK) return res;
|
||||
}
|
||||
res = WriteF(stream, "\n"
|
||||
"white $B\n", (WriteFB)seg->white,
|
||||
"grey $B\n", (WriteFB)seg->grey,
|
||||
"nailed $B\n", (WriteFB)seg->nailed,
|
||||
res = WriteF(stream, "\n",
|
||||
" white $B\n", (WriteFB)seg->white,
|
||||
" grey $B\n", (WriteFB)seg->grey,
|
||||
" nailed $B\n", (WriteFB)seg->nailed,
|
||||
NULL);
|
||||
return res;
|
||||
}
|
||||
|
|
@ -1626,13 +1627,17 @@ static Res gcSegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
res = super->describe(seg, stream);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
res = WriteF(stream, "summary $W\n", (WriteFW)gcseg->summary, NULL);
|
||||
res = WriteF(stream,
|
||||
" summary $W\n", (WriteFW)gcseg->summary,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
if (gcseg->buffer == NULL)
|
||||
res = WriteF(stream, "buffer: NULL\n", NULL);
|
||||
else
|
||||
if (gcseg->buffer == NULL) {
|
||||
res = WriteF(stream, " buffer: NULL\n", NULL);
|
||||
}
|
||||
else {
|
||||
res = BufferDescribe(gcseg->buffer, stream);
|
||||
}
|
||||
if (res != ResOK) return res;
|
||||
|
||||
return ResOK;
|
||||
|
|
|
|||
|
|
@ -1335,7 +1335,7 @@ Res SplayTreeDescribe(SplayTree splay, mps_lib_FILE *stream,
|
|||
|
||||
res = WriteF(stream,
|
||||
"Splay $P {\n", (WriteFP)splay,
|
||||
"compare $F\n", (WriteFF)splay->compare,
|
||||
" compare $F\n", (WriteFF)splay->compare,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
|
|
@ -1344,7 +1344,7 @@ Res SplayTreeDescribe(SplayTree splay, mps_lib_FILE *stream,
|
|||
if (res != ResOK) return res;
|
||||
}
|
||||
|
||||
res = WriteF(stream, "\n} Splay $P\n", (WriteFP)splay, NULL);
|
||||
res = WriteF(stream, "\n}\n", NULL);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ Res ThreadDescribe(Thread thread, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"Thread $P ($U) {\n", (WriteFP)thread, (WriteFU)thread->serial,
|
||||
"arena $P ($U)\n",
|
||||
" arena $P ($U)\n",
|
||||
(WriteFP)thread->arena, (WriteFU)thread->arena->serial,
|
||||
"} Thread $P ($U)\n", (WriteFP)thread, (WriteFU)thread->serial,
|
||||
NULL);
|
||||
|
|
|
|||
|
|
@ -278,9 +278,9 @@ Res ThreadDescribe(Thread thread, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"Thread $P ($U) {\n", (WriteFP)thread, (WriteFU)thread->serial,
|
||||
"arena $P ($U)\n",
|
||||
" arena $P ($U)\n",
|
||||
(WriteFP)thread->arena, (WriteFU)thread->arena->serial,
|
||||
"id $U\n", (WriteFU)thread->id,
|
||||
" id $U\n", (WriteFU)thread->id,
|
||||
"} Thread $P ($U)\n", (WriteFP)thread, (WriteFU)thread->serial,
|
||||
NULL);
|
||||
if(res != ResOK)
|
||||
|
|
|
|||
|
|
@ -218,10 +218,10 @@ Res ThreadDescribe(Thread thread, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"Thread $P ($U) {\n", (WriteFP)thread, (WriteFU)thread->serial,
|
||||
"arena $P ($U)\n",
|
||||
" arena $P ($U)\n",
|
||||
(WriteFP)thread->arena, (WriteFU)thread->arena->serial,
|
||||
"handle $W\n", (WriteFW)thread->handle,
|
||||
"id $U\n", (WriteFU)thread->id,
|
||||
" handle $W\n", (WriteFW)thread->handle,
|
||||
" id $U\n", (WriteFU)thread->id,
|
||||
"} Thread $P ($U)\n", (WriteFP)thread, (WriteFU)thread->serial,
|
||||
NULL);
|
||||
if(res != ResOK)
|
||||
|
|
|
|||
|
|
@ -254,9 +254,9 @@ Res ThreadDescribe(Thread thread, mps_lib_FILE *stream)
|
|||
|
||||
res = WriteF(stream,
|
||||
"Thread $P ($U) {\n", (WriteFP)thread, (WriteFU)thread->serial,
|
||||
"arena $P ($U)\n",
|
||||
" arena $P ($U)\n",
|
||||
(WriteFP)thread->arena, (WriteFU)thread->arena->serial,
|
||||
"port $U\n", (WriteFU)thread->port,
|
||||
" port $U\n", (WriteFU)thread->port,
|
||||
"} Thread $P ($U)\n", (WriteFP)thread, (WriteFU)thread->serial,
|
||||
NULL);
|
||||
if(res != ResOK) return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue