diff --git a/mps/code/buffer.c b/mps/code/buffer.c index 779d31e448b..f16897a3c2c 100644 --- a/mps/code/buffer.c +++ b/mps/code/buffer.c @@ -1,7 +1,7 @@ /* buffer.c: ALLOCATION BUFFER IMPLEMENTATION * * $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. * * .purpose: This is (part of) the implementation of allocation buffers. * Several macros which also form part of the implementation are in @@ -1248,9 +1248,9 @@ static Res segBufDescribe(Buffer buffer, mps_lib_FILE *stream, Count depth) return res; return WriteF(stream, depth + 2, - "Seg $P\n", (WriteFP)segbuf->seg, - "rankSet $U\n", (WriteFU)segbuf->rankSet, - NULL); + "Seg $P\n", (WriteFP)segbuf->seg, + "rankSet $U\n", (WriteFU)segbuf->rankSet, + NULL); } @@ -1333,7 +1333,7 @@ DEFINE_CLASS(Buffer, RankBuf, klass) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2014 Ravenbrook Limited . + * Copyright (C) 2001-2016 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/event.c b/mps/code/event.c index 0a15e064db3..e2825b5334f 100644 --- a/mps/code/event.c +++ b/mps/code/event.c @@ -205,17 +205,17 @@ void EventInit(void) if (!eventInited) { EventKind kind; for (kind = 0; kind < EventKindLIMIT; ++kind) { - AVER(EventLast[kind] == NULL); - AVER(EventWritten[kind] == NULL); - EventLast[kind] = EventWritten[kind] = EventBuffer[kind] + EventBufferSIZE; + AVER(EventLast[kind] == NULL); + AVER(EventWritten[kind] == NULL); + EventLast[kind] = EventWritten[kind] = EventBuffer[kind] + EventBufferSIZE; } eventInited = TRUE; EventKindControl = (Word)mps_lib_telemetry_control(); EventInternSerial = (Serial)1; /* 0 is reserved */ (void)EventInternString(MPSVersion()); /* emit version */ EVENT7(EventInit, EVENT_VERSION_MAJOR, EVENT_VERSION_MEDIAN, - EVENT_VERSION_MINOR, EventCodeMAX, EventNameMAX, MPS_WORD_WIDTH, - mps_clocks_per_sec()); + EVENT_VERSION_MINOR, EventCodeMAX, EventNameMAX, MPS_WORD_WIDTH, + mps_clocks_per_sec()); /* flush these initial events to get the first ClockSync out. */ EventSync(); } @@ -520,7 +520,7 @@ extern void EventDump(mps_lib_FILE *stream) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2014 Ravenbrook Limited . + * Copyright (C) 2001-2016 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/mpm.c b/mps/code/mpm.c index f49f05bb517..71072b67c9d 100644 --- a/mps/code/mpm.c +++ b/mps/code/mpm.c @@ -1,7 +1,7 @@ /* mpm.c: GENERAL MPM SUPPORT * * $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. * * .purpose: Miscellaneous support for the implementation of the MPM * and pool classes. @@ -711,7 +711,7 @@ static Bool quickSorted(void *array[], Count length, void QuickSort(void *array[], Count length, QuickSortCompare compare, void *closure, - SortStruct *sortStruct) + SortStruct *sortStruct) { Index left, right, sp, lo, hi, leftLimit, rightBase; void *pivot, *temp; @@ -770,15 +770,15 @@ void QuickSort(void *array[], Count length, for later. */ AVER_CRITICAL(sp < sizeof sortStruct->stack / sizeof sortStruct->stack[0]); if (leftLimit - left < right - rightBase) { - sortStruct->stack[sp].left = rightBase; - sortStruct->stack[sp].right = right; - ++sp; - right = leftLimit; + sortStruct->stack[sp].left = rightBase; + sortStruct->stack[sp].right = right; + ++sp; + right = leftLimit; } else { - sortStruct->stack[sp].left = left; - sortStruct->stack[sp].right = leftLimit; - ++sp; - left = rightBase; + sortStruct->stack[sp].left = left; + sortStruct->stack[sp].right = leftLimit; + ++sp; + left = rightBase; } } @@ -799,7 +799,7 @@ void QuickSort(void *array[], Count length, /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2015 Ravenbrook Limited . + * Copyright (C) 2001-2016 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/mpm.h b/mps/code/mpm.h index e8ba89c5ed8..1dc05e95177 100644 --- a/mps/code/mpm.h +++ b/mps/code/mpm.h @@ -1,7 +1,7 @@ /* mpm.h: MEMORY POOL MANAGER DEFINITIONS * * $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. * * .trans.bufferinit: The Buffer data structure has an Init field and @@ -177,8 +177,8 @@ extern Word RandomWord(void); typedef Compare QuickSortCompare(void *left, void *right, void *closure); extern void QuickSort(void *array[], Count length, - QuickSortCompare compare, void *closure, - SortStruct *sortStruct); + QuickSortCompare compare, void *closure, + SortStruct *sortStruct); /* Version Determination @@ -1016,7 +1016,7 @@ DECLARE_CLASS(Land, Land, Inst); /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2015 Ravenbrook Limited . + * Copyright (C) 2001-2016 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/pool.c b/mps/code/pool.c index 85c904d88aa..43cb1fbe342 100644 --- a/mps/code/pool.c +++ b/mps/code/pool.c @@ -1,7 +1,7 @@ /* pool.c: POOL IMPLEMENTATION * * $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) 2001 Global Graphics Software. * * DESIGN @@ -73,11 +73,11 @@ Bool PoolClassCheck(PoolClass klass) /* Check that pool classes overide sets of related methods. */ CHECKL((klass->init == PoolAbsInit) == (klass->finish == PoolAbsFinish)); CHECKL((klass->bufferFill == PoolNoBufferFill) == - (klass->bufferEmpty == PoolNoBufferEmpty)); + (klass->bufferEmpty == PoolNoBufferEmpty)); CHECKL((klass->framePush == PoolNoFramePush) == - (klass->framePop == PoolNoFramePop)); + (klass->framePop == PoolNoFramePop)); CHECKL((klass->rampBegin == PoolNoRampBegin) == - (klass->rampEnd == PoolNoRampEnd)); + (klass->rampEnd == PoolNoRampEnd)); /* Check that pool classes that set attributes also override the methods they imply. */ @@ -651,7 +651,7 @@ Bool PoolHasRange(Pool pool, Addr base, Addr limit) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2015 Ravenbrook Limited . + * Copyright (C) 2001-2016 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/code/protocol.c b/mps/code/protocol.c index 84f8002f506..7a749afd9bf 100644 --- a/mps/code/protocol.c +++ b/mps/code/protocol.c @@ -143,8 +143,8 @@ Res InstDescribe(Inst inst, mps_lib_FILE *stream, Count depth) klass = ClassOfPoly(Inst, inst); return WriteF(stream, depth, - "$S $P\n", (WriteFS)ClassName(klass), inst, - NULL); + "$S $P\n", (WriteFS)ClassName(klass), inst, + NULL); } diff --git a/mps/code/protocol.h b/mps/code/protocol.h index 071e31e7a7d..3b469d690e9 100644 --- a/mps/code/protocol.h +++ b/mps/code/protocol.h @@ -117,13 +117,13 @@ typedef void *ClassId; LockClaimGlobalRecursive(); \ if (CLASS_GUARDIAN(className) == FALSE) { \ CLASS_INIT(className)(klass); \ - /* Prevent infinite regress. */ \ - if (CLASS_ID(className) != CLASS_ID(InstClass) && \ - CLASS_ID(className) != CLASS_ID(Inst)) \ + /* Prevent infinite regress. */ \ + if (CLASS_ID(className) != CLASS_ID(InstClass) && \ + CLASS_ID(className) != CLASS_ID(Inst)) \ SetClassOfPoly(klass, CLASS(KIND_CLASS(kind))); \ AVER(CLASS_CHECK(kind)(klass)); \ CLASS_GUARDIAN(className) = TRUE; \ - ClassRegister(MustBeA(InstClass, klass)); \ + ClassRegister(MustBeA(InstClass, klass)); \ } \ LockReleaseGlobalRecursive(); \ } \ @@ -248,15 +248,15 @@ extern void ClassRegister(InstClass klass); #define MustBeA(_class, inst) \ CouldBeA(_class, \ - AVERPC(IsNonNullAndA(_class, inst), \ - "MustBeA " #_class ": " #inst, \ - inst)) + AVERPC(IsNonNullAndA(_class, inst), \ + "MustBeA " #_class ": " #inst, \ + inst)) #define MustBeA_CRITICAL(_class, inst) \ CouldBeA(_class, \ - AVERPC_CRITICAL(IsNonNullAndA(_class, inst), \ - "MustBeA " #_class ": " #inst, \ - inst)) + AVERPC_CRITICAL(IsNonNullAndA(_class, inst), \ + "MustBeA " #_class ": " #inst, \ + inst)) /* Protocol introspection interface diff --git a/mps/code/segsmss.c b/mps/code/segsmss.c index 5e0e63d4510..a4f9ebab030 100644 --- a/mps/code/segsmss.c +++ b/mps/code/segsmss.c @@ -537,8 +537,8 @@ static Res AMSTBufferFill(Addr *baseReturn, Addr *limitReturn, if (amstseg->prev != NULL) { Seg segLo = AMSTSeg2Seg(amstseg->prev); if (SegBuffer(segLo) == NULL && - SegGrey(segLo) == SegGrey(seg) && - SegWhite(segLo) == SegWhite(seg)) { + SegGrey(segLo) == SegGrey(seg) && + SegWhite(segLo) == SegWhite(seg)) { /* .merge */ Seg mergedSeg; Res mres; diff --git a/mps/code/shield.c b/mps/code/shield.c index 64ab135ff1e..84b7c0d9c70 100644 --- a/mps/code/shield.c +++ b/mps/code/shield.c @@ -409,7 +409,7 @@ static void shieldFlushEntries(Shield shield) QuickSort((void *)shield->queue, shield->limit, shieldQueueEntryCompare, UNUSED_POINTER, - &shield->sortStruct); + &shield->sortStruct); mode = AccessSetEMPTY; limit = NULL; diff --git a/mps/design/diag.txt b/mps/design/diag.txt index 90918307a6c..f4da8c41724 100644 --- a/mps/design/diag.txt +++ b/mps/design/diag.txt @@ -78,7 +78,7 @@ There are two mechanism for getting diagnostic output: 0x00007fff83e42d46 in __kill () (gdb) frame 12 #12 0x000000010000b1fc in MVTFree (pool=0x103ffe160, base=0x101dfd000, size=5024) at poolmv2.c:711 - 711 Res res = CBSInsert(MVTCBS(mvt), base, limit); + 711 Res res = CBSInsert(MVTCBS(mvt), base, limit); (gdb) p MVTDescribe(mvt, mps_lib_get_stdout(), 0) MVT 0000000103FFE160 { minSize: 8 @@ -238,7 +238,7 @@ Document History Copyright and License --------------------- -Copyright © 2013-2014 Ravenbrook Limited . +Copyright © 2013-2016 Ravenbrook Limited . All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options. diff --git a/mps/design/index.txt b/mps/design/index.txt index e486020574d..decfb0fe66d 100644 --- a/mps/design/index.txt +++ b/mps/design/index.txt @@ -213,20 +213,20 @@ References Document History ---------------- -- 2002-05-23 RB_ Created empty catalogue based on P4DTI design document catalogue. -- 2002-06-07 RB_ Added a bunch of design documents referenced by the source code. -- 2002-06-21 NB_ Remove P4DTI reference, which doesn't fit here. Maybe one day we'll have a corporate design document procedure. -- 2002-06-24 RB_ Added fix, object-debug, thread-manager, and thread-safety. -- 2007-02-08 RHSK Added message-gc and shield. -- 2007-06-12 RHSK Added cstyle. -- 2007-06-28 RHSK Added diag. -- 2008-12-04 RHSK Added tests. -- 2008-12-10 RHSK Correct description of message-gc: gc begin or end. -- 2012-09-14 RB_ Added link to critical-path -- 2013-05-10 RB_ Fixed link to sig and added guide.hex.trans -- 2013-05-22 GDR_ Add link to keyword-arguments. -- 2013-05-25 RB_ Replacing "cstyle" with reworked "guide.impl.c.format". -- 2013-06-07 RB_ Converting to reST_. Linking to [RB_2002-06-18]_. +- 2002-05-23 RB_ Created empty catalogue based on P4DTI design document catalogue. +- 2002-06-07 RB_ Added a bunch of design documents referenced by the source code. +- 2002-06-21 NB_ Remove P4DTI reference, which doesn't fit here. Maybe one day we'll have a corporate design document procedure. +- 2002-06-24 RB_ Added fix, object-debug, thread-manager, and thread-safety. +- 2007-02-08 RHSK Added message-gc and shield. +- 2007-06-12 RHSK Added cstyle. +- 2007-06-28 RHSK Added diag. +- 2008-12-04 RHSK Added tests. +- 2008-12-10 RHSK Correct description of message-gc: gc begin or end. +- 2012-09-14 RB_ Added link to critical-path +- 2013-05-10 RB_ Fixed link to sig and added guide.hex.trans +- 2013-05-22 GDR_ Add link to keyword-arguments. +- 2013-05-25 RB_ Replacing "cstyle" with reworked "guide.impl.c.format". +- 2013-06-07 RB_ Converting to reST_. Linking to [RB_2002-06-18]_. - 2014-01-29 RB_ The arena no longer manages generation zonesets. - 2014-01-17 GDR_ Add abq, nailboard, range. - 2016-03-22 RB_ Add write-barier. diff --git a/mps/design/protocol.txt b/mps/design/protocol.txt index 8b6735effc9..b2bd308adeb 100644 --- a/mps/design/protocol.txt +++ b/mps/design/protocol.txt @@ -129,21 +129,21 @@ class is extended, it becomes a member of a different kind. Kinds allow subtype checking to be applied to classes as well as instances, to determine whether methods are available. :: - instance class kind + instance class kind (e.g. CBS) (e.g. CBSClass) (e.g. LandClassClass) - .----------. .----------. .----------. + .----------. .----------. .----------. | class |----->| class |----->| class |-->InstClassClass - ------------ ------------ ------------ - | ... | | sig | | sig | - ------------ ------------ ------------ - | ... | | name | | name | - ------------ ------------ ------------ - | ... | |superclass|-. |superclass|-->InstClassClass - ------------ ------------ | ------------ - | | | ... | | | ... | - | - | - LandClass<-' + ------------ ------------ ------------ + | ... | | sig | | sig | + ------------ ------------ ------------ + | ... | | name | | name | + ------------ ------------ ------------ + | ... | |superclass|-. |superclass|-->InstClassClass + ------------ ------------ | ------------ + | | | ... | | | ... | + | + | + LandClass<-' _`.overview.sig.inherit`: Instances (and therefore classes) will @@ -490,7 +490,7 @@ anti-method to clean-up a subsequent failure. :: static Res AMSSegInit(Seg seg, Pool pool, Addr base, Size size, - ArgList args) + ArgList args) { AMS ams = MustBeA(AMSPool, pool); Arena arena = PoolArena(pool); @@ -500,7 +500,7 @@ anti-method to clean-up a subsequent failure. :: /* Initialize the superclass fields first via next-method call */ res = NextMethod(Seg, AMSSeg, init)(seg, pool, base, size, args); if (res != ResOK) - goto failNextMethod; + goto failNextMethod; amsseg = CouldBeA(AMSSeg, seg); amsseg->grains = size >> ams->grainShift; @@ -511,10 +511,10 @@ anti-method to clean-up a subsequent failure. :: amsseg->ambiguousFixes = FALSE; res = amsCreateTables(ams, &amsseg->allocTable, - &amsseg->nongreyTable, &amsseg->nonwhiteTable, - arena, amsseg->grains); + &amsseg->nongreyTable, &amsseg->nonwhiteTable, + arena, amsseg->grains); if (res != ResOK) - goto failCreateTables; + goto failCreateTables; /* start off using firstFree, see */ amsseg->allocTableInUse = FALSE; @@ -524,7 +524,7 @@ anti-method to clean-up a subsequent failure. :: amsseg->ams = ams; RingInit(&amsseg->segRing); RingAppend((ams->allocRing)(ams, SegRankSet(seg), size), - &amsseg->segRing); + &amsseg->segRing); SetClassOfPoly(seg, CLASS(AMSSeg)); amsseg->sig = AMSSegSig; diff --git a/mps/example/scheme/scheme-advanced.c b/mps/example/scheme/scheme-advanced.c index 707390b2962..49672f6a0a3 100644 --- a/mps/example/scheme/scheme-advanced.c +++ b/mps/example/scheme/scheme-advanced.c @@ -1,6 +1,6 @@ /* scheme.c -- SCHEME INTERPRETER EXAMPLE FOR THE MEMORY POOL SYSTEM * - * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license. * * This is a toy interpreter for a subset of the Scheme programming * language . @@ -4330,8 +4330,8 @@ static int start(int argc, char *argv[]) topic/root. */ symtab = NULL; res = mps_root_create_area(&symtab_root, arena, mps_rank_exact(), 0, - &symtab, &symtab + 1, - mps_scan_area, NULL); + &symtab, &symtab + 1, + mps_scan_area, NULL); if(res != MPS_RES_OK) error("Couldn't register symtab root"); /* The symbol table is strong-key weak-value. */ @@ -4619,7 +4619,7 @@ int main(int argc, char *argv[]) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2014 Ravenbrook Limited . + * Copyright (C) 2001-2016 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/example/scheme/scheme.c b/mps/example/scheme/scheme.c index 4a10b5c9b10..1ba280c7d59 100644 --- a/mps/example/scheme/scheme.c +++ b/mps/example/scheme/scheme.c @@ -1,6 +1,6 @@ /* scheme.c -- SCHEME INTERPRETER EXAMPLE FOR THE MEMORY POOL SYSTEM * - * Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license. * * This is a toy interpreter for a subset of the Scheme programming * language . @@ -776,8 +776,8 @@ static void rehash(void) { that both copies are updated atomically to the mutator (this interpreter). */ res = mps_root_create_area(&symtab_root, arena, mps_rank_exact(), 0, - symtab, symtab + symtab_size, - mps_scan_area, NULL); + symtab, symtab + symtab_size, + mps_scan_area, NULL); if(res != MPS_RES_OK) error("Couldn't register new symtab root"); for(i = 0; i < old_symtab_size; ++i) @@ -4262,7 +4262,7 @@ static int start(int argc, char *argv[]) assertion failures). See topic/root. */ res = mps_root_create_area(&symtab_root, arena, mps_rank_exact(), 0, symtab, symtab + symtab_size, - mps_scan_area, NULL); + mps_scan_area, NULL); if(res != MPS_RES_OK) error("Couldn't register symtab root"); error_handler = &jb; @@ -4507,7 +4507,7 @@ int main(int argc, char *argv[]) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2014 Ravenbrook Limited . + * Copyright (C) 2001-2016 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. * diff --git a/mps/manual/source/topic/deprecated.rst b/mps/manual/source/topic/deprecated.rst index 2bdced17215..cb1cbc6d8f4 100644 --- a/mps/manual/source/topic/deprecated.rst +++ b/mps/manual/source/topic/deprecated.rst @@ -274,14 +274,14 @@ Deprecated in version 1.115 .. c:function:: mps_res_t mps_root_create_table_masked(mps_root_t *root_o, mps_arena_t arena, mps_rank_t rank, mps_rm_t rm, mps_addr_t *base, size_t count, mps_word_t mask) .. deprecated:: - + This function is equivalent to:: mps_root_create_area_tagged(root_o, arena, rank, rm, base, base + size, mps_scan_area_tagged, mask, 0) - + Use :c:func:`mps_root_create_area_masked` instead, passing zero for the ``pattern`` argument.