aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorGareth Rees2013-06-02 21:34:23 +0100
committerGareth Rees2013-06-02 21:34:23 +0100
commit0260380dd356ded37bfed019f8cc17d027777499 (patch)
tree4a8d7da6a0a9d154e862fabd8811dbcf719d551f /mps/code
parentdb9328da7a3c506983b8027f094dd5234062fea4 (diff)
downloademacs-0260380dd356ded37bfed019f8cc17d027777499.tar.gz
emacs-0260380dd356ded37bfed019f8cc17d027777499.zip
Rename cbstest.c to fbmtest.c (free block management test) and generalize it so that it tests both the cbs and freelist modules.
Split FreelistFind into FreelistFindFirst and FreelistFindLast so that the interface exactly matches the CBS interface. Fix errors in freelist.c: missing computation of size in FreelistBlockSetLimit; update linked list correct in coalesceRight case in FreelistInsert. Avoid compiler warnings in freelist.c. In cbs.c: use $U for Booleans ($B is for bit tables). Copied from Perforce Change: 182397 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/cbs.c4
-rw-r--r--mps/code/fbmtest.c (renamed from mps/code/cbstest.c)304
-rw-r--r--mps/code/freelist.c94
-rw-r--r--mps/code/mps.xcodeproj/project.pbxproj175
-rw-r--r--mps/code/range.c5
5 files changed, 410 insertions, 172 deletions
diff --git a/mps/code/cbs.c b/mps/code/cbs.c
index 8bf9a4300df..b235ec3da51 100644
--- a/mps/code/cbs.c
+++ b/mps/code/cbs.c
@@ -885,8 +885,8 @@ Res CBSDescribe(CBS cbs, mps_lib_FILE *stream)
885 "CBS $P {\n", (WriteFP)cbs, 885 "CBS $P {\n", (WriteFP)cbs,
886 " alignment: $U\n", (WriteFU)cbs->alignment, 886 " alignment: $U\n", (WriteFU)cbs->alignment,
887 " blockPool: $P\n", (WriteFP)cbs->blockPool, 887 " blockPool: $P\n", (WriteFP)cbs->blockPool,
888 " fastFind: $B\n", (WriteFB)cbs->fastFind, 888 " fastFind: $U\n", (WriteFU)cbs->fastFind,
889 " inCBS: $B\n", (WriteFB)cbs->inCBS, 889 " inCBS: $U\n", (WriteFU)cbs->inCBS,
890 " splayTreeSize: $U\n", (WriteFU)cbs->splayTreeSize, 890 " splayTreeSize: $U\n", (WriteFU)cbs->splayTreeSize,
891 NULL); 891 NULL);
892 if (res != ResOK) return res; 892 if (res != ResOK) return res;
diff --git a/mps/code/cbstest.c b/mps/code/fbmtest.c
index 4f60880a756..7b91a04fa11 100644
--- a/mps/code/cbstest.c
+++ b/mps/code/fbmtest.c
@@ -1,38 +1,70 @@
1/* cbstest.c: COALESCING BLOCK STRUCTURE TEST 1/* fbmtest.c: FREE BLOCK MANAGEMENT TEST
2 * 2 *
3 * $Id$ 3 * $Id$
4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. 4 * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
5 *
6 * The MPS contains two free block management modules:
7 *
8 * 1. the CBS (Coalescing Block Structure) module maintains free
9 * blocks in a splay tree for fast access with a cost in storage;
10 *
11 * 2. the Freelist module maintains free blocks in an address-ordered
12 * singly linked list for zero storage overhead with a cost in
13 * performance.
14 *
15 * The two modules present identical interfaces, so we apply the same
16 * test cases to both.
5 */ 17 */
6 18
7#include "cbs.h" 19#include "cbs.h"
20#include "freelist.h"
8#include "mpm.h" 21#include "mpm.h"
9#include "mpsavm.h"
10#include "mps.h" 22#include "mps.h"
23#include "mpsavm.h"
24#include "mpstd.h"
11#include "testlib.h" 25#include "testlib.h"
12 26
13#include <stdlib.h>
14#include <stdarg.h> 27#include <stdarg.h>
15#include "mpstd.h" 28#include <stdlib.h>
16#include <time.h> 29#include <time.h>
17 30
18SRCID(cbstest, "$Id$"); 31SRCID(fbmtest, "$Id$");
19 32
20 33
21#define ArraySize ((Size)123456) 34#define ArraySize ((Size)123456)
22#define NOperations ((Size)125000)
23#define Alignment ((Align)sizeof(void *)) 35#define Alignment ((Align)sizeof(void *))
24 36
37/* CBS is much faster than Freelist, so we apply more operations to
38 * the former. */
39#define nCBSOperations ((Size)125000)
40#define nFLOperations ((Size)12500)
25 41
26static Count NAllocateTried, NAllocateSucceeded, NDeallocateTried, 42static Count NAllocateTried, NAllocateSucceeded, NDeallocateTried,
27 NDeallocateSucceeded; 43 NDeallocateSucceeded;
28 44
45static int verbose = 0;
46
47typedef unsigned FBMType;
48enum {
49 FBMTypeCBS = 1,
50 FBMTypeFreelist,
51 FBMTypeLimit
52};
29 53
30typedef struct CheckCBSClosureStruct { 54typedef struct FBMStateStruct {
55 FBMType type;
56 union {
57 CBS cbs;
58 Freelist fl;
59 } the;
60} FBMStateStruct, *FBMState;
61
62typedef struct CheckFBMClosureStruct {
31 BT allocTable; 63 BT allocTable;
32 Addr base; 64 Addr base;
33 Addr limit; 65 Addr limit;
34 Addr oldLimit; 66 Addr oldLimit;
35} CheckCBSClosureStruct, *CheckCBSClosure; 67} CheckFBMClosureStruct, *CheckFBMClosure;
36 68
37 69
38static Addr (addrOfIndex)(Addr block, Index i) 70static Addr (addrOfIndex)(Addr block, Index i)
@@ -47,13 +79,26 @@ static Index (indexOfAddr)(Addr block, Addr a)
47} 79}
48 80
49 81
50static Bool checkCBSAction(CBS cbs, Range range, void *closureP, Size closureS) 82static void describe(FBMState state) {
83 switch (state->type) {
84 case FBMTypeCBS:
85 CBSDescribe(state->the.cbs, mps_lib_get_stdout());
86 break;
87 case FBMTypeFreelist:
88 FreelistDescribe(state->the.fl, mps_lib_get_stdout());
89 break;
90 default:
91 fail();
92 break;
93 }
94}
95
96
97static Bool checkCallback(Range range, void *closureP, Size closureS)
51{ 98{
52 Addr base, limit; 99 Addr base, limit;
53 CheckCBSClosure closure = (CheckCBSClosure)closureP; 100 CheckFBMClosure closure = (CheckFBMClosure)closureP;
54 101
55 /* Don't need to check cbs every time */
56 UNUSED(cbs);
57 UNUSED(closureS); 102 UNUSED(closureS);
58 Insist(closure != NULL); 103 Insist(closure != NULL);
59 104
@@ -79,16 +124,42 @@ static Bool checkCBSAction(CBS cbs, Range range, void *closureP, Size closureS)
79} 124}
80 125
81 126
82static void checkCBS(CBS cbs, BT allocTable, Addr dummyBlock) 127static Bool checkCBSCallback(CBS cbs, Range range,
128 void *closureP, Size closureS)
129{
130 UNUSED(cbs);
131 return checkCallback(range, closureP, closureS);
132}
133
134
135static Bool checkFLCallback(Bool *deleteReturn, Range range,
136 void *closureP, Size closureS)
83{ 137{
84 CheckCBSClosureStruct closure; 138 *deleteReturn = FALSE;
139 return checkCallback(range, closureP, closureS);
140}
141
142
143static void check(FBMState state, BT allocTable, Addr dummyBlock)
144{
145 CheckFBMClosureStruct closure;
85 146
86 closure.allocTable = allocTable; 147 closure.allocTable = allocTable;
87 closure.base = dummyBlock; 148 closure.base = dummyBlock;
88 closure.limit = addrOfIndex(closure.base, ArraySize); 149 closure.limit = addrOfIndex(closure.base, ArraySize);
89 closure.oldLimit = closure.base; 150 closure.oldLimit = closure.base;
90 151
91 CBSIterate(cbs, checkCBSAction, (void *)&closure, 0); 152 switch (state->type) {
153 case FBMTypeCBS:
154 CBSIterate(state->the.cbs, checkCBSCallback, (void *)&closure, 0);
155 break;
156 case FBMTypeFreelist:
157 FreelistIterate(state->the.fl, checkFLCallback, (void *)&closure, 0);
158 break;
159 default:
160 fail();
161 return;
162 }
92 163
93 if (closure.oldLimit == closure.base) 164 if (closure.oldLimit == closure.base)
94 Insist(BTIsSetRange(allocTable, 0, 165 Insist(BTIsSetRange(allocTable, 0,
@@ -102,7 +173,7 @@ static void checkCBS(CBS cbs, BT allocTable, Addr dummyBlock)
102} 173}
103 174
104 175
105static Word cbsRnd(Word limit) 176static Word fbmRnd(Word limit)
106{ 177{
107 /* Not very uniform, but never mind. */ 178 /* Not very uniform, but never mind. */
108 return (Word)rnd() % limit; 179 return (Word)rnd() % limit;
@@ -182,22 +253,22 @@ static void randomRange(Addr *baseReturn, Addr *limitReturn,
182 /* after base */ 253 /* after base */
183 Index limit; /* a randomly chosen value in (base, limit]. */ 254 Index limit; /* a randomly chosen value in (base, limit]. */
184 255
185 base = cbsRnd(ArraySize); 256 base = fbmRnd(ArraySize);
186 257
187 do { 258 do {
188 end = nextEdge(allocTable, ArraySize, base); 259 end = nextEdge(allocTable, ArraySize, base);
189 } while(end < ArraySize && cbsRnd(2) == 0); /* p=0.5 exponential */ 260 } while(end < ArraySize && fbmRnd(2) == 0); /* p=0.5 exponential */
190 261
191 Insist(end > base); 262 Insist(end > base);
192 263
193 limit = base + 1 + cbsRnd(end - base); 264 limit = base + 1 + fbmRnd(end - base);
194 265
195 *baseReturn = addrOfIndex(block, base); 266 *baseReturn = addrOfIndex(block, base);
196 *limitReturn = addrOfIndex(block, limit); 267 *limitReturn = addrOfIndex(block, limit);
197} 268}
198 269
199 270
200static void allocate(CBS cbs, Addr block, BT allocTable, 271static void allocate(FBMState state, Addr block, BT allocTable,
201 Addr base, Addr limit) 272 Addr base, Addr limit)
202{ 273{
203 Res res; 274 Res res;
@@ -210,11 +281,6 @@ static void allocate(CBS cbs, Addr block, BT allocTable,
210 il = indexOfAddr(block, limit); 281 il = indexOfAddr(block, limit);
211 282
212 isFree = BTIsResRange(allocTable, ib, il); 283 isFree = BTIsResRange(allocTable, ib, il);
213
214 /*
215 printf("allocate: [%p, %p) -- %s\n",
216 base, limit, isFree ? "succeed" : "fail");
217 */
218 284
219 NAllocateTried++; 285 NAllocateTried++;
220 286
@@ -237,7 +303,23 @@ static void allocate(CBS cbs, Addr block, BT allocTable,
237 } 303 }
238 304
239 RangeInit(&range, base, limit); 305 RangeInit(&range, base, limit);
240 res = CBSDelete(&oldRange, cbs, &range); 306 switch (state->type) {
307 case FBMTypeCBS:
308 res = CBSDelete(&oldRange, state->the.cbs, &range);
309 break;
310 case FBMTypeFreelist:
311 res = FreelistDelete(&oldRange, state->the.fl, &range);
312 break;
313 default:
314 fail();
315 return;
316 }
317
318 if (verbose) {
319 printf("allocate: [%p,%p) -- %s\n",
320 base, limit, isFree ? "succeed" : "fail");
321 describe(state);
322 }
241 323
242 if (!isFree) { 324 if (!isFree) {
243 die_expect((mps_res_t)res, MPS_RES_FAIL, 325 die_expect((mps_res_t)res, MPS_RES_FAIL,
@@ -253,25 +335,20 @@ static void allocate(CBS cbs, Addr block, BT allocTable,
253} 335}
254 336
255 337
256static void deallocate(CBS cbs, Addr block, BT allocTable, 338static void deallocate(FBMState state, Addr block, BT allocTable,
257 Addr base, Addr limit) 339 Addr base, Addr limit)
258{ 340{
259 Res res; 341 Res res;
260 Index ib, il; 342 Index ib, il;
261 Bool isAllocated; 343 Bool isAllocated;
262 Addr outerBase = base, outerLimit = limit; /* interval containing [ib, il) */ 344 Addr outerBase = base, outerLimit = limit; /* interval containing [ib, il) */
263 RangeStruct range, freeRange; /* interval returned by CBS */ 345 RangeStruct range, freeRange; /* interval returned by the manager */
264 346
265 ib = indexOfAddr(block, base); 347 ib = indexOfAddr(block, base);
266 il = indexOfAddr(block, limit); 348 il = indexOfAddr(block, limit);
267 349
268 isAllocated = BTIsSetRange(allocTable, ib, il); 350 isAllocated = BTIsSetRange(allocTable, ib, il);
269 351
270 /*
271 printf("deallocate: [%p, %p) -- %s\n",
272 base, limit, isAllocated ? "succeed" : "fail");
273 */
274
275 NDeallocateTried++; 352 NDeallocateTried++;
276 353
277 if (isAllocated) { 354 if (isAllocated) {
@@ -303,7 +380,23 @@ static void deallocate(CBS cbs, Addr block, BT allocTable,
303 } 380 }
304 381
305 RangeInit(&range, base, limit); 382 RangeInit(&range, base, limit);
306 res = CBSInsert(&freeRange, cbs, &range); 383 switch (state->type) {
384 case FBMTypeCBS:
385 res = CBSInsert(&freeRange, state->the.cbs, &range);
386 break;
387 case FBMTypeFreelist:
388 res = FreelistInsert(&freeRange, state->the.fl, &range);
389 break;
390 default:
391 fail();
392 return;
393 }
394
395 if (verbose) {
396 printf("deallocate: [%p,%p) -- %s\n",
397 base, limit, isAllocated ? "succeed" : "fail");
398 describe(state);
399 }
307 400
308 if (!isAllocated) { 401 if (!isAllocated) {
309 die_expect((mps_res_t)res, MPS_RES_FAIL, 402 die_expect((mps_res_t)res, MPS_RES_FAIL,
@@ -320,7 +413,7 @@ static void deallocate(CBS cbs, Addr block, BT allocTable,
320} 413}
321 414
322 415
323static void find(CBS cbs, void *block, BT alloc, Size size, Bool high, 416static void find(FBMState state, void *block, BT alloc, Size size, Bool high,
324 FindDelete findDelete) 417 FindDelete findDelete)
325{ 418{
326 Bool expected, found; 419 Bool expected, found;
@@ -366,8 +459,35 @@ static void find(CBS cbs, void *block, BT alloc, Size size, Bool high,
366 UNUSED(newSize); 459 UNUSED(newSize);
367 } 460 }
368 461
369 found = (high ? CBSFindLast : CBSFindFirst) 462 switch (state->type) {
370 (&foundRange, &oldRange, cbs, size * Alignment, findDelete); 463 case FBMTypeCBS:
464 found = (high ? CBSFindLast : CBSFindFirst)
465 (&foundRange, &oldRange, state->the.cbs, size * Alignment, findDelete);
466 break;
467 case FBMTypeFreelist:
468 found = (high ? FreelistFindLast : FreelistFindFirst)
469 (&foundRange, &oldRange, state->the.fl, size * Alignment, findDelete);
470 break;
471 default:
472 fail();
473 return;
474 }
475
476 if (verbose) {
477 printf("find %s %lu: ", high ? "last" : "first",
478 (unsigned long)(size * Alignment));
479 if (expected) {
480 printf("expecting [%p,%p)\n", addrOfIndex(block, expectedBase),
481 addrOfIndex(block, expectedLimit));
482 } else {
483 printf("expecting this not to be found\n");
484 }
485 if (found) {
486 printf(" found [%p,%p)\n", RangeBase(&foundRange), RangeLimit(&foundRange));
487 } else {
488 printf(" not found\n");
489 }
490 }
371 491
372 Insist(found == expected); 492 Insist(found == expected);
373 493
@@ -385,23 +505,59 @@ static void find(CBS cbs, void *block, BT alloc, Size size, Bool high,
385 return; 505 return;
386} 506}
387 507
508static void test(FBMState state, Addr dummyBlock, BT allocTable, unsigned n) {
509 Addr base, limit;
510 unsigned i;
511 Size size;
512 Bool high;
513 FindDelete findDelete = FindDeleteNONE;
514
515 BTSetRange(allocTable, 0, ArraySize); /* Initially all allocated */
516 check(state, allocTable, dummyBlock);
517 for(i = 0; i < n; i++) {
518 switch(fbmRnd(3)) {
519 case 0:
520 randomRange(&base, &limit, allocTable, dummyBlock);
521 allocate(state, dummyBlock, allocTable, base, limit);
522 break;
523 case 1:
524 randomRange(&base, &limit, allocTable, dummyBlock);
525 deallocate(state, dummyBlock, allocTable, base, limit);
526 break;
527 case 2:
528 size = fbmRnd(ArraySize / 10) + 1;
529 high = fbmRnd(2) ? TRUE : FALSE;
530 switch(fbmRnd(6)) {
531 case 0:
532 case 1:
533 case 2: findDelete = FindDeleteNONE; break;
534 case 3: findDelete = FindDeleteLOW; break;
535 case 4: findDelete = FindDeleteHIGH; break;
536 case 5: findDelete = FindDeleteENTIRE; break;
537 }
538 find(state, dummyBlock, allocTable, size, high, findDelete);
539 break;
540 default:
541 fail();
542 return;
543 }
544 if ((i + 1) % 1000 == 0)
545 check(state, allocTable, dummyBlock);
546 }
547}
388 548
389#define testArenaSIZE (((size_t)4)<<20) 549#define testArenaSIZE (((size_t)4)<<20)
390 550
391extern int main(int argc, char *argv[]) 551extern int main(int argc, char *argv[])
392{ 552{
393 unsigned i;
394 Addr base, limit;
395 mps_arena_t mpsArena; 553 mps_arena_t mpsArena;
396 Arena arena; /* the ANSI arena which we use to allocate the BT */ 554 Arena arena; /* the ANSI arena which we use to allocate the BT */
397 CBSStruct cbsStruct; 555 FBMStateStruct state;
398 CBS cbs;
399 void *p; 556 void *p;
400 Addr dummyBlock; 557 Addr dummyBlock;
401 BT allocTable; 558 BT allocTable;
402 Size size; 559 FreelistStruct flStruct;
403 Bool high; 560 CBSStruct cbsStruct;
404 FindDelete findDelete = FindDeleteNONE;
405 561
406 randomize(argc, argv); 562 randomize(argc, argv);
407 563
@@ -415,54 +571,34 @@ extern int main(int argc, char *argv[])
415 die((mps_res_t)BTCreate(&allocTable, arena, ArraySize), 571 die((mps_res_t)BTCreate(&allocTable, arena, ArraySize),
416 "failed to create alloc table"); 572 "failed to create alloc table");
417 573
418 die((mps_res_t)CBSInit(arena, &cbsStruct, NULL, Alignment, TRUE,
419 mps_args_none),
420 "failed to initialise CBS");
421 cbs = &cbsStruct;
422
423 BTSetRange(allocTable, 0, ArraySize); /* Initially all allocated */
424
425 /* We're not going to use this block, but I feel unhappy just */ 574 /* We're not going to use this block, but I feel unhappy just */
426 /* inventing addresses. */ 575 /* inventing addresses. */
427 die((mps_res_t)ControlAlloc(&p, arena, ArraySize * Alignment, 576 die((mps_res_t)ControlAlloc(&p, arena, ArraySize * Alignment,
428 /* withReservoirPermit */ FALSE), 577 /* withReservoirPermit */ FALSE),
429 "failed to allocate block"); 578 "failed to allocate block");
430 dummyBlock = (Addr)p; /* avoid pun */ 579 dummyBlock = p; /* avoid pun */
431 580
432 printf("Allocated block [%p, %p)\n", (void*)dummyBlock, 581 if (verbose) {
433 (char *)dummyBlock + ArraySize); 582 printf("Allocated block [%p,%p)\n", (void*)dummyBlock,
434 583 (char *)dummyBlock + ArraySize);
435 checkCBS(cbs, allocTable, dummyBlock);
436 for(i = 0; i < NOperations; i++) {
437 switch(cbsRnd(3)) {
438 case 0: {
439 randomRange(&base, &limit, allocTable, dummyBlock);
440 allocate(cbs, dummyBlock, allocTable, base, limit);
441 } break;
442 case 1: {
443 randomRange(&base, &limit, allocTable, dummyBlock);
444 deallocate(cbs, dummyBlock, allocTable, base, limit);
445 } break;
446 case 2: {
447 size = cbsRnd(ArraySize / 10) + 1;
448 high = cbsRnd(2) ? TRUE : FALSE;
449 switch(cbsRnd(6)) {
450 case 0:
451 case 1:
452 case 2: findDelete = FindDeleteNONE; break;
453 case 3: findDelete = FindDeleteLOW; break;
454 case 4: findDelete = FindDeleteHIGH; break;
455 case 5: findDelete = FindDeleteENTIRE; break;
456 }
457 find(cbs, dummyBlock, allocTable, size, high, findDelete);
458 } break;
459 }
460 if (i % 5000 == 0)
461 checkCBS(cbs, allocTable, dummyBlock);
462 } 584 }
463 585
464 /* CBSDescribe prints a very long line. */ 586 die((mps_res_t)CBSInit(arena, &cbsStruct, arena, Alignment,
465 /* CBSDescribe(cbs, mps_lib_get_stdout()); */ 587 TRUE, mps_args_none),
588 "failed to initialise CBS");
589 state.type = FBMTypeCBS;
590 state.the.cbs = &cbsStruct;
591 test(&state, dummyBlock, allocTable, nCBSOperations);
592 CBSFinish(&cbsStruct);
593
594 die((mps_res_t)FreelistInit(&flStruct, Alignment),
595 "failed to initialise Freelist");
596 state.type = FBMTypeFreelist;
597 state.the.fl = &flStruct;
598 test(&state, dummyBlock, allocTable, nFLOperations);
599 FreelistFinish(&flStruct);
600
601 mps_arena_destroy(arena);
466 602
467 printf("\nNumber of allocations attempted: %ld\n", NAllocateTried); 603 printf("\nNumber of allocations attempted: %ld\n", NAllocateTried);
468 printf("Number of allocations succeeded: %ld\n", NAllocateSucceeded); 604 printf("Number of allocations succeeded: %ld\n", NAllocateSucceeded);
diff --git a/mps/code/freelist.c b/mps/code/freelist.c
index f6e86ddf958..6db2e7e5d01 100644
--- a/mps/code/freelist.c
+++ b/mps/code/freelist.c
@@ -19,7 +19,7 @@ SRCID(freelist, "$Id$");
19 19
20#define FreelistTag(addr) ((Word)(addr) & 1) 20#define FreelistTag(addr) ((Word)(addr) & 1)
21#define FreelistTagSet(addr) ((Addr)((Word)(addr) | 1)) 21#define FreelistTagSet(addr) ((Addr)((Word)(addr) | 1))
22#define FreelistTagReset(addr) ((Addr)((Word)(addr) & ~1)) 22#define FreelistTagReset(addr) ((Addr)((Word)(addr) & ~(Word)1))
23#define FreelistTagCopy(to, from) ((Addr)((Word)(to) | FreelistTag(from))) 23#define FreelistTagCopy(to, from) ((Addr)((Word)(to) | FreelistTag(from)))
24 24
25#define FreelistGrainSize(fl) ((fl)->alignment) 25#define FreelistGrainSize(fl) ((fl)->alignment)
@@ -41,7 +41,7 @@ static Addr FreelistBlockLimit(Freelist fl, Addr addr)
41/* FreelistBlockNext -- return the next block in the list, or NULL if 41/* FreelistBlockNext -- return the next block in the list, or NULL if
42 * there are no more blocks. 42 * there are no more blocks.
43 */ 43 */
44static Addr FreelistBlockNext(Freelist fl, Addr addr) 44static Addr FreelistBlockNext(Addr addr)
45{ 45{
46 Addr *block = FreelistBlock(addr); 46 Addr *block = FreelistBlock(addr);
47 return FreelistTagReset(block[0]); 47 return FreelistTagReset(block[0]);
@@ -56,7 +56,7 @@ static Addr FreelistBlockNext(Freelist fl, Addr addr)
56 56
57/* FreelistBlockSetNext -- update the next block in the list */ 57/* FreelistBlockSetNext -- update the next block in the list */
58 58
59static void FreelistBlockSetNext(Freelist fl, Addr addr, Addr next) 59static void FreelistBlockSetNext(Addr addr, Addr next)
60{ 60{
61 Addr *block = FreelistBlock(addr); 61 Addr *block = FreelistBlock(addr);
62 block[0] = FreelistTagCopy(next, block[0]); 62 block[0] = FreelistTagCopy(next, block[0]);
@@ -68,7 +68,7 @@ static void FreelistBlockSetNext(Freelist fl, Addr addr, Addr next)
68static void FreelistBlockSetLimit(Freelist fl, Addr addr, Addr limit) 68static void FreelistBlockSetLimit(Freelist fl, Addr addr, Addr limit)
69{ 69{
70 Addr *block = FreelistBlock(addr); 70 Addr *block = FreelistBlock(addr);
71 Size size = size; 71 Size size = AddrOffset(addr, limit);
72 if (size > FreelistGrainSize(fl)) { 72 if (size > FreelistGrainSize(fl)) {
73 block[0] = FreelistTagReset(block[0]); 73 block[0] = FreelistTagReset(block[0]);
74 block[1] = limit; 74 block[1] = limit;
@@ -132,13 +132,16 @@ static void freelistBlockSetPrevNext(Freelist fl, Addr prev,
132 Addr next, int delta) 132 Addr next, int delta)
133{ 133{
134 if (prev) { 134 if (prev) {
135 FreelistBlockSetNext(fl, prev, next); 135 FreelistBlockSetNext(prev, next);
136 } else { 136 } else {
137 fl->list = next; 137 fl->list = next;
138 } 138 }
139 if (delta < 0) 139 if (delta < 0) {
140 AVER(fl->listSize >= -delta); 140 AVER(fl->listSize >= (Count)-delta);
141 fl->listSize += delta; 141 fl->listSize -= (Count)-delta;
142 } else {
143 fl->listSize += (Count)delta;
144 }
142} 145}
143 146
144 147
@@ -147,7 +150,6 @@ Res FreelistInsert(Range rangeReturn, Freelist fl, Range range)
147 Addr prev, cur, next, new; 150 Addr prev, cur, next, new;
148 Addr base, limit; 151 Addr base, limit;
149 Bool coalesceLeft, coalesceRight; 152 Bool coalesceLeft, coalesceRight;
150 Res res = ResOK;
151 153
152 AVER(rangeReturn != NULL); 154 AVER(rangeReturn != NULL);
153 AVERT(Freelist, fl); 155 AVERT(Freelist, fl);
@@ -165,7 +167,7 @@ Res FreelistInsert(Range rangeReturn, Freelist fl, Range range)
165 return ResFAIL; /* range overlaps with cur */ 167 return ResFAIL; /* range overlaps with cur */
166 if (limit <= cur) 168 if (limit <= cur)
167 break; 169 break;
168 next = FreelistBlockNext(fl, cur); 170 next = FreelistBlockNext(cur);
169 if (next) 171 if (next)
170 /* Isolated range invariant (design.mps.freelist.impl.invariant). */ 172 /* Isolated range invariant (design.mps.freelist.impl.invariant). */
171 AVER(FreelistBlockLimit(fl, cur) < next); 173 AVER(FreelistBlockLimit(fl, cur) < next);
@@ -184,21 +186,23 @@ Res FreelistInsert(Range rangeReturn, Freelist fl, Range range)
184 base = prev; 186 base = prev;
185 limit = FreelistBlockLimit(fl, cur); 187 limit = FreelistBlockLimit(fl, cur);
186 FreelistBlockSetLimit(fl, prev, limit); 188 FreelistBlockSetLimit(fl, prev, limit);
187 freelistBlockSetPrevNext(fl, prev, next, -1); 189 freelistBlockSetPrevNext(fl, prev, FreelistBlockNext(cur), -1);
188 190
189 } else if (coalesceLeft) { 191 } else if (coalesceLeft) {
190 base = prev; 192 base = prev;
191 FreelistBlockSetLimit(fl, prev, limit); 193 FreelistBlockSetLimit(fl, prev, limit);
192 194
193 } else if (coalesceRight) { 195 } else if (coalesceRight) {
196 next = FreelistBlockNext(cur);
194 limit = FreelistBlockLimit(fl, cur); 197 limit = FreelistBlockLimit(fl, cur);
195 cur = FreelistBlockInit(fl, base, limit); 198 cur = FreelistBlockInit(fl, base, limit);
196 FreelistBlockSetNext(fl, cur, next); 199 FreelistBlockSetNext(cur, next);
200 freelistBlockSetPrevNext(fl, prev, cur, 0);
197 201
198 } else { 202 } else {
199 /* failed to coalesce: add new block */ 203 /* failed to coalesce: add new block */
200 new = FreelistBlockInit(fl, base, limit); 204 new = FreelistBlockInit(fl, base, limit);
201 FreelistBlockSetNext(fl, new, cur); 205 FreelistBlockSetNext(new, cur);
202 freelistBlockSetPrevNext(fl, prev, new, +1); 206 freelistBlockSetPrevNext(fl, prev, new, +1);
203 } 207 }
204 208
@@ -223,7 +227,7 @@ static void freelistDeleteFromBlock(Range rangeReturn, Freelist fl,
223 AVERT(Freelist, fl); 227 AVERT(Freelist, fl);
224 AVERT(Range, range); 228 AVERT(Range, range);
225 AVER(RangeIsAligned(range, fl->alignment)); 229 AVER(RangeIsAligned(range, fl->alignment));
226 AVER(prev == NULL || FreelistBlockNext(fl, prev) == block); 230 AVER(prev == NULL || FreelistBlockNext(prev) == block);
227 AVER(block != NULL); 231 AVER(block != NULL);
228 232
229 AVER(block <= RangeBase(range)); 233 AVER(block <= RangeBase(range));
@@ -233,7 +237,7 @@ static void freelistDeleteFromBlock(Range rangeReturn, Freelist fl,
233 limit = RangeLimit(range); 237 limit = RangeLimit(range);
234 blockBase = block; 238 blockBase = block;
235 blockLimit = FreelistBlockLimit(fl, block); 239 blockLimit = FreelistBlockLimit(fl, block);
236 next = FreelistBlockNext(fl, block); 240 next = FreelistBlockNext(block);
237 241
238 if (base == blockBase && limit == blockLimit) { 242 if (base == blockBase && limit == blockLimit) {
239 /* No fragment at left; no fragment at right. */ 243 /* No fragment at left; no fragment at right. */
@@ -242,7 +246,7 @@ static void freelistDeleteFromBlock(Range rangeReturn, Freelist fl,
242 } else if (base == blockBase) { 246 } else if (base == blockBase) {
243 /* No fragment at left; block at right. */ 247 /* No fragment at left; block at right. */
244 block = FreelistBlockInit(fl, limit, blockLimit); 248 block = FreelistBlockInit(fl, limit, blockLimit);
245 FreelistBlockSetNext(fl, block, next); 249 FreelistBlockSetNext(block, next);
246 freelistBlockSetPrevNext(fl, prev, block, 0); 250 freelistBlockSetPrevNext(fl, prev, block, 0);
247 251
248 } else if (limit == blockLimit) { 252 } else if (limit == blockLimit) {
@@ -253,7 +257,7 @@ static void freelistDeleteFromBlock(Range rangeReturn, Freelist fl,
253 /* Block at left; block at right. */ 257 /* Block at left; block at right. */
254 FreelistBlockSetLimit(fl, block, base); 258 FreelistBlockSetLimit(fl, block, base);
255 new = FreelistBlockInit(fl, limit, blockLimit); 259 new = FreelistBlockInit(fl, limit, blockLimit);
256 FreelistBlockSetNext(fl, new, next); 260 FreelistBlockSetNext(new, next);
257 freelistBlockSetPrevNext(fl, block, new, +1); 261 freelistBlockSetPrevNext(fl, block, new, +1);
258 } 262 }
259 263
@@ -263,8 +267,7 @@ static void freelistDeleteFromBlock(Range rangeReturn, Freelist fl,
263 267
264Res FreelistDelete(Range rangeReturn, Freelist fl, Range range) 268Res FreelistDelete(Range rangeReturn, Freelist fl, Range range)
265{ 269{
266 Res res; 270 Addr prev, cur, next;
267 Addr prev, cur, next, new;
268 Addr base, limit; 271 Addr base, limit;
269 272
270 AVER(rangeReturn != NULL); 273 AVER(rangeReturn != NULL);
@@ -290,7 +293,7 @@ Res FreelistDelete(Range rangeReturn, Freelist fl, Range range)
290 return ResOK; 293 return ResOK;
291 } 294 }
292 295
293 next = FreelistBlockNext(fl, cur); 296 next = FreelistBlockNext(cur);
294 prev = cur; 297 prev = cur;
295 cur = next; 298 cur = next;
296 } 299 }
@@ -316,7 +319,7 @@ void FreelistIterate(Freelist fl, FreelistIterateMethod iterate,
316 Bool cont; 319 Bool cont;
317 RangeInit(&range, cur, FreelistBlockLimit(fl, cur)); 320 RangeInit(&range, cur, FreelistBlockLimit(fl, cur));
318 cont = (*iterate)(&delete, &range, closureP, closureS); 321 cont = (*iterate)(&delete, &range, closureP, closureS);
319 next = FreelistBlockNext(fl, cur); 322 next = FreelistBlockNext(cur);
320 if (delete) { 323 if (delete) {
321 freelistBlockSetPrevNext(fl, prev, next, -1); 324 freelistBlockSetPrevNext(fl, prev, next, -1);
322 } else { 325 } else {
@@ -350,7 +353,7 @@ static void freelistFindDeleteFromBlock(Range rangeReturn, Range oldRangeReturn,
350 AVERT(Freelist, fl); 353 AVERT(Freelist, fl);
351 AVER(SizeIsAligned(size, fl->alignment)); 354 AVER(SizeIsAligned(size, fl->alignment));
352 AVERT(FindDelete, findDelete); 355 AVERT(FindDelete, findDelete);
353 AVER(prev == NULL || FreelistBlockNext(fl, prev) == block); 356 AVER(prev == NULL || FreelistBlockNext(prev) == block);
354 AVER(block != NULL); 357 AVER(block != NULL);
355 AVER(FreelistBlockSize(fl, block) >= size); 358 AVER(FreelistBlockSize(fl, block) >= size);
356 359
@@ -388,10 +391,9 @@ static void freelistFindDeleteFromBlock(Range rangeReturn, Range oldRangeReturn,
388} 391}
389 392
390 393
391Bool FreelistFind(Range rangeReturn, Range oldRangeReturn, 394Bool FreelistFindFirst(Range rangeReturn, Range oldRangeReturn,
392 Freelist fl, Size size, FindDelete findDelete) 395 Freelist fl, Size size, FindDelete findDelete)
393{ 396{
394 Res res;
395 Addr prev, cur, next; 397 Addr prev, cur, next;
396 398
397 AVER(rangeReturn != NULL); 399 AVER(rangeReturn != NULL);
@@ -408,7 +410,7 @@ Bool FreelistFind(Range rangeReturn, Range oldRangeReturn,
408 findDelete, prev, cur); 410 findDelete, prev, cur);
409 return TRUE; 411 return TRUE;
410 } 412 }
411 next = FreelistBlockNext(fl, cur); 413 next = FreelistBlockNext(cur);
412 prev = cur; 414 prev = cur;
413 cur = next; 415 cur = next;
414 } 416 }
@@ -417,6 +419,40 @@ Bool FreelistFind(Range rangeReturn, Range oldRangeReturn,
417} 419}
418 420
419 421
422Bool FreelistFindLast(Range rangeReturn, Range oldRangeReturn,
423 Freelist fl, Size size, FindDelete findDelete)
424{
425 Bool found = FALSE;
426 Addr prev, cur, next;
427 Addr foundPrev, foundCur;
428
429 AVER(rangeReturn != NULL);
430 AVER(oldRangeReturn != NULL);
431 AVERT(Freelist, fl);
432 AVER(SizeIsAligned(size, fl->alignment));
433 AVERT(FindDelete, findDelete);
434
435 prev = NULL;
436 cur = fl->list;
437 while (cur) {
438 if (FreelistBlockSize(fl, cur) >= size) {
439 found = TRUE;
440 foundPrev = prev;
441 foundCur = cur;
442 }
443 next = FreelistBlockNext(cur);
444 prev = cur;
445 cur = next;
446 }
447
448 if (found)
449 freelistFindDeleteFromBlock(rangeReturn, oldRangeReturn, fl, size,
450 findDelete, foundPrev, foundCur);
451
452 return found;
453}
454
455
420Bool FreelistFindLargest(Range rangeReturn, Range oldRangeReturn, 456Bool FreelistFindLargest(Range rangeReturn, Range oldRangeReturn,
421 Freelist fl, FindDelete findDelete) 457 Freelist fl, FindDelete findDelete)
422{ 458{
@@ -439,7 +475,7 @@ Bool FreelistFindLargest(Range rangeReturn, Range oldRangeReturn,
439 bestPrev = prev; 475 bestPrev = prev;
440 bestCur = cur; 476 bestCur = cur;
441 } 477 }
442 next = FreelistBlockNext(fl, cur); 478 next = FreelistBlockNext(cur);
443 prev = cur; 479 prev = cur;
444 cur = next; 480 cur = next;
445 } 481 }
@@ -467,10 +503,12 @@ static Bool freelistDescribeIterateMethod(Bool *deleteReturn, Range range,
467 AVER(deleteReturn != NULL); 503 AVER(deleteReturn != NULL);
468 AVERT(Range, range); 504 AVERT(Range, range);
469 AVER(stream != NULL); 505 AVER(stream != NULL);
506 UNUSED(closureS);
470 507
471 res = WriteF(stream, 508 res = WriteF(stream,
472 " [$P,", (WriteFP)RangeBase(range), 509 " [$P,", (WriteFP)RangeBase(range),
473 "$P)\n", (WriteFP)RangeLimit(range), 510 "$P)", (WriteFP)RangeLimit(range),
511 " {$U}\n", (WriteFU)RangeSize(range),
474 NULL); 512 NULL);
475 513
476 *deleteReturn = FALSE; 514 *deleteReturn = FALSE;
diff --git a/mps/code/mps.xcodeproj/project.pbxproj b/mps/code/mps.xcodeproj/project.pbxproj
index 36b3e7ddac8..e2a83d5cf5e 100644
--- a/mps/code/mps.xcodeproj/project.pbxproj
+++ b/mps/code/mps.xcodeproj/project.pbxproj
@@ -41,6 +41,7 @@
41 3114A65B156E95B4001E0AA3 /* PBXTargetDependency */, 41 3114A65B156E95B4001E0AA3 /* PBXTargetDependency */,
42 3114A5CC156E932C001E0AA3 /* PBXTargetDependency */, 42 3114A5CC156E932C001E0AA3 /* PBXTargetDependency */,
43 3114A5EA156E93C4001E0AA3 /* PBXTargetDependency */, 43 3114A5EA156E93C4001E0AA3 /* PBXTargetDependency */,
44 228A22211759004C00270ECF /* PBXTargetDependency */,
44 31D60034156D3D5A00337B26 /* PBXTargetDependency */, 45 31D60034156D3D5A00337B26 /* PBXTargetDependency */,
45 3114A5A0156E915A001E0AA3 /* PBXTargetDependency */, 46 3114A5A0156E915A001E0AA3 /* PBXTargetDependency */,
46 3114A6A7156E9739001E0AA3 /* PBXTargetDependency */, 47 3114A6A7156E9739001E0AA3 /* PBXTargetDependency */,
@@ -66,6 +67,10 @@
66/* End PBXAggregateTarget section */ 67/* End PBXAggregateTarget section */
67 68
68/* Begin PBXBuildFile section */ 69/* Begin PBXBuildFile section */
70 22ABDC4E1758FD0C00965593 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; };
71 22ABDC501758FD0C00965593 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; };
72 22ABDC581758FD4F00965593 /* fbmtest.c in Sources */ = {isa = PBXBuildFile; fileRef = 22ABDC571758FD3D00965593 /* fbmtest.c */; };
73 22ABDC5A1758FDD500965593 /* freelist.c in Sources */ = {isa = PBXBuildFile; fileRef = 22ABDC591758FDCD00965593 /* freelist.c */; };
69 22FA176916E8D6FC0098B23F /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 74 22FA176916E8D6FC0098B23F /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; };
70 22FA176A16E8D6FC0098B23F /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; 75 22FA176A16E8D6FC0098B23F /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; };
71 22FA176B16E8D6FC0098B23F /* fmthe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAE4156BE6D500753214 /* fmthe.c */; }; 76 22FA176B16E8D6FC0098B23F /* fmthe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAE4156BE6D500753214 /* fmthe.c */; };
@@ -137,7 +142,6 @@
137 3114A63E156E94EA001E0AA3 /* abqtest.c in Sources */ = {isa = PBXBuildFile; fileRef = 3114A63D156E94EA001E0AA3 /* abqtest.c */; }; 142 3114A63E156E94EA001E0AA3 /* abqtest.c in Sources */ = {isa = PBXBuildFile; fileRef = 3114A63D156E94EA001E0AA3 /* abqtest.c */; };
138 3114A63F156E94F0001E0AA3 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 143 3114A63F156E94F0001E0AA3 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; };
139 3114A640156E94F0001E0AA3 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 144 3114A640156E94F0001E0AA3 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; };
140 3114A657156E95A6001E0AA3 /* cbstest.c in Sources */ = {isa = PBXBuildFile; fileRef = 3114A656156E95A6001E0AA3 /* cbstest.c */; };
141 3114A66E156E95F2001E0AA3 /* btcv.c in Sources */ = {isa = PBXBuildFile; fileRef = 3114A66C156E95EB001E0AA3 /* btcv.c */; }; 145 3114A66E156E95F2001E0AA3 /* btcv.c in Sources */ = {isa = PBXBuildFile; fileRef = 3114A66C156E95EB001E0AA3 /* btcv.c */; };
142 3114A66F156E95F2001E0AA3 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 146 3114A66F156E95F2001E0AA3 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; };
143 3114A670156E95F2001E0AA3 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 147 3114A670156E95F2001E0AA3 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; };
@@ -227,6 +231,20 @@
227 remoteGlobalIDString = 2D604B9B16514B1A003AAF46; 231 remoteGlobalIDString = 2D604B9B16514B1A003AAF46;
228 remoteInfo = mpseventtxt; 232 remoteInfo = mpseventtxt;
229 }; 233 };
234 228A22201759004C00270ECF /* PBXContainerItemProxy */ = {
235 isa = PBXContainerItemProxy;
236 containerPortal = 31EEABDA156AAE9E00714D05 /* Project object */;
237 proxyType = 1;
238 remoteGlobalIDString = 22ABDC491758FD0C00965593;
239 remoteInfo = fbmtest;
240 };
241 22ABDC4B1758FD0C00965593 /* PBXContainerItemProxy */ = {
242 isa = PBXContainerItemProxy;
243 containerPortal = 31EEABDA156AAE9E00714D05 /* Project object */;
244 proxyType = 1;
245 remoteGlobalIDString = 31EEABFA156AAF9D00714D05;
246 remoteInfo = mps;
247 };
230 22CDE92D16E9EB9300366D0A /* PBXContainerItemProxy */ = { 248 22CDE92D16E9EB9300366D0A /* PBXContainerItemProxy */ = {
231 isa = PBXContainerItemProxy; 249 isa = PBXContainerItemProxy;
232 containerPortal = 31EEABDA156AAE9E00714D05 /* Project object */; 250 containerPortal = 31EEABDA156AAE9E00714D05 /* Project object */;
@@ -493,13 +511,6 @@
493 remoteGlobalIDString = 31EEABFA156AAF9D00714D05; 511 remoteGlobalIDString = 31EEABFA156AAF9D00714D05;
494 remoteInfo = mps; 512 remoteInfo = mps;
495 }; 513 };
496 3114A65A156E95B4001E0AA3 /* PBXContainerItemProxy */ = {
497 isa = PBXContainerItemProxy;
498 containerPortal = 31EEABDA156AAE9E00714D05 /* Project object */;
499 proxyType = 1;
500 remoteGlobalIDString = 3114A64B156E9596001E0AA3;
501 remoteInfo = cbstest;
502 };
503 3114A674156E9619001E0AA3 /* PBXContainerItemProxy */ = { 514 3114A674156E9619001E0AA3 /* PBXContainerItemProxy */ = {
504 isa = PBXContainerItemProxy; 515 isa = PBXContainerItemProxy;
505 containerPortal = 31EEABDA156AAE9E00714D05 /* Project object */; 516 containerPortal = 31EEABDA156AAE9E00714D05 /* Project object */;
@@ -685,6 +696,15 @@
685/* End PBXContainerItemProxy section */ 696/* End PBXContainerItemProxy section */
686 697
687/* Begin PBXCopyFilesBuildPhase section */ 698/* Begin PBXCopyFilesBuildPhase section */
699 22ABDC511758FD0C00965593 /* CopyFiles */ = {
700 isa = PBXCopyFilesBuildPhase;
701 buildActionMask = 2147483647;
702 dstPath = /usr/share/man/man1/;
703 dstSubfolderSpec = 0;
704 files = (
705 );
706 runOnlyForDeploymentPostprocessing = 1;
707 };
688 22FA177016E8D6FC0098B23F /* CopyFiles */ = { 708 22FA177016E8D6FC0098B23F /* CopyFiles */ = {
689 isa = PBXCopyFilesBuildPhase; 709 isa = PBXCopyFilesBuildPhase;
690 buildActionMask = 2147483647; 710 buildActionMask = 2147483647;
@@ -987,6 +1007,9 @@
987/* Begin PBXFileReference section */ 1007/* Begin PBXFileReference section */
988 2219DEFF174BE51900F112E9 /* mpscmvt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mpscmvt.h; sourceTree = "<group>"; }; 1008 2219DEFF174BE51900F112E9 /* mpscmvt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mpscmvt.h; sourceTree = "<group>"; };
989 226FDF2D174AC32C008E5B4F /* range.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = range.c; sourceTree = "<group>"; }; 1009 226FDF2D174AC32C008E5B4F /* range.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = range.c; sourceTree = "<group>"; };
1010 22ABDC561758FD0C00965593 /* fbmtest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fbmtest; sourceTree = BUILT_PRODUCTS_DIR; };
1011 22ABDC571758FD3D00965593 /* fbmtest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fbmtest.c; sourceTree = "<group>"; };
1012 22ABDC591758FDCD00965593 /* freelist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = freelist.c; sourceTree = "<group>"; };
990 22FA177516E8D6FC0098B23F /* amcssth */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = amcssth; sourceTree = BUILT_PRODUCTS_DIR; }; 1013 22FA177516E8D6FC0098B23F /* amcssth */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = amcssth; sourceTree = BUILT_PRODUCTS_DIR; };
991 22FA177616E8D7A80098B23F /* amcssth.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = amcssth.c; sourceTree = "<group>"; }; 1014 22FA177616E8D7A80098B23F /* amcssth.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = amcssth.c; sourceTree = "<group>"; };
992 2D07B96C1636FC7200DB751B /* eventsql.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = eventsql.c; sourceTree = "<group>"; }; 1015 2D07B96C1636FC7200DB751B /* eventsql.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = eventsql.c; sourceTree = "<group>"; };
@@ -1024,8 +1047,6 @@
1024 3114A633156E94DB001E0AA3 /* abqtest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = abqtest; sourceTree = BUILT_PRODUCTS_DIR; }; 1047 3114A633156E94DB001E0AA3 /* abqtest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = abqtest; sourceTree = BUILT_PRODUCTS_DIR; };
1025 3114A63D156E94EA001E0AA3 /* abqtest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = abqtest.c; sourceTree = "<group>"; }; 1048 3114A63D156E94EA001E0AA3 /* abqtest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = abqtest.c; sourceTree = "<group>"; };
1026 3114A645156E9525001E0AA3 /* abq.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = abq.c; sourceTree = "<group>"; }; 1049 3114A645156E9525001E0AA3 /* abq.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = abq.c; sourceTree = "<group>"; };
1027 3114A64C156E9596001E0AA3 /* cbstest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = cbstest; sourceTree = BUILT_PRODUCTS_DIR; };
1028 3114A656156E95A6001E0AA3 /* cbstest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cbstest.c; sourceTree = "<group>"; };
1029 3114A662156E95D9001E0AA3 /* btcv */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = btcv; sourceTree = BUILT_PRODUCTS_DIR; }; 1050 3114A662156E95D9001E0AA3 /* btcv */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = btcv; sourceTree = BUILT_PRODUCTS_DIR; };
1030 3114A66C156E95EB001E0AA3 /* btcv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = btcv.c; sourceTree = "<group>"; }; 1051 3114A66C156E95EB001E0AA3 /* btcv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = btcv.c; sourceTree = "<group>"; };
1031 3114A67C156E9668001E0AA3 /* mv2test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mv2test; sourceTree = BUILT_PRODUCTS_DIR; }; 1052 3114A67C156E9668001E0AA3 /* mv2test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mv2test; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1177,6 +1198,14 @@
1177/* End PBXFileReference section */ 1198/* End PBXFileReference section */
1178 1199
1179/* Begin PBXFrameworksBuildPhase section */ 1200/* Begin PBXFrameworksBuildPhase section */
1201 22ABDC4F1758FD0C00965593 /* Frameworks */ = {
1202 isa = PBXFrameworksBuildPhase;
1203 buildActionMask = 2147483647;
1204 files = (
1205 22ABDC501758FD0C00965593 /* libmps.a in Frameworks */,
1206 );
1207 runOnlyForDeploymentPostprocessing = 0;
1208 };
1180 22FA176E16E8D6FC0098B23F /* Frameworks */ = { 1209 22FA176E16E8D6FC0098B23F /* Frameworks */ = {
1181 isa = PBXFrameworksBuildPhase; 1210 isa = PBXFrameworksBuildPhase;
1182 buildActionMask = 2147483647; 1211 buildActionMask = 2147483647;
@@ -1501,9 +1530,9 @@
1501 31D60017156D3CC300337B26 /* awluthe.c */, 1530 31D60017156D3CC300337B26 /* awluthe.c */,
1502 3114A66C156E95EB001E0AA3 /* btcv.c */, 1531 3114A66C156E95EB001E0AA3 /* btcv.c */,
1503 3114A613156E944A001E0AA3 /* bttest.c */, 1532 3114A613156E944A001E0AA3 /* bttest.c */,
1504 3114A656156E95A6001E0AA3 /* cbstest.c */,
1505 3114A5CD156E9369001E0AA3 /* finalcv.c */, 1533 3114A5CD156E9369001E0AA3 /* finalcv.c */,
1506 3114A5E5156E93B9001E0AA3 /* finaltest.c */, 1534 3114A5E5156E93B9001E0AA3 /* finaltest.c */,
1535 22ABDC571758FD3D00965593 /* fbmtest.c */,
1507 3124CAC6156BE48D00753214 /* fmtdy.c */, 1536 3124CAC6156BE48D00753214 /* fmtdy.c */,
1508 3124CAC7156BE48D00753214 /* fmtdytst.c */, 1537 3124CAC7156BE48D00753214 /* fmtdytst.c */,
1509 3124CAE4156BE6D500753214 /* fmthe.c */, 1538 3124CAE4156BE6D500753214 /* fmthe.c */,
@@ -1595,7 +1624,6 @@
1595 3114A605156E9430001E0AA3 /* bttest */, 1624 3114A605156E9430001E0AA3 /* bttest */,
1596 3114A61C156E9485001E0AA3 /* teletest */, 1625 3114A61C156E9485001E0AA3 /* teletest */,
1597 3114A633156E94DB001E0AA3 /* abqtest */, 1626 3114A633156E94DB001E0AA3 /* abqtest */,
1598 3114A64C156E9596001E0AA3 /* cbstest */,
1599 3114A662156E95D9001E0AA3 /* btcv */, 1627 3114A662156E95D9001E0AA3 /* btcv */,
1600 3114A67C156E9668001E0AA3 /* mv2test */, 1628 3114A67C156E9668001E0AA3 /* mv2test */,
1601 3114A695156E971B001E0AA3 /* messtest */, 1629 3114A695156E971B001E0AA3 /* messtest */,
@@ -1604,6 +1632,7 @@
1604 2D07B9711636FC9900DB751B /* mpseventsql */, 1632 2D07B9711636FC9900DB751B /* mpseventsql */,
1605 2D604B9C16514B1A003AAF46 /* mpseventtxt */, 1633 2D604B9C16514B1A003AAF46 /* mpseventtxt */,
1606 22FA177516E8D6FC0098B23F /* amcssth */, 1634 22FA177516E8D6FC0098B23F /* amcssth */,
1635 22ABDC561758FD0C00965593 /* fbmtest */,
1607 ); 1636 );
1608 name = Products; 1637 name = Products;
1609 sourceTree = "<group>"; 1638 sourceTree = "<group>";
@@ -1639,6 +1668,7 @@
1639 311F2F5B17398AE900C15B6A /* eventpro.h */, 1668 311F2F5B17398AE900C15B6A /* eventpro.h */,
1640 311F2F5C17398AE900C15B6A /* eventrep.h */, 1669 311F2F5C17398AE900C15B6A /* eventrep.h */,
1641 31EEAC1A156AB2B200714D05 /* format.c */, 1670 31EEAC1A156AB2B200714D05 /* format.c */,
1671 22ABDC591758FDCD00965593 /* freelist.c */,
1642 31EEAC07156AB27B00714D05 /* global.c */, 1672 31EEAC07156AB27B00714D05 /* global.c */,
1643 31EEAC2B156AB2F200714D05 /* ld.c */, 1673 31EEAC2B156AB2F200714D05 /* ld.c */,
1644 311F2F5E17398B0E00C15B6A /* lock.h */, 1674 311F2F5E17398B0E00C15B6A /* lock.h */,
@@ -1763,6 +1793,24 @@
1763/* End PBXHeadersBuildPhase section */ 1793/* End PBXHeadersBuildPhase section */
1764 1794
1765/* Begin PBXNativeTarget section */ 1795/* Begin PBXNativeTarget section */
1796 22ABDC491758FD0C00965593 /* fbmtest */ = {
1797 isa = PBXNativeTarget;
1798 buildConfigurationList = 22ABDC521758FD0C00965593 /* Build configuration list for PBXNativeTarget "fbmtest" */;
1799 buildPhases = (
1800 22ABDC4C1758FD0C00965593 /* Sources */,
1801 22ABDC4F1758FD0C00965593 /* Frameworks */,
1802 22ABDC511758FD0C00965593 /* CopyFiles */,
1803 );
1804 buildRules = (
1805 );
1806 dependencies = (
1807 22ABDC4A1758FD0C00965593 /* PBXTargetDependency */,
1808 );
1809 name = fbmtest;
1810 productName = fbmtest;
1811 productReference = 22ABDC561758FD0C00965593 /* fbmtest */;
1812 productType = "com.apple.product-type.tool";
1813 };
1766 22FA176416E8D6FC0098B23F /* amcssth */ = { 1814 22FA176416E8D6FC0098B23F /* amcssth */ = {
1767 isa = PBXNativeTarget; 1815 isa = PBXNativeTarget;
1768 buildConfigurationList = 22FA177116E8D6FC0098B23F /* Build configuration list for PBXNativeTarget "amcssth" */; 1816 buildConfigurationList = 22FA177116E8D6FC0098B23F /* Build configuration list for PBXNativeTarget "amcssth" */;
@@ -2067,24 +2115,6 @@
2067 productReference = 3114A633156E94DB001E0AA3 /* abqtest */; 2115 productReference = 3114A633156E94DB001E0AA3 /* abqtest */;
2068 productType = "com.apple.product-type.tool"; 2116 productType = "com.apple.product-type.tool";
2069 }; 2117 };
2070 3114A64B156E9596001E0AA3 /* cbstest */ = {
2071 isa = PBXNativeTarget;
2072 buildConfigurationList = 3114A653156E9596001E0AA3 /* Build configuration list for PBXNativeTarget "cbstest" */;
2073 buildPhases = (
2074 3114A648156E9596001E0AA3 /* Sources */,
2075 3114A649156E9596001E0AA3 /* Frameworks */,
2076 3114A64A156E9596001E0AA3 /* CopyFiles */,
2077 );
2078 buildRules = (
2079 );
2080 dependencies = (
2081 3114A659156E95B1001E0AA3 /* PBXTargetDependency */,
2082 );
2083 name = cbstest;
2084 productName = cbstest;
2085 productReference = 3114A64C156E9596001E0AA3 /* cbstest */;
2086 productType = "com.apple.product-type.tool";
2087 };
2088 3114A661156E95D9001E0AA3 /* btcv */ = { 2118 3114A661156E95D9001E0AA3 /* btcv */ = {
2089 isa = PBXNativeTarget; 2119 isa = PBXNativeTarget;
2090 buildConfigurationList = 3114A669156E95D9001E0AA3 /* Build configuration list for PBXNativeTarget "btcv" */; 2120 buildConfigurationList = 3114A669156E95D9001E0AA3 /* Build configuration list for PBXNativeTarget "btcv" */;
@@ -2406,9 +2436,9 @@
2406 31D6000C156D3CB200337B26 /* awluthe */, 2436 31D6000C156D3CB200337B26 /* awluthe */,
2407 3114A661156E95D9001E0AA3 /* btcv */, 2437 3114A661156E95D9001E0AA3 /* btcv */,
2408 3114A604156E9430001E0AA3 /* bttest */, 2438 3114A604156E9430001E0AA3 /* bttest */,
2409 3114A64B156E9596001E0AA3 /* cbstest */,
2410 3114A5BC156E9315001E0AA3 /* finalcv */, 2439 3114A5BC156E9315001E0AA3 /* finalcv */,
2411 3114A5D5156E93A0001E0AA3 /* finaltest */, 2440 3114A5D5156E93A0001E0AA3 /* finaltest */,
2441 22ABDC491758FD0C00965593 /* fbmtest */,
2412 31D60026156D3D3E00337B26 /* lockcov */, 2442 31D60026156D3D3E00337B26 /* lockcov */,
2413 3114A58F156E913C001E0AA3 /* locv */, 2443 3114A58F156E913C001E0AA3 /* locv */,
2414 3114A694156E971B001E0AA3 /* messtest */, 2444 3114A694156E971B001E0AA3 /* messtest */,
@@ -2444,12 +2474,22 @@
2444 ); 2474 );
2445 runOnlyForDeploymentPostprocessing = 0; 2475 runOnlyForDeploymentPostprocessing = 0;
2446 shellPath = /bin/sh; 2476 shellPath = /bin/sh;
2447 shellScript = "# bttest and teletest are not listed here because they cannot be run\n# unattended.\nTESTCASES=\"abqtest amcss amcsshe amcssth amsss amssshe apss arenacv \\\n awlut awluthe btcv cbstest finalcv finaltest lockcov locv \\\n messtest mpmss mpsicv mv2test poolncv qs sacss segsmss \\\n steptest walkt0\"\n../tool/testrun.sh $(for TEST in $TESTCASES; do echo $TARGET_BUILD_DIR/$TEST; done)\n\n# Coverage\nif [ \"$CONFIGURATION\" == \"Debug\" ]; then\n (cd xc/$PROJECT.build/$CONFIGURATION/$PROJECT.build/Objects-normal/x86_64 &&\n gcov mps.c 2> /dev/null) | ../tool/gcovfmt.py\nfi"; 2477 shellScript = "# bttest and teletest are not listed here because they cannot be run\n# unattended.\nTESTCASES=\"abqtest amcss amcsshe amcssth amsss amssshe apss arenacv \\\n awlut awluthe btcv fbmtest finalcv finaltest lockcov locv \\\n messtest mpmss mpsicv mv2test poolncv qs sacss segsmss \\\n steptest walkt0\"\n../tool/testrun.sh $(for TEST in $TESTCASES; do echo $TARGET_BUILD_DIR/$TEST; done)\n\n# Coverage\nif [ \"$CONFIGURATION\" == \"Debug\" ]; then\n (cd xc/$PROJECT.build/$CONFIGURATION/$PROJECT.build/Objects-normal/x86_64 &&\n gcov mps.c 2> /dev/null) | ../tool/gcovfmt.py\nfi";
2448 showEnvVarsInLog = 0; 2478 showEnvVarsInLog = 0;
2449 }; 2479 };
2450/* End PBXShellScriptBuildPhase section */ 2480/* End PBXShellScriptBuildPhase section */
2451 2481
2452/* Begin PBXSourcesBuildPhase section */ 2482/* Begin PBXSourcesBuildPhase section */
2483 22ABDC4C1758FD0C00965593 /* Sources */ = {
2484 isa = PBXSourcesBuildPhase;
2485 buildActionMask = 2147483647;
2486 files = (
2487 22ABDC5A1758FDD500965593 /* freelist.c in Sources */,
2488 22ABDC581758FD4F00965593 /* fbmtest.c in Sources */,
2489 22ABDC4E1758FD0C00965593 /* testlib.c in Sources */,
2490 );
2491 runOnlyForDeploymentPostprocessing = 0;
2492 };
2453 22FA176716E8D6FC0098B23F /* Sources */ = { 2493 22FA176716E8D6FC0098B23F /* Sources */ = {
2454 isa = PBXSourcesBuildPhase; 2494 isa = PBXSourcesBuildPhase;
2455 buildActionMask = 2147483647; 2495 buildActionMask = 2147483647;
@@ -2625,15 +2665,6 @@
2625 ); 2665 );
2626 runOnlyForDeploymentPostprocessing = 0; 2666 runOnlyForDeploymentPostprocessing = 0;
2627 }; 2667 };
2628 3114A648156E9596001E0AA3 /* Sources */ = {
2629 isa = PBXSourcesBuildPhase;
2630 buildActionMask = 2147483647;
2631 files = (
2632 3114A657156E95A6001E0AA3 /* cbstest.c in Sources */,
2633 3114A672156E95F6001E0AA3 /* testlib.c in Sources */,
2634 );
2635 runOnlyForDeploymentPostprocessing = 0;
2636 };
2637 3114A65E156E95D9001E0AA3 /* Sources */ = { 2668 3114A65E156E95D9001E0AA3 /* Sources */ = {
2638 isa = PBXSourcesBuildPhase; 2669 isa = PBXSourcesBuildPhase;
2639 buildActionMask = 2147483647; 2670 buildActionMask = 2147483647;
@@ -2814,6 +2845,16 @@
2814 target = 2D604B9B16514B1A003AAF46 /* mpseventtxt */; 2845 target = 2D604B9B16514B1A003AAF46 /* mpseventtxt */;
2815 targetProxy = 2275798816C5422900B662B0 /* PBXContainerItemProxy */; 2846 targetProxy = 2275798816C5422900B662B0 /* PBXContainerItemProxy */;
2816 }; 2847 };
2848 228A22211759004C00270ECF /* PBXTargetDependency */ = {
2849 isa = PBXTargetDependency;
2850 target = 22ABDC491758FD0C00965593 /* fbmtest */;
2851 targetProxy = 228A22201759004C00270ECF /* PBXContainerItemProxy */;
2852 };
2853 22ABDC4A1758FD0C00965593 /* PBXTargetDependency */ = {
2854 isa = PBXTargetDependency;
2855 target = 31EEABFA156AAF9D00714D05 /* mps */;
2856 targetProxy = 22ABDC4B1758FD0C00965593 /* PBXContainerItemProxy */;
2857 };
2817 22CDE92E16E9EB9300366D0A /* PBXTargetDependency */ = { 2858 22CDE92E16E9EB9300366D0A /* PBXTargetDependency */ = {
2818 isa = PBXTargetDependency; 2859 isa = PBXTargetDependency;
2819 target = 3104AFF1156D37A0000A585A /* all */; 2860 target = 3104AFF1156D37A0000A585A /* all */;
@@ -3004,11 +3045,6 @@
3004 target = 31EEABFA156AAF9D00714D05 /* mps */; 3045 target = 31EEABFA156AAF9D00714D05 /* mps */;
3005 targetProxy = 3114A658156E95B1001E0AA3 /* PBXContainerItemProxy */; 3046 targetProxy = 3114A658156E95B1001E0AA3 /* PBXContainerItemProxy */;
3006 }; 3047 };
3007 3114A65B156E95B4001E0AA3 /* PBXTargetDependency */ = {
3008 isa = PBXTargetDependency;
3009 target = 3114A64B156E9596001E0AA3 /* cbstest */;
3010 targetProxy = 3114A65A156E95B4001E0AA3 /* PBXContainerItemProxy */;
3011 };
3012 3114A675156E9619001E0AA3 /* PBXTargetDependency */ = { 3048 3114A675156E9619001E0AA3 /* PBXTargetDependency */ = {
3013 isa = PBXTargetDependency; 3049 isa = PBXTargetDependency;
3014 target = 31EEABFA156AAF9D00714D05 /* mps */; 3050 target = 31EEABFA156AAF9D00714D05 /* mps */;
@@ -3142,6 +3178,33 @@
3142/* End PBXTargetDependency section */ 3178/* End PBXTargetDependency section */
3143 3179
3144/* Begin XCBuildConfiguration section */ 3180/* Begin XCBuildConfiguration section */
3181 22ABDC531758FD0C00965593 /* Debug */ = {
3182 isa = XCBuildConfiguration;
3183 buildSettings = {
3184 GCC_GENERATE_TEST_COVERAGE_FILES = YES;
3185 GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
3186 PRODUCT_NAME = fbmtest;
3187 };
3188 name = Debug;
3189 };
3190 22ABDC541758FD0C00965593 /* Release */ = {
3191 isa = XCBuildConfiguration;
3192 buildSettings = {
3193 GCC_GENERATE_TEST_COVERAGE_FILES = NO;
3194 GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO;
3195 PRODUCT_NAME = fbmtest;
3196 };
3197 name = Release;
3198 };
3199 22ABDC551758FD0C00965593 /* WE */ = {
3200 isa = XCBuildConfiguration;
3201 buildSettings = {
3202 GCC_GENERATE_TEST_COVERAGE_FILES = NO;
3203 GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO;
3204 PRODUCT_NAME = fbmtest;
3205 };
3206 name = WE;
3207 };
3145 22CDE8F116E9E97E00366D0A /* Debug */ = { 3208 22CDE8F116E9E97E00366D0A /* Debug */ = {
3146 isa = XCBuildConfiguration; 3209 isa = XCBuildConfiguration;
3147 buildSettings = { 3210 buildSettings = {
@@ -4267,6 +4330,16 @@
4267/* End XCBuildConfiguration section */ 4330/* End XCBuildConfiguration section */
4268 4331
4269/* Begin XCConfigurationList section */ 4332/* Begin XCConfigurationList section */
4333 22ABDC521758FD0C00965593 /* Build configuration list for PBXNativeTarget "fbmtest" */ = {
4334 isa = XCConfigurationList;
4335 buildConfigurations = (
4336 22ABDC531758FD0C00965593 /* Debug */,
4337 22ABDC541758FD0C00965593 /* Release */,
4338 22ABDC551758FD0C00965593 /* WE */,
4339 );
4340 defaultConfigurationIsVisible = 0;
4341 defaultConfigurationName = Release;
4342 };
4270 22CDE8F016E9E97E00366D0A /* Build configuration list for PBXAggregateTarget "testrun" */ = { 4343 22CDE8F016E9E97E00366D0A /* Build configuration list for PBXAggregateTarget "testrun" */ = {
4271 isa = XCConfigurationList; 4344 isa = XCConfigurationList;
4272 buildConfigurations = ( 4345 buildConfigurations = (
@@ -4457,16 +4530,6 @@
4457 defaultConfigurationIsVisible = 0; 4530 defaultConfigurationIsVisible = 0;
4458 defaultConfigurationName = Release; 4531 defaultConfigurationName = Release;
4459 }; 4532 };
4460 3114A653156E9596001E0AA3 /* Build configuration list for PBXNativeTarget "cbstest" */ = {
4461 isa = XCConfigurationList;
4462 buildConfigurations = (
4463 3114A654156E9596001E0AA3 /* Debug */,
4464 3114A655156E9596001E0AA3 /* Release */,
4465 3183880615DC30CC008E4EA0 /* WE */,
4466 );
4467 defaultConfigurationIsVisible = 0;
4468 defaultConfigurationName = Release;
4469 };
4470 3114A669156E95D9001E0AA3 /* Build configuration list for PBXNativeTarget "btcv" */ = { 4533 3114A669156E95D9001E0AA3 /* Build configuration list for PBXNativeTarget "btcv" */ = {
4471 isa = XCConfigurationList; 4534 isa = XCConfigurationList;
4472 buildConfigurations = ( 4535 buildConfigurations = (
diff --git a/mps/code/range.c b/mps/code/range.c
index 4cd61d7b04d..b2d4494454e 100644
--- a/mps/code/range.c
+++ b/mps/code/range.c
@@ -52,8 +52,9 @@ Res RangeDescribe(Range range, mps_lib_FILE *stream)
52 52
53 res = WriteF(stream, 53 res = WriteF(stream,
54 "Range $P\n{\n", (WriteFP)range, 54 "Range $P\n{\n", (WriteFP)range,
55 " base: $P \n", (WriteFP)RangeBase(range), 55 " base: $P\n", (WriteFP)RangeBase(range),
56 " limit: $P \n", (WriteFP)RangeLimit(range), 56 " limit: $P\n", (WriteFP)RangeLimit(range),
57 " size: $U\n", (WriteFU)RangeSize(range),
57 "}\n", NULL); 58 "}\n", NULL);
58 if (res != ResOK) { 59 if (res != ResOK) {
59 return res; 60 return res;