mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 00:00:39 -08:00
Ensure that code of the form if (condition) statement; is split over two lines, so that it is possible to set a breakpoint on the statement in a debugger.
This change was agreed in 1997 (see <https://info.ravenbrook.com/project/mps/mail/1997/08/19/13-44/0.txt>), so it's about time it was implemented. Copied from Perforce Change: 187071 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
1499ab72af
commit
c968255f1e
45 changed files with 542 additions and 280 deletions
|
|
@ -150,8 +150,10 @@ Res BufferDescribe(Buffer buffer, mps_lib_FILE *stream, Count depth)
|
|||
{
|
||||
Res res;
|
||||
|
||||
if (!TESTT(Buffer, buffer)) return ResFAIL;
|
||||
if (stream == NULL) return ResFAIL;
|
||||
if (!TESTT(Buffer, buffer))
|
||||
return ResFAIL;
|
||||
if (stream == NULL)
|
||||
return ResFAIL;
|
||||
|
||||
res = WriteF(stream, depth,
|
||||
"Buffer $P ($U) {\n",
|
||||
|
|
@ -178,10 +180,12 @@ Res BufferDescribe(Buffer buffer, mps_lib_FILE *stream, Count depth)
|
|||
" alignment $W\n", (WriteFW)buffer->alignment,
|
||||
" rampCount $U\n", (WriteFU)buffer->rampCount,
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
if (res != ResOK)
|
||||
return res;
|
||||
|
||||
res = buffer->class->describe(buffer, stream, depth + 2);
|
||||
if (res != ResOK) return res;
|
||||
if (res != ResOK)
|
||||
return res;
|
||||
|
||||
res = WriteF(stream, depth, "} Buffer $P ($U)\n",
|
||||
(WriteFP)buffer, (WriteFU)buffer->serial,
|
||||
|
|
@ -1165,8 +1169,10 @@ static void bufferNoReassignSeg(Buffer buffer, Seg seg)
|
|||
|
||||
static Res bufferTrivDescribe(Buffer buffer, mps_lib_FILE *stream, Count depth)
|
||||
{
|
||||
if (!TESTT(Buffer, buffer)) return ResFAIL;
|
||||
if (stream == NULL) return ResFAIL;
|
||||
if (!TESTT(Buffer, buffer))
|
||||
return ResFAIL;
|
||||
if (stream == NULL)
|
||||
return ResFAIL;
|
||||
UNUSED(depth);
|
||||
/* dispatching function does it all */
|
||||
return ResOK;
|
||||
|
|
@ -1428,15 +1434,19 @@ static Res segBufDescribe(Buffer buffer, mps_lib_FILE *stream, Count depth)
|
|||
BufferClass super;
|
||||
Res res;
|
||||
|
||||
if (!TESTT(Buffer, buffer)) return ResFAIL;
|
||||
if (stream == NULL) return ResFAIL;
|
||||
if (!TESTT(Buffer, buffer))
|
||||
return ResFAIL;
|
||||
if (stream == NULL)
|
||||
return ResFAIL;
|
||||
segbuf = BufferSegBuf(buffer);
|
||||
if (!TESTT(SegBuf, segbuf)) return ResFAIL;
|
||||
if (!TESTT(SegBuf, segbuf))
|
||||
return ResFAIL;
|
||||
|
||||
/* Describe the superclass fields first via next-method call */
|
||||
super = BUFFER_SUPERCLASS(SegBufClass);
|
||||
res = super->describe(buffer, stream, depth);
|
||||
if (res != ResOK) return res;
|
||||
if (res != ResOK)
|
||||
return res;
|
||||
|
||||
res = WriteF(stream, depth,
|
||||
"Seg $P\n", (WriteFP)segbuf->seg,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue