aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorRichard Brooksby2012-09-05 18:44:44 +0100
committerRichard Brooksby2012-09-05 18:44:44 +0100
commit915c01ef3ebe171e34dfb786b91be5a8e4057e5e (patch)
tree598e11374e93c3dd9ff4791ba4710d1cade82cf1 /mps/code
parent10470d39742cae58c8906c08f8145c06b71aad20 (diff)
parentb6e7805b6f870b335c678e2406869933a5cac43b (diff)
downloademacs-915c01ef3ebe171e34dfb786b91be5a8e4057e5e.tar.gz
emacs-915c01ef3ebe171e34dfb786b91be5a8e4057e5e.zip
Merging branch/2012-08-15/variety-reform.
Copied from Perforce Change: 179279 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/arena.c8
-rw-r--r--mps/code/arenacl.c2
-rw-r--r--mps/code/arenavm.c6
-rw-r--r--mps/code/buffer.c10
-rw-r--r--mps/code/cbs.c4
-rw-r--r--mps/code/check.h328
-rw-r--r--mps/code/comm.gmk259
-rw-r--r--mps/code/commpost.nmk220
-rw-r--r--mps/code/commpre.nmk75
-rw-r--r--mps/code/config.h151
-rw-r--r--mps/code/dbgpool.c8
-rw-r--r--mps/code/dbgpooli.c8
-rw-r--r--mps/code/eventpro.c18
-rw-r--r--mps/code/eventrep.c10
-rwxr-xr-xmps/code/expgen.sh203
-rw-r--r--mps/code/fri3gc.gmk9
-rw-r--r--mps/code/fri6gc.gmk7
-rw-r--r--mps/code/gc.gmk5
-rw-r--r--mps/code/global.c10
-rw-r--r--mps/code/gp.gmk1
-rw-r--r--mps/code/lii3gc.gmk5
-rw-r--r--mps/code/lii6gc.gmk5
-rw-r--r--mps/code/lockli.c9
-rw-r--r--mps/code/mpm.c6
-rw-r--r--mps/code/mps.c37
-rw-r--r--mps/code/mps.h4
-rw-r--r--mps/code/mps.xcodeproj/project.pbxproj334
-rw-r--r--mps/code/mpsi.c121
-rw-r--r--mps/code/mpslibcb.c343
-rw-r--r--mps/code/mpslibcb.def10
-rw-r--r--mps/code/mpslibcb.h58
-rw-r--r--mps/code/mpstd.h32
-rw-r--r--mps/code/pool.c2
-rw-r--r--mps/code/poolamc.c12
-rw-r--r--mps/code/poolams.c12
-rw-r--r--mps/code/poolmrg.c8
-rw-r--r--mps/code/poolmv.c6
-rw-r--r--mps/code/poolmv2.c4
-rw-r--r--mps/code/poolmvff.c6
-rw-r--r--mps/code/poolsnc.c2
-rw-r--r--mps/code/protix.c5
-rw-r--r--mps/code/root.c4
-rw-r--r--mps/code/seg.c8
-rw-r--r--mps/code/vmw3.c4
-rw-r--r--mps/code/w3gen.def158
-rw-r--r--mps/code/w3i3mv.nmk247
-rw-r--r--mps/code/w3i6mv.nmk245
-rw-r--r--mps/code/xci3gc.gmk1
48 files changed, 1077 insertions, 1953 deletions
diff --git a/mps/code/arena.c b/mps/code/arena.c
index 704d13f60db..c3fe88ebf19 100644
--- a/mps/code/arena.c
+++ b/mps/code/arena.c
@@ -26,7 +26,7 @@ static void ArenaTrivCompact(Arena arena, Trace trace);
26 26
27static Res ArenaTrivDescribe(Arena arena, mps_lib_FILE *stream) 27static Res ArenaTrivDescribe(Arena arena, mps_lib_FILE *stream)
28{ 28{
29 if (!CHECKT(Arena, arena)) return ResFAIL; 29 if (!TESTT(Arena, arena)) return ResFAIL;
30 if (stream == NULL) return ResFAIL; 30 if (stream == NULL) return ResFAIL;
31 31
32 /* .describe.triv.never-called-from-subclass-method: 32 /* .describe.triv.never-called-from-subclass-method:
@@ -324,7 +324,7 @@ Res ArenaDescribe(Arena arena, mps_lib_FILE *stream)
324 Res res; 324 Res res;
325 Size reserved; 325 Size reserved;
326 326
327 if (!CHECKT(Arena, arena)) return ResFAIL; 327 if (!TESTT(Arena, arena)) return ResFAIL;
328 if (stream == NULL) return ResFAIL; 328 if (stream == NULL) return ResFAIL;
329 329
330 res = WriteF(stream, "Arena $P {\n", (WriteFP)arena, 330 res = WriteF(stream, "Arena $P {\n", (WriteFP)arena,
@@ -396,7 +396,7 @@ Res ArenaDescribeTracts(Arena arena, mps_lib_FILE *stream)
396 Addr oldLimit, base, limit; 396 Addr oldLimit, base, limit;
397 Size size; 397 Size size;
398 398
399 if (!CHECKT(Arena, arena)) return ResFAIL; 399 if (!TESTT(Arena, arena)) return ResFAIL;
400 if (stream == NULL) return ResFAIL; 400 if (stream == NULL) return ResFAIL;
401 401
402 b = TractFirst(&tract, arena); 402 b = TractFirst(&tract, arena);
@@ -481,7 +481,7 @@ Res ControlDescribe(Arena arena, mps_lib_FILE *stream)
481{ 481{
482 Res res; 482 Res res;
483 483
484 if (!CHECKT(Arena, arena)) return ResFAIL; 484 if (!TESTT(Arena, arena)) return ResFAIL;
485 if (stream == NULL) return ResFAIL; 485 if (stream == NULL) return ResFAIL;
486 486
487 res = PoolDescribe(ArenaControlPool(arena), stream); 487 res = PoolDescribe(ArenaControlPool(arena), stream);
diff --git a/mps/code/arenacl.c b/mps/code/arenacl.c
index 5d59abb9827..2238dddb4f6 100644
--- a/mps/code/arenacl.c
+++ b/mps/code/arenacl.c
@@ -406,7 +406,7 @@ static Res ClientAlloc(Addr *baseReturn, Tract *baseTractReturn,
406static void ClientFree(Addr base, Size size, Pool pool) 406static void ClientFree(Addr base, Size size, Pool pool)
407{ 407{
408 Arena arena; 408 Arena arena;
409 Chunk chunk; 409 Chunk chunk = NULL; /* suppress "may be used uninitialized" */
410 Size pages; 410 Size pages;
411 ClientArena clientArena; 411 ClientArena clientArena;
412 Index pi, baseIndex, limitIndex; 412 Index pi, baseIndex, limitIndex;
diff --git a/mps/code/arenavm.c b/mps/code/arenavm.c
index 81caf8bead5..0f6f3ab47b2 100644
--- a/mps/code/arenavm.c
+++ b/mps/code/arenavm.c
@@ -202,10 +202,10 @@ static Res VMArenaDescribe(Arena arena, mps_lib_FILE *stream)
202 VMArena vmArena; 202 VMArena vmArena;
203 Index gen; 203 Index gen;
204 204
205 if (!CHECKT(Arena, arena)) return ResFAIL; 205 if (!TESTT(Arena, arena)) return ResFAIL;
206 if (stream == NULL) return ResFAIL; 206 if (stream == NULL) return ResFAIL;
207 vmArena = Arena2VMArena(arena); 207 vmArena = Arena2VMArena(arena);
208 if (!CHECKT(VMArena, vmArena)) return ResFAIL; 208 if (!TESTT(VMArena, vmArena)) return ResFAIL;
209 209
210 /* Describe the superclass fields first via next-method call */ 210 /* Describe the superclass fields first via next-method call */
211 /* ...but the next method is ArenaTrivDescribe, so don't call it; 211 /* ...but the next method is ArenaTrivDescribe, so don't call it;
@@ -1584,7 +1584,7 @@ static void VMFree(Addr base, Size size, Pool pool)
1584 Arena arena; 1584 Arena arena;
1585 VMArena vmArena; 1585 VMArena vmArena;
1586 VMChunk vmChunk; 1586 VMChunk vmChunk;
1587 Chunk chunk; 1587 Chunk chunk = NULL; /* suppress "may be used uninitialized" */
1588 Count pages; 1588 Count pages;
1589 Index pi, piBase, piLimit; 1589 Index pi, piBase, piLimit;
1590 Index pageTableBase; 1590 Index pageTableBase;
diff --git a/mps/code/buffer.c b/mps/code/buffer.c
index d8346c49e9c..c7dc6edd82e 100644
--- a/mps/code/buffer.c
+++ b/mps/code/buffer.c
@@ -149,7 +149,7 @@ Res BufferDescribe(Buffer buffer, mps_lib_FILE *stream)
149 Res res; 149 Res res;
150 char abzMode[5]; 150 char abzMode[5];
151 151
152 if (!CHECKT(Buffer, buffer)) return ResFAIL; 152 if (!TESTT(Buffer, buffer)) return ResFAIL;
153 if (stream == NULL) return ResFAIL; 153 if (stream == NULL) return ResFAIL;
154 154
155 abzMode[0] = (char)( (buffer->mode & BufferModeTRANSITION) ? 't' : '_' ); 155 abzMode[0] = (char)( (buffer->mode & BufferModeTRANSITION) ? 't' : '_' );
@@ -1185,7 +1185,7 @@ static void bufferNoReassignSeg (Buffer buffer, Seg seg)
1185 1185
1186static Res bufferTrivDescribe(Buffer buffer, mps_lib_FILE *stream) 1186static Res bufferTrivDescribe(Buffer buffer, mps_lib_FILE *stream)
1187{ 1187{
1188 if (!CHECKT(Buffer, buffer)) return ResFAIL; 1188 if (!TESTT(Buffer, buffer)) return ResFAIL;
1189 if (stream == NULL) return ResFAIL; 1189 if (stream == NULL) return ResFAIL;
1190 /* dispatching function does it all */ 1190 /* dispatching function does it all */
1191 return ResOK; 1191 return ResOK;
@@ -1330,7 +1330,7 @@ static void segBufAttach(Buffer buffer, Addr base, Addr limit,
1330 Addr init, Size size) 1330 Addr init, Size size)
1331{ 1331{
1332 SegBuf segbuf; 1332 SegBuf segbuf;
1333 Seg seg; 1333 Seg seg = NULL; /* suppress "may be used uninitialized" */
1334 Arena arena; 1334 Arena arena;
1335 Bool found; 1335 Bool found;
1336 1336
@@ -1444,10 +1444,10 @@ static Res segBufDescribe(Buffer buffer, mps_lib_FILE *stream)
1444 BufferClass super; 1444 BufferClass super;
1445 Res res; 1445 Res res;
1446 1446
1447 if (!CHECKT(Buffer, buffer)) return ResFAIL; 1447 if (!TESTT(Buffer, buffer)) return ResFAIL;
1448 if (stream == NULL) return ResFAIL; 1448 if (stream == NULL) return ResFAIL;
1449 segbuf = BufferSegBuf(buffer); 1449 segbuf = BufferSegBuf(buffer);
1450 if (!CHECKT(SegBuf, segbuf)) return ResFAIL; 1450 if (!TESTT(SegBuf, segbuf)) return ResFAIL;
1451 1451
1452 /* Describe the superclass fields first via next-method call */ 1452 /* Describe the superclass fields first via next-method call */
1453 super = BUFFER_SUPERCLASS(SegBufClass); 1453 super = BUFFER_SUPERCLASS(SegBufClass);
diff --git a/mps/code/cbs.c b/mps/code/cbs.c
index e3f5204e03e..c2cda567b7f 100644
--- a/mps/code/cbs.c
+++ b/mps/code/cbs.c
@@ -1561,7 +1561,7 @@ Bool CBSFindLargest(Addr *baseReturn, Addr *limitReturn,
1561 notEmpty = SplayRoot(&root, splayTreeOfCBS(cbs)); 1561 notEmpty = SplayRoot(&root, splayTreeOfCBS(cbs));
1562 if (notEmpty) { 1562 if (notEmpty) {
1563 CBSBlock block; 1563 CBSBlock block;
1564 SplayNode node; 1564 SplayNode node = NULL; /* suppress "may be used uninitialized" */
1565 1565
1566 size = cbsBlockOfSplayNode(root)->maxSize; 1566 size = cbsBlockOfSplayNode(root)->maxSize;
1567 METER_ACC(cbs->splaySearch, cbs->splayTreeSize); 1567 METER_ACC(cbs->splaySearch, cbs->splayTreeSize);
@@ -1627,7 +1627,7 @@ Res CBSDescribe(CBS cbs, mps_lib_FILE *stream)
1627{ 1627{
1628 Res res; 1628 Res res;
1629 1629
1630 if (!CHECKT(CBS, cbs)) return ResFAIL; 1630 if (!TESTT(CBS, cbs)) return ResFAIL;
1631 if (stream == NULL) return ResFAIL; 1631 if (stream == NULL) return ResFAIL;
1632 1632
1633 res = WriteF(stream, 1633 res = WriteF(stream,
diff --git a/mps/code/check.h b/mps/code/check.h
index e58a9d04ced..5b99ea2dca8 100644
--- a/mps/code/check.h
+++ b/mps/code/check.h
@@ -17,6 +17,18 @@
17 * will throw the code away, but check its syntax. 17 * will throw the code away, but check its syntax.
18 * 18 *
19 * .trans.level-check: CheckLevel itself is not checked anywhere. 19 * .trans.level-check: CheckLevel itself is not checked anywhere.
20 *
21 * .careful: BE CAREFUL when changing this file. It is easy to make mistakes
22 * and change the checking level in a variety and thereby its performance
23 * without realising it. This has happened before. Eyeball the preprocessor
24 * output for each variety. For example:
25 *
26 * cc -E -DCONFIG_VAR_RASH trace.c
27 * cc -E -DCONFIG_VAR_HOT trace.c
28 * cc -E -DCONFIG_VAR_COOL trace.c
29 *
30 * Then look at TraceCheck to make sure checking is right, TraceAddWhite
31 * for general assertions, and TraceFix for the critical path assertions.
20 */ 32 */
21 33
22#ifndef check_h 34#ifndef check_h
@@ -27,9 +39,56 @@
27#include "mpslib.h" 39#include "mpslib.h"
28 40
29 41
30/* CheckLevel -- Control check method behaviour */ 42/* ASSERT -- basic assertion
43 *
44 * The ASSERT macro is equivalent to the ISO C assert() except that it is
45 * always defined, and uses the assertion handler from the MPS plinth, which
46 * can be replaced by the client code.
47 *
48 * It is not intended for direct use within the MPS. Use AVER and CHECK
49 * macros, which can be controlled by both build and run-time configuration.
50 */
31 51
32extern unsigned CheckLevel; 52#define ASSERT(cond, condstring) \
53 BEGIN \
54 if (cond) NOOP; else \
55 mps_lib_assert_fail(condstring "\n" __FILE__ "\n" STR(__LINE__)); \
56 END
57
58#define ASSERT_TYPECHECK(type, val) \
59 ASSERT(type ## Check(val), "TypeCheck " #type ": " #val)
60
61#define ASSERT_NULLCHECK(type, val) \
62 ASSERT((val) != NULL, "NullCheck " #type ": " #val)
63
64
65/* CheckLevel -- control for check method behaviour
66 *
67 * When the MPS is build with AVER_AND_CHECK_ALL (in a "cool" variety) the
68 * static variable CheckLevel controls the frequency and detail of
69 * consistency checking on structures.
70 *
71 * By default, CHECKLEVEL is defined to a static value in config.h, though
72 * it can be overridden on the compiler command line, e.g.
73 * cc -DCHECKLEVEL=CheckLevelSHALLOW ...
74 *
75 * However, if CHECKLEVEL_DYNAMIC is defined we use a variable to control
76 * the level of checking. The run-time overhead for this is quite high
77 * (observed double run-time on amcss when the variable is set to SHALLOW).
78 * CHECKLEVEL_DYNAMIC should be set to the initial level for the variable,
79 * which is in mpm.c.
80 *
81 * In general, it's better to adjust the check level by defining CHECKLEVEL
82 * but this is intended to meet the case where a run-time adjustable
83 * checking level is required -- where recompilation or relinking is
84 * undesirable or impossible.
85 *
86 * TODO: Should also allow the check level variable to come from an
87 * environment variable.
88 *
89 * TODO: CheckLevelDEEP asserts on arena creation with bootstrapping
90 * problems. It clearly hasn't been tried for a while. RB 2012-09-01
91 */
33 92
34enum { 93enum {
35 CheckLevelMINIMAL = 0, /* local sig check only */ 94 CheckLevelMINIMAL = 0, /* local sig check only */
@@ -40,225 +99,222 @@ enum {
40 /* and recursive down full type checks */ 99 /* and recursive down full type checks */
41}; 100};
42 101
102#ifdef CHECKLEVEL_DYNAMIC
103extern unsigned CheckLevel;
104#undef CHECKLEVEL
105#define CHECKLEVEL CheckLevel
106#endif
107
43 108
44/* AVER, AVERT -- MPM assertions 109/* AVER, AVERT -- MPM assertions
45 * 110 *
46 * AVER and AVERT are used to assert conditions in the code. 111 * AVER and AVERT are used to assert conditions in the code. AVER checks
112 * an expression. AVERT checks that a value is of the correct type and
113 * may perform consistency checks on the value.
114 *
115 * AVER and AVERT are on by default, and check conditions even in "hot"
116 * varieties intended to work in production. To avoid the cost of a check
117 * in critical parts of the code, use AVER_CRITICAL and AVERT_CRITICAL,
118 * but only when you've *proved* that this makes a difference to performance
119 * that affects requirements.
47 */ 120 */
48 121
49#if defined(AVER_AND_CHECK_NONE) 122#if defined(AVER_AND_CHECK_NONE)
50 123
51#define AVER(cond) DISCARD(cond) 124#define AVER(cond) DISCARD(cond)
52#define AVERT(type, val) DISCARD(type ## Check(val)) 125#define AVERT(type, val) DISCARD(type ## Check(val))
53#define AVER_CRITICAL(cond) DISCARD(cond)
54#define AVERT_CRITICAL(type, val) DISCARD(type ## Check(val))
55 126
56#elif defined(AVER_AND_CHECK) 127#else
57 128
58#define AVER(cond) ASSERT(cond, #cond) 129#define AVER(cond) ASSERT(cond, #cond)
59#define AVERT(type, val) ASSERT(type ## Check(val), \ 130#define AVERT(type, val) \
60 "TypeCheck " #type ": " #val) 131 ASSERT(type ## Check(val), "TypeCheck " #type ": " #val)
132
133#endif
134
135#if defined(AVER_AND_CHECK_ALL)
136
61#define AVER_CRITICAL(cond) \ 137#define AVER_CRITICAL(cond) \
62 BEGIN \ 138 BEGIN \
63 if (CheckLevel != CheckLevelMINIMAL) ASSERT(cond, #cond); \ 139 ASSERT(cond, #cond); \
64 END 140 END
141
65#define AVERT_CRITICAL(type, val) \ 142#define AVERT_CRITICAL(type, val) \
66 BEGIN \ 143 BEGIN \
67 if (CheckLevel != CheckLevelMINIMAL) \ 144 ASSERT(type ## Check(val), "TypeCheck " #type ": " #val); \
68 ASSERT(type ## Check(val), "TypeCheck " #type ": " #val); \
69 END 145 END
70 146
71#else 147#else
72 148
73#error "No checking defined." 149#define AVER_CRITICAL DISCARD
150#define AVERT_CRITICAL(type, val) DISCARD(type ## Check(val))
74 151
75#endif 152#endif
76 153
77 154
78/* internals for actually asserting */ 155/* NOTREACHED -- control should never reach this statement
79 156 *
80#define ASSERT(cond, condstring) \ 157 * This is a sort of AVER; it is equivalent to AVER(FALSE), but will produce
81 BEGIN \ 158 * a more informative message.
82 if (cond) NOOP; else \ 159 */
83 mps_lib_assert_fail(condstring "\n" __FILE__ "\n" STR(__LINE__)); \
84 END
85 160
161#if defined(AVER_AND_CHECK_NONE)
86 162
87/* NOTREACHED -- control should never reach this statement */ 163#define NOTREACHED NOOP
88/* This is a sort of AVER; it is equivalent to AVER(FALSE). */
89 164
90#if defined(AVER_AND_CHECK) 165#else
91 166
92#define NOTREACHED \ 167#define NOTREACHED \
93 BEGIN \ 168 BEGIN \
94 mps_lib_assert_fail("unreachable code" "\n" __FILE__ "\n" STR(__LINE__)); \ 169 mps_lib_assert_fail("unreachable code" "\n" __FILE__ "\n" STR(__LINE__)); \
95 END 170 END
96 171
97#else
98
99#define NOTREACHED NOOP
100
101#endif 172#endif
102 173
103 174
104/* CHECKT -- check type simply 175/* TESTT -- check type simply
105 * 176 *
106 * Must be thread safe. See <design/interface-c/#thread-safety> 177 * Must be thread safe. See <design/interface-c/#thread-safety>
107 * and <design/interface-c/#check.space>. 178 * and <design/interface-c/#check.space>.
108 *
109 * @@@@ This is a test, not a CHECK macro -- it does not assert.
110 * It should be renamed TESTSIG. RHSK 2006-12-13.
111 */ 179 */
112 180
113#define CHECKT(type, val) ((val) != NULL && (val)->sig == type ## Sig) 181#define TESTT(type, val) ((val) != NULL && (val)->sig == type ## Sig)
114
115
116#if defined(AVER_AND_CHECK_NONE)
117 182
118 183
119#define CHECKS(type, val) DISCARD(CHECKT(type, val)) 184/* CHECKS -- Check Signature
120#define CHECKL(cond) DISCARD(cond) 185 *
121#define CHECKD(type, val) DISCARD(CHECKT(type, val)) 186 * (if CHECKLEVEL == CheckLevelMINIMAL, this is all we check)
122#define CHECKD_NOSIG(type, val) DISCARD((val) != NULL) 187 */
123#define CHECKU(type, val) DISCARD(CHECKT(type, val))
124#define CHECKU_NOSIG(type, val) DISCARD((val) != NULL)
125
126 188
189#if defined(AVER_AND_CHECK_NONE)
190#define CHECKS(type, val) DISCARD(TESTT(type, val))
127#else 191#else
192#define CHECKS(type, val) \
193 ASSERT(TESTT(type, val), "SigCheck " #type ": " #val)
194#endif
128 195
129 196
130/* CHECKS -- Check Signature */ 197/* CHECKL, CHECKD, CHECKU -- local, "down", and "up" checks
131/* (if CheckLevel == CheckLevelMINIMAL, this is all we check) */ 198 *
132 199 * Each type should have a function defined called <type>Check that checks
133#define CHECKS(type, val) ASSERT(CHECKT(type, val), \ 200 * the consistency of the type. This function should return TRUE iff the
134 "SigCheck " #type ": " #val) 201 * value passes consistency checks. In general, it should assert otherwise,
135 202 * but we allow for the possibility of returning FALSE in this case for
136 203 * configuration adaptability.
137/* CHECKL -- Check Local Invariant 204 *
205 * For structure types, the check function should:
206 *
207 * - check its own signature with CHECKS
208 *
209 * - check fields that it "owns" with CHECKL, like asserts
210 *
211 * - check "down" values which are its "children" with CHEKCD
138 * 212 *
139 * Could make this an expression using ?: 213 * - check "up" values which are its "parents" with CHECKU.
214 *
215 * These various checks will be compiled out or compiled to be controlled
216 * by CHECKLEVEL.
217 *
218 * For example:
219 *
220 * Bool MessageCheck(Message message)
221 * {
222 * CHECKS(Message, message);
223 * CHECKU(Arena, message->arena);
224 * CHECKD(MessageClass, message->class);
225 * CHECKL(RingCheck(&message->queueRing));
226 * CHECKL(MessageIsClocked(message) || (message->postedClock == 0));
227 * return TRUE;
228 * }
229 *
230 * The parent/child distinction depends on the structure, but in the MPS
231 * the Arena has no parents, and has children which are Pools, which have
232 * children which are Segments, etc.
233 *
234 * The important thing is to have a partial order on types so that recursive
235 * checking will terminate. When CHECKLEVEL is set to DEEP, checking will
236 * recurse into check methods for children, but will only do a shallow
237 * signature check on parents, avoiding infinite regression.
140 */ 238 */
141 239
142#define CHECKL(cond) \ 240#if defined(AVER_AND_CHECK_ALL)
143 BEGIN \
144 switch(CheckLevel) { \
145 case CheckLevelMINIMAL: \
146 NOOP; \
147 break; \
148 case CheckLevelSHALLOW: \
149 case CheckLevelDEEP: \
150 ASSERT(cond, #cond); \
151 break; \
152 } \
153 END
154
155 241
156/* CHECKD -- Check Down */ 242#define CHECK_BY_LEVEL(minimal, shallow, deep) \
157
158#define CHECKD(type, val) \
159 BEGIN \ 243 BEGIN \
160 switch(CheckLevel) { \ 244 switch (CHECKLEVEL) { \
161 case CheckLevelMINIMAL: \ 245 case CheckLevelDEEP: deep; break; \
162 NOOP; \ 246 case CheckLevelSHALLOW: shallow; break; \
163 break; \ 247 default: NOTREACHED; /* fall through */ \
164 case CheckLevelSHALLOW: \ 248 case CheckLevelMINIMAL: minimal; break; \
165 ASSERT(CHECKT(type, val), \
166 "SigCheck " #type ": " #val); \
167 break; \
168 case CheckLevelDEEP: \
169 ASSERT(type ## Check(val), \
170 "TypeCheck " #type ": " #val); \
171 break; \
172 } \ 249 } \
173 END 250 END
174 251
252#define CHECKL(cond) \
253 CHECK_BY_LEVEL(NOOP, \
254 ASSERT(cond, #cond), \
255 ASSERT(cond, #cond))
175 256
176/* CHECKD_NOSIG -- Check Down for a type with no signature */ 257#define CHECKD(type, val) \
258 CHECK_BY_LEVEL(NOOP, \
259 CHECKS(type, val), \
260 ASSERT_TYPECHECK(type, val))
177 261
178#define CHECKD_NOSIG(type, val) \ 262#define CHECKD_NOSIG(type, val) \
179 BEGIN \ 263 CHECK_BY_LEVEL(NOOP, \
180 switch(CheckLevel) { \ 264 ASSERT_NULLCHECK(type, val), \
181 case CheckLevelMINIMAL: \ 265 ASSERT_TYPECHECK(type, val))
182 NOOP; \
183 break; \
184 case CheckLevelSHALLOW: \
185 ASSERT((val) != NULL, \
186 "NullCheck " #type ": " #val); \
187 break; \
188 case CheckLevelDEEP: \
189 ASSERT(type ## Check(val), \
190 "TypeCheck " #type ": " #val); \
191 break; \
192 } \
193 END
194
195
196/* CHECKU -- Check Up */
197 266
198#define CHECKU(type, val) \ 267#define CHECKU(type, val) \
199 BEGIN \ 268 CHECK_BY_LEVEL(NOOP, \
200 switch(CheckLevel) { \ 269 CHECKS(type, val), \
201 case CheckLevelMINIMAL: \ 270 CHECKS(type, val))
202 NOOP; \
203 break; \
204 case CheckLevelSHALLOW: \
205 case CheckLevelDEEP: \
206 ASSERT(CHECKT(type, val), \
207 "SigCheck " #type ": " #val); \
208 break; \
209 } \
210 END
211 271
272#define CHECKU_NOSIG(type, val) \
273 CHECK_BY_LEVEL(NOOP, \
274 ASSERT_NULLCHECK(type, val), \
275 ASSERT_NULLCHECK(type, val))
212 276
213/* CHECKU_NOSIG -- Check Up for a type with no signature */ 277#else /* AVER_AND_CHECK_ALL, not */
214 278
215#define CHECKU_NOSIG(type, val) \ 279/* TODO: This gives comparable performance to white-hot when compiling
216 BEGIN \ 280 using mps.c and -O2 (to get check methods inlined), but is it a bit
217 switch(CheckLevel) { \ 281 too minimal? How much do we rely on check methods? */
218 case CheckLevelMINIMAL: \
219 NOOP; \
220 break; \
221 case CheckLevelSHALLOW: \
222 case CheckLevelDEEP: \
223 ASSERT((val) != NULL, \
224 "NullCheck " #type ": " #val); \
225 break; \
226 } \
227 END
228 282
283#define CHECKL(cond) DISCARD(cond)
284#define CHECKD(type, val) DISCARD(TESTT(type, val))
285#define CHECKD_NOSIG(type, val) DISCARD((val) != NULL)
286#define CHECKU(type, val) DISCARD(TESTT(type, val))
287#define CHECKU_NOSIG(type, val) DISCARD((val) != NULL)
229 288
230#endif 289#endif /* AVER_AND_CHECK_ALL */
231 290
232 291
233/* CHECKLVALUE &c -- type compatibility checking 292/* COMPAT* -- type compatibility checking
234 * 293 *
235 * .check.macros: The CHECK* macros use some C trickery to attempt to 294 * .check.macros: The COMPAT* macros use some C trickery to attempt to
236 * verify that certain types and fields are equivalent. They do not 295 * verify that certain types and fields are equivalent. They do not
237 * do a complete job. This trickery is justified by the security gained 296 * do a complete job. This trickery is justified by the security gained
238 * in knowing that <code/mps.h> matches the MPM. See also 297 * in knowing that <code/mps.h> matches the MPM. See also
239 * mail.richard.1996-08-07.09-49. [This paragraph is intended to 298 * mail.richard.1996-08-07.09-49. [This paragraph is intended to
240 * satisfy rule.impl.trick.] 299 * satisfy rule.impl.trick.]
241 *
242 * @@@@ These are tests, not CHECK macros -- they do not assert.
243 * They should be renamed TESTTYPE etc. RHSK 2006-12-13.
244 */ 300 */
245 301
246/* compile-time check */ 302/* compile-time check */
247#define CHECKLVALUE(lv1, lv2) \ 303#define COMPATLVALUE(lv1, lv2) \
248 ((void)sizeof((lv1) = (lv2)), (void)sizeof((lv2) = (lv1)), TRUE) 304 ((void)sizeof((lv1) = (lv2)), (void)sizeof((lv2) = (lv1)), TRUE)
249 305
250/* aims to test whether t1 and t2 are assignment-compatible */ 306/* aims to test whether t1 and t2 are assignment-compatible */
251#define CHECKTYPE(t1, t2) \ 307#define COMPATTYPE(t1, t2) \
252 (sizeof(t1) == sizeof(t2) && \ 308 (sizeof(t1) == sizeof(t2) && \
253 CHECKLVALUE(*((t1 *)0), *((t2 *)0))) 309 COMPATLVALUE(*((t1 *)0), *((t2 *)0)))
254 310
255#define CHECKFIELDAPPROX(s1, f1, s2, f2) \ 311#define COMPATFIELDAPPROX(s1, f1, s2, f2) \
256 (sizeof(((s1 *)0)->f1) == sizeof(((s2 *)0)->f2) && \ 312 (sizeof(((s1 *)0)->f1) == sizeof(((s2 *)0)->f2) && \
257 offsetof(s1, f1) == offsetof(s2, f2)) 313 offsetof(s1, f1) == offsetof(s2, f2))
258 314
259#define CHECKFIELD(s1, f1, s2, f2) \ 315#define COMPATFIELD(s1, f1, s2, f2) \
260 (CHECKFIELDAPPROX(s1, f1, s2, f2) && \ 316 (COMPATFIELDAPPROX(s1, f1, s2, f2) && \
261 CHECKLVALUE(((s1 *)0)->f1, ((s2 *)0)->f2)) 317 COMPATLVALUE(((s1 *)0)->f1, ((s2 *)0)->f2))
262 318
263 319
264#endif /* check_h */ 320#endif /* check_h */
diff --git a/mps/code/comm.gmk b/mps/code/comm.gmk
index 9141c34c9cd..bdb37556c9c 100644
--- a/mps/code/comm.gmk
+++ b/mps/code/comm.gmk
@@ -16,8 +16,6 @@
16# information, and any optimization possible 16# information, and any optimization possible
17# CFLAGSOPT a list of flags for compilations with maximum 17# CFLAGSOPT a list of flags for compilations with maximum
18# optimization, and any debug info possible 18# optimization, and any debug info possible
19# CFLAGSOPTNODEBUG a list of flags for compilations with maximum
20# optimization, and absolutely no debug info
21# CC the command for the C compiler 19# CC the command for the C compiler
22# LINKFLAGS a list of flags passed to the linker 20# LINKFLAGS a list of flags passed to the linker
23# ARFLAGSPFM platform-specific flags for ar 21# ARFLAGSPFM platform-specific flags for ar
@@ -32,7 +30,6 @@
32# MPMPF platform-dependent C sources for the "mpm" part 30# MPMPF platform-dependent C sources for the "mpm" part
33# MPMS assembler sources for the "mpm" part (.s files) 31# MPMS assembler sources for the "mpm" part (.s files)
34# MPMPS pre-processor assembler sources for the "mpm" part (.S files) 32# MPMPS pre-processor assembler sources for the "mpm" part (.S files)
35# SWPF platform-dependent C sources for the "sw" part
36# 33#
37# %%PART: Add a new parameter above for the files included in the part. 34# %%PART: Add a new parameter above for the files included in the part.
38# 35#
@@ -64,9 +61,6 @@ endif
64ifndef CFLAGSOPT 61ifndef CFLAGSOPT
65error "comm.gmk: CFLAGSOPT not defined" 62error "comm.gmk: CFLAGSOPT not defined"
66endif 63endif
67ifndef CFLAGSOPTNODEBUG
68error "comm.gmk: CFLAGSOPTNODEBUG not defined"
69endif
70 64
71# 65#
72# %%PART: Add checks for the parameter with the sources for the new 66# %%PART: Add checks for the parameter with the sources for the new
@@ -94,69 +88,34 @@ endif
94 88
95# C FLAGS 89# C FLAGS
96 90
97# Some flags depend on the target. Alas.
98ifdef TARGET
99ifeq ($(TARGET),mmsw.a)
100CFLAGSTARGET = -DCONFIG_PROD_EPCORE
101else
102ifeq ($(TARGET),replaysw)
103CFLAGSTARGET = -DCONFIG_PROD_EPCORE
104else
105ifeq ($(TARGET),mmdw.a)
106CFLAGSTARGET = -DCONFIG_PROD_DYLAN
107else
108ifeq ($(TARGET),replay)
109CFLAGSTARGET = -DCONFIG_PROD_DYLAN
110else
111CFLAGSTARGET = -DCONFIG_PROD_MPS
112endif
113endif
114endif
115endif
116endif
117
118# These flags are included in all compilations. 91# These flags are included in all compilations.
119CFLAGSCOMMON = $(PFMDEFS) $(CFLAGSTARGET) $(CFLAGSCOMPILER) 92# Avoid using PFMDEFS in platform makefiles, as they prevent the MPS being
93# built with a simple command like "cc -c mps.c".
94CFLAGSCOMMON = $(PFMDEFS) $(CFLAGSCOMPILER)
120 95
121# %%VARIETY: Define a macro containing the set of flags for the new 96# %%VARIETY: Define a macro containing the set of flags for the new
122# variety. 97# variety.
123 98
124# These flags are added to compilations for the indicated variety. 99# These flags are added to compilations for the indicated variety.
125CFWE = -DCONFIG_VAR_WE -DNDEBUG $(CFLAGSOPTNODEBUG) 100CFRASH = -DCONFIG_VAR_RASH -DNDEBUG $(CFLAGSOPT)
126CFWI = -DCONFIG_VAR_WI -DNDEBUG $(CFLAGSOPT) 101CFHOT = -DCONFIG_VAR_HOT -DNDEBUG $(CFLAGSOPT)
127CFHE = -DCONFIG_VAR_HE -DNDEBUG $(CFLAGSOPTNODEBUG) 102CFDIAG = -DCONFIG_VAR_DIAG -DNDEBUG $(CFLAGSOPT)
128CFHI = -DCONFIG_VAR_HI -DNDEBUG $(CFLAGSOPT) 103CFCOOL = -DCONFIG_VAR_COOL $(CFLAGSDEBUG)
129CFDI = -DCONFIG_VAR_DI -DNDEBUG $(CFLAGSOPT) 104CFTI = -DCONFIG_VAR_TI $(CFLAGSDEBUG)
130CFII = -DCONFIG_VAR_II -DNDEBUG $(CFLAGSOPT)
131CFCE = -DCONFIG_VAR_CE $(CFLAGSOPTNODEBUG)
132CFCI = -DCONFIG_VAR_CI $(CFLAGSDEBUG)
133CFTI = -DCONFIG_VAR_TI $(CFLAGSDEBUG)
134 105
135# Bind CFLAGS to the appropriate set of flags for the variety. 106# Bind CFLAGS to the appropriate set of flags for the variety.
136# %%VARIETY: Add a test for the variety and set CFLAGS here. 107# %%VARIETY: Add a test for the variety and set CFLAGS here.
137ifeq ($(VARIETY),we) 108ifeq ($(VARIETY),rash)
138CFLAGS=$(CFLAGSCOMMON) $(CFWE) 109CFLAGS=$(CFLAGSCOMMON) $(CFRASH)
139else
140ifeq ($(VARIETY),wi)
141CFLAGS=$(CFLAGSCOMMON) $(CFWI)
142else
143ifeq ($(VARIETY),he)
144CFLAGS=$(CFLAGSCOMMON) $(CFHE)
145else 110else
146ifeq ($(VARIETY),hi) 111ifeq ($(VARIETY),hot)
147CFLAGS=$(CFLAGSCOMMON) $(CFHI) 112CFLAGS=$(CFLAGSCOMMON) $(CFHOT)
148else 113else
149ifeq ($(VARIETY),di) 114ifeq ($(VARIETY),diag)
150CFLAGS=$(CFLAGSCOMMON) $(CFDI) 115CFLAGS=$(CFLAGSCOMMON) $(CFDIAG)
151else 116else
152ifeq ($(VARIETY),ii) 117ifeq ($(VARIETY),cool)
153CFLAGS=$(CFLAGSCOMMON) $(CFII) 118CFLAGS=$(CFLAGSCOMMON) $(CFCOOL)
154else
155ifeq ($(VARIETY),ce)
156CFLAGS=$(CFLAGSCOMMON) $(CFCE)
157else
158ifeq ($(VARIETY),ci)
159CFLAGS=$(CFLAGSCOMMON) $(CFCI)
160else 119else
161ifeq ($(VARIETY),ti) 120ifeq ($(VARIETY),ti)
162CFLAGS=$(CFLAGSCOMMON) $(CFTI) 121CFLAGS=$(CFLAGSCOMMON) $(CFTI)
@@ -166,10 +125,6 @@ endif
166endif 125endif
167endif 126endif
168endif 127endif
169endif
170endif
171endif
172endif
173 128
174 129
175ARFLAGS=rc$(ARFLAGSPFM) 130ARFLAGS=rc$(ARFLAGSPFM)
@@ -198,16 +153,8 @@ MPMCOMMON = mpsi.c mpm.c arenavm.c arenacl.c arena.c global.c locus.c \
198 trace.c traceanc.c root.c seg.c format.c buffer.c ref.c \ 153 trace.c traceanc.c root.c seg.c format.c buffer.c ref.c \
199 bt.c ring.c shield.c ld.c event.c sac.c message.c \ 154 bt.c ring.c shield.c ld.c event.c sac.c message.c \
200 poolmrg.c poolmfs.c poolmv.c dbgpool.c dbgpooli.c \ 155 poolmrg.c poolmfs.c poolmv.c dbgpool.c dbgpooli.c \
201 boot.c meter.c splay.c cbs.c diag.c version.c 156 boot.c meter.c splay.c cbs.c diag.c
202MPM = $(MPMCOMMON) $(MPMPF) 157MPM = $(MPMCOMMON) $(MPMPF)
203SWCOMMON = mpsi.c mpm.c arenavm.c arenacl.c arena.c global.c locus.c \
204 tract.c walk.c reserv.c protocol.c pool.c poolabs.c \
205 trace.c traceanc.c root.c seg.c format.c buffer.c ref.c \
206 bt.c ring.c shield.c ld.c event.c sac.c message.c \
207 poolmrg.c poolmfs.c poolmv.c dbgpool.c dbgpooli \
208 poolams.c poolamsi.c poolmvff.c \
209 boot.c meter.c splay.c cbs.c version.c mpsioan.c
210SW = $(SWCOMMON) $(SWPF)
211 158
212 159
213# These map the source file lists onto object files and dependency files 160# These map the source file lists onto object files and dependency files
@@ -234,21 +181,6 @@ POOLNOBJ = $(POOLN:%.c=$(PFM)/$(VARIETY)/%.o)
234POOLNDEP = $(POOLN:%.c=$(PFM)/$(VARIETY)/%.d) 181POOLNDEP = $(POOLN:%.c=$(PFM)/$(VARIETY)/%.d)
235MVFFOBJ = $(MVFF:%.c=$(PFM)/$(VARIETY)/%.o) 182MVFFOBJ = $(MVFF:%.c=$(PFM)/$(VARIETY)/%.o)
236MVFFDEP = $(MVFF:%.c=$(PFM)/$(VARIETY)/%.d) 183MVFFDEP = $(MVFF:%.c=$(PFM)/$(VARIETY)/%.d)
237SWOBJ = $(SW:%.c=$(PFM)/$(VARIETY)/%.o)
238
239# The following hack for SWDEP only creates those dependencies when
240# a SW target is being built.
241ifdef TARGET
242ifeq ($(TARGET),mmsw.a)
243SWDEP = $(SW:%.c=$(PFM)/$(VARIETY)/%.d)
244else
245ifeq ($(TARGET),depend)
246SWDEP = $(SW:%.c=$(PFM)/$(VARIETY)/%.d)
247else
248SWDEP =
249endif
250endif
251endif
252 184
253TESTLIBOBJ = $(TESTLIB:%.c=$(PFM)/$(VARIETY)/%.o) 185TESTLIBOBJ = $(TESTLIB:%.c=$(PFM)/$(VARIETY)/%.o)
254TESTLIBDEP = $(TESTLIB:%.c=$(PFM)/$(VARIETY)/%.d) 186TESTLIBDEP = $(TESTLIB:%.c=$(PFM)/$(VARIETY)/%.d)
@@ -266,18 +198,16 @@ endif
266 198
267# == Pseudo-targets == 199# == Pseudo-targets ==
268 200
269# %%TARGET: Add the target to the all dependencies, if it uses the 201# %%TARGET: Add the target to the all dependencies
270# CONFIG_PROD_MPS configuration, to swall if CONFIG_PROD_EPCORE
271 202
272all: mpmss sacss amcss amcsshe amsss amssshe segsmss awlut awluthe \ 203all: mpmss sacss amcss amcsshe amsss amssshe segsmss awlut awluthe \
273 mpsicv lockcov poolncv locv qs apss \ 204 mpsicv lockcov poolncv locv qs apss \
274 finalcv finaltest arenacv bttest teletest \ 205 finalcv finaltest arenacv bttest teletest \
275 abqtest cbstest btcv mv2test messtest steptest \ 206 abqtest cbstest btcv mv2test messtest steptest \
276 walkt0 libcbt zcoll zmess \ 207 walkt0 zcoll zmess \
277 eventcnv \ 208 eventcnv \
278 mps.a mpsplan.a 209 mps.a mpsplan.a
279 210
280swall: mmsw.a replaysw
281 211
282# Runs the automatic tests that are built with CONFIG_PROD_MPS. 212# Runs the automatic tests that are built with CONFIG_PROD_MPS.
283# These tests are run overnight (see design.buildsys.overnight). 213# These tests are run overnight (see design.buildsys.overnight).
@@ -299,14 +229,13 @@ mpmss sacss amcss amcssth amcsshe amsss amssshe segsmss awlut awlutth \
299 awluthe mpsicv lockcov poolncv locv qs apss \ 229 awluthe mpsicv lockcov poolncv locv qs apss \
300 finalcv finaltest arenacv bttest teletest \ 230 finalcv finaltest arenacv bttest teletest \
301 expt825 \ 231 expt825 \
302 libcbt \
303 abqtest cbstest btcv mv2test \ 232 abqtest cbstest btcv mv2test \
304 messtest steptest \ 233 messtest steptest \
305 walkt0 \ 234 walkt0 \
306 exposet0 \ 235 exposet0 \
307 zcoll zmess \ 236 zcoll zmess \
308 eventcnv replay replaysw \ 237 eventcnv replay replaysw \
309 mps.a mmsw.a mpsplan.a mmdw.a: phony 238 mps.a mpsplan.a: phony
310ifdef VARIETY 239ifdef VARIETY
311 $(MAKE) -f $(PFM).gmk TARGET=$@ variety 240 $(MAKE) -f $(PFM).gmk TARGET=$@ variety
312else 241else
@@ -328,10 +257,8 @@ clean: phony
328ifdef TARGET 257ifdef TARGET
329ifndef VARIETY 258ifndef VARIETY
330target: phony 259target: phony
331 $(MAKE) -f $(PFM).gmk VARIETY=hi variety 260 $(MAKE) -f $(PFM).gmk VARIETY=hot variety
332 $(MAKE) -f $(PFM).gmk VARIETY=ci variety 261 $(MAKE) -f $(PFM).gmk VARIETY=cool variety
333 $(MAKE) -f $(PFM).gmk VARIETY=di variety
334 $(MAKE) -f $(PFM).gmk VARIETY=we variety
335endif 262endif
336endif 263endif
337 264
@@ -346,7 +273,39 @@ endif
346endif 273endif
347 274
348 275
349# GENUINE TARGETS 276# THE MPS LIBRARY
277#
278# The MPS library is built in two ways:
279#
280# 1. In the usual way, from a pile of object files compiled from their
281# corresponding sources.
282#
283# 2. From mps.c, which effectively concatenates all the sources, allowing
284# important global optimisation and inlining to occur.
285#
286# We mostly use the method (2), because it is fast to compile and execute.
287# But we use method (1) for some varieties to ensure correctness of
288# code (linkage errors are masked by (2)) and to maintain a correct list
289# of source files in case method (1) won't work on some future constrained
290# platform.
291#
292# %%VARIETY: Add a rule for how to build the MPS library for the variety
293
294$(PFM)/rash/mps.a: $(PFM)/rash/mps.o
295$(PFM)/hot/mps.a: $(PFM)/hot/mps.o
296
297$(PFM)/diag/mps.a: \
298 $(MPMOBJ) $(AMCOBJ) $(AMSOBJ) $(AWLOBJ) $(LOOBJ) $(SNCOBJ) \
299 $(MVFFOBJ) $(PLINTHOBJ) $(POOLNOBJ)
300$(PFM)/cool/mps.a: \
301 $(MPMOBJ) $(AMCOBJ) $(AMSOBJ) $(AWLOBJ) $(LOOBJ) $(SNCOBJ) \
302 $(MVFFOBJ) $(PLINTHOBJ) $(POOLNOBJ)
303$(PFM)/ti/mps.a: \
304 $(MPMOBJ) $(AMCOBJ) $(AMSOBJ) $(AWLOBJ) $(LOOBJ) $(SNCOBJ) \
305 $(MVFFOBJ) $(PLINTHOBJ) $(POOLNOBJ)
306
307
308# OTHER GENUINE TARGETS
350# 309#
351# Each line defines an executable or library target to be built and the 310# Each line defines an executable or library target to be built and the
352# object files it is built from. These lines add dependencies to the 311# object files it is built from. These lines add dependencies to the
@@ -357,109 +316,104 @@ endif
357ifdef VARIETY 316ifdef VARIETY
358 317
359$(PFM)/$(VARIETY)/finalcv: $(PFM)/$(VARIETY)/finalcv.o \ 318$(PFM)/$(VARIETY)/finalcv: $(PFM)/$(VARIETY)/finalcv.o \
360 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 319 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
361 320
362$(PFM)/$(VARIETY)/finaltest: $(PFM)/$(VARIETY)/finaltest.o \ 321$(PFM)/$(VARIETY)/finaltest: $(PFM)/$(VARIETY)/finaltest.o \
363 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 322 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
364 323
365$(PFM)/$(VARIETY)/expt825: $(PFM)/$(VARIETY)/expt825.o \ 324$(PFM)/$(VARIETY)/expt825: $(PFM)/$(VARIETY)/expt825.o \
366 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 325 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
367
368$(PFM)/$(VARIETY)/libcbt: $(PFM)/$(VARIETY)/libcbt.o \
369 $(PFM)/$(VARIETY)/mpslibcb.o \
370 $(PFM)/$(VARIETY)/mpsioan.o \
371 $(MPMOBJ) $(TESTLIBOBJ)
372 326
373$(PFM)/$(VARIETY)/locv: $(PFM)/$(VARIETY)/locv.o \ 327$(PFM)/$(VARIETY)/locv: $(PFM)/$(VARIETY)/locv.o \
374 $(MPMOBJ) $(PLINTHOBJ) $(LOOBJ) $(TESTLIBOBJ) 328 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
375 329
376$(PFM)/$(VARIETY)/mpmss: $(PFM)/$(VARIETY)/mpmss.o \ 330$(PFM)/$(VARIETY)/mpmss: $(PFM)/$(VARIETY)/mpmss.o \
377 $(MPMOBJ) $(PLINTHOBJ) $(MVFFOBJ) $(TESTLIBOBJ) 331 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
378 332
379$(PFM)/$(VARIETY)/apss: $(PFM)/$(VARIETY)/apss.o \ 333$(PFM)/$(VARIETY)/apss: $(PFM)/$(VARIETY)/apss.o \
380 $(MPMOBJ) $(PLINTHOBJ) $(MVFFOBJ) $(TESTLIBOBJ) 334 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
381 335
382$(PFM)/$(VARIETY)/sacss: $(PFM)/$(VARIETY)/sacss.o \ 336$(PFM)/$(VARIETY)/sacss: $(PFM)/$(VARIETY)/sacss.o \
383 $(MPMOBJ) $(PLINTHOBJ) $(MVFFOBJ) $(TESTLIBOBJ) 337 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
384 338
385$(PFM)/$(VARIETY)/bttest: $(PFM)/$(VARIETY)/bttest.o \ 339$(PFM)/$(VARIETY)/bttest: $(PFM)/$(VARIETY)/bttest.o \
386 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 340 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
387 341
388$(PFM)/$(VARIETY)/teletest: $(PFM)/$(VARIETY)/teletest.o \ 342$(PFM)/$(VARIETY)/teletest: $(PFM)/$(VARIETY)/teletest.o \
389 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 343 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
390 344
391$(PFM)/$(VARIETY)/lockcov: $(PFM)/$(VARIETY)/lockcov.o \ 345$(PFM)/$(VARIETY)/lockcov: $(PFM)/$(VARIETY)/lockcov.o \
392 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 346 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
393 347
394$(PFM)/$(VARIETY)/mpsicv: $(PFM)/$(VARIETY)/mpsicv.o \ 348$(PFM)/$(VARIETY)/mpsicv: $(PFM)/$(VARIETY)/mpsicv.o \
395 $(FMTDYTSTOBJ) $(FMTHETSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 349 $(FMTDYTSTOBJ) $(FMTHETSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
396 350
397$(PFM)/$(VARIETY)/amcss: $(PFM)/$(VARIETY)/amcss.o \ 351$(PFM)/$(VARIETY)/amcss: $(PFM)/$(VARIETY)/amcss.o \
398 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 352 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
399 353
400$(PFM)/$(VARIETY)/amcssth: $(PFM)/$(VARIETY)/amcssth.o \ 354$(PFM)/$(VARIETY)/amcssth: $(PFM)/$(VARIETY)/amcssth.o \
401 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 355 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
402 356
403$(PFM)/$(VARIETY)/amcsshe: $(PFM)/$(VARIETY)/amcsshe.o \ 357$(PFM)/$(VARIETY)/amcsshe: $(PFM)/$(VARIETY)/amcsshe.o \
404 $(FMTHETSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 358 $(FMTHETSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
405 359
406$(PFM)/$(VARIETY)/amsss: $(PFM)/$(VARIETY)/amsss.o \ 360$(PFM)/$(VARIETY)/amsss: $(PFM)/$(VARIETY)/amsss.o \
407 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMSOBJ) $(TESTLIBOBJ) 361 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
408 362
409$(PFM)/$(VARIETY)/amssshe: $(PFM)/$(VARIETY)/amssshe.o \ 363$(PFM)/$(VARIETY)/amssshe: $(PFM)/$(VARIETY)/amssshe.o \
410 $(FMTHETSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMSOBJ) $(TESTLIBOBJ) 364 $(FMTHETSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
411 365
412$(PFM)/$(VARIETY)/segsmss: $(PFM)/$(VARIETY)/segsmss.o \ 366$(PFM)/$(VARIETY)/segsmss: $(PFM)/$(VARIETY)/segsmss.o \
413 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMSOBJ) $(TESTLIBOBJ) 367 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
414 368
415$(PFM)/$(VARIETY)/awlut: $(PFM)/$(VARIETY)/awlut.o \ 369$(PFM)/$(VARIETY)/awlut: $(PFM)/$(VARIETY)/awlut.o \
416 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(LOOBJ) $(AWLOBJ) $(TESTLIBOBJ) 370 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
417 371
418$(PFM)/$(VARIETY)/awluthe: $(PFM)/$(VARIETY)/awluthe.o \ 372$(PFM)/$(VARIETY)/awluthe: $(PFM)/$(VARIETY)/awluthe.o \
419 $(FMTHETSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(LOOBJ) $(AWLOBJ) $(TESTLIBOBJ) 373 $(FMTHETSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
420 374
421$(PFM)/$(VARIETY)/awlutth: $(PFM)/$(VARIETY)/awlutth.o \ 375$(PFM)/$(VARIETY)/awlutth: $(PFM)/$(VARIETY)/awlutth.o \
422 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(LOOBJ) $(AWLOBJ) $(TESTLIBOBJ) 376 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
423 377
424$(PFM)/$(VARIETY)/poolncv: $(PFM)/$(VARIETY)/poolncv.o \ 378$(PFM)/$(VARIETY)/poolncv: $(PFM)/$(VARIETY)/poolncv.o \
425 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) $(POOLNOBJ) 379 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
426 380
427$(PFM)/$(VARIETY)/qs: $(PFM)/$(VARIETY)/qs.o \ 381$(PFM)/$(VARIETY)/qs: $(PFM)/$(VARIETY)/qs.o \
428 $(AMCOBJ) $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 382 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
429 383
430$(PFM)/$(VARIETY)/arenacv: $(PFM)/$(VARIETY)/arenacv.o \ 384$(PFM)/$(VARIETY)/arenacv: $(PFM)/$(VARIETY)/arenacv.o \
431 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 385 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
432 386
433$(PFM)/$(VARIETY)/abqtest: $(PFM)/$(VARIETY)/abqtest.o \ 387$(PFM)/$(VARIETY)/abqtest: $(PFM)/$(VARIETY)/abqtest.o \
434 $(PFM)/$(VARIETY)/abq.o $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 388 $(PFM)/$(VARIETY)/abq.o $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
435 389
436$(PFM)/$(VARIETY)/cbstest: $(PFM)/$(VARIETY)/cbstest.o \ 390$(PFM)/$(VARIETY)/cbstest: $(PFM)/$(VARIETY)/cbstest.o \
437 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 391 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
438 392
439$(PFM)/$(VARIETY)/btcv: $(PFM)/$(VARIETY)/btcv.o \ 393$(PFM)/$(VARIETY)/btcv: $(PFM)/$(VARIETY)/btcv.o \
440 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 394 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
441 395
442$(PFM)/$(VARIETY)/mv2test: $(PFM)/$(VARIETY)/mv2test.o \ 396$(PFM)/$(VARIETY)/mv2test: $(PFM)/$(VARIETY)/mv2test.o \
443 $(PFM)/$(VARIETY)/poolmv2.o $(PFM)/$(VARIETY)/abq.o \ 397 $(PFM)/$(VARIETY)/poolmv2.o $(PFM)/$(VARIETY)/abq.o \
444 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 398 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
445 399
446$(PFM)/$(VARIETY)/messtest: $(PFM)/$(VARIETY)/messtest.o \ 400$(PFM)/$(VARIETY)/messtest: $(PFM)/$(VARIETY)/messtest.o \
447 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 401 $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
448 402
449$(PFM)/$(VARIETY)/steptest: $(PFM)/$(VARIETY)/steptest.o \ 403$(PFM)/$(VARIETY)/steptest: $(PFM)/$(VARIETY)/steptest.o \
450 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 404 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
451 405
452$(PFM)/$(VARIETY)/walkt0: $(PFM)/$(VARIETY)/walkt0.o \ 406$(PFM)/$(VARIETY)/walkt0: $(PFM)/$(VARIETY)/walkt0.o \
453 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 407 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
454 408
455$(PFM)/$(VARIETY)/exposet0: $(PFM)/$(VARIETY)/exposet0.o \ 409$(PFM)/$(VARIETY)/exposet0: $(PFM)/$(VARIETY)/exposet0.o \
456 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 410 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
457 411
458$(PFM)/$(VARIETY)/zcoll: $(PFM)/$(VARIETY)/zcoll.o \ 412$(PFM)/$(VARIETY)/zcoll: $(PFM)/$(VARIETY)/zcoll.o \
459 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 413 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
460 414
461$(PFM)/$(VARIETY)/zmess: $(PFM)/$(VARIETY)/zmess.o \ 415$(PFM)/$(VARIETY)/zmess: $(PFM)/$(VARIETY)/zmess.o \
462 $(FMTDYTSTOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(TESTLIBOBJ) 416 $(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
463 417
464$(PFM)/$(VARIETY)/eventcnv: $(PFM)/$(VARIETY)/eventcnv.o \ 418$(PFM)/$(VARIETY)/eventcnv: $(PFM)/$(VARIETY)/eventcnv.o \
465 $(PFM)/$(VARIETY)/eventpro.o $(PFM)/$(VARIETY)/table.o 419 $(PFM)/$(VARIETY)/eventpro.o $(PFM)/$(VARIETY)/table.o
@@ -467,19 +421,10 @@ $(PFM)/$(VARIETY)/eventcnv: $(PFM)/$(VARIETY)/eventcnv.o \
467$(PFM)/$(VARIETY)/replay: $(PFM)/$(VARIETY)/replay.o \ 421$(PFM)/$(VARIETY)/replay: $(PFM)/$(VARIETY)/replay.o \
468 $(PFM)/$(VARIETY)/eventrep.o \ 422 $(PFM)/$(VARIETY)/eventrep.o \
469 $(PFM)/$(VARIETY)/eventpro.o $(PFM)/$(VARIETY)/table.o \ 423 $(PFM)/$(VARIETY)/eventpro.o $(PFM)/$(VARIETY)/table.o \
470 $(MPMOBJ) $(PLINTHOBJ) $(AWLOBJ) $(AMSOBJ) $(POOLNOBJ) \ 424 $(PFM)/$(VARIETY)/mps.a
471 $(AMCOBJ) $(SNCOBJ) $(MVFFOBJ)
472
473$(PFM)/$(VARIETY)/mps.a: $(MPMOBJ) $(AMCOBJ) $(SNCOBJ) $(MVFFOBJ)
474
475$(PFM)/$(VARIETY)/mmdw.a: $(MPMOBJ) $(AMCOBJ) $(LOOBJ) $(SNCOBJ) \
476 $(FMTDYOBJ) $(AWLOBJ)
477 425
478$(PFM)/$(VARIETY)/mpsplan.a: $(PLINTHOBJ) 426$(PFM)/$(VARIETY)/mpsplan.a: $(PLINTHOBJ)
479 427
480$(PFM)/$(VARIETY)/mmsw.a: \
481 $(SWOBJ)
482
483endif 428endif
484 429
485 430
@@ -498,25 +443,6 @@ test -d $(PFM)/$(VARIETY) || mkdir $(PFM)/$(VARIETY)
498$(CC) $(CFLAGS) -c -o $@ $< 443$(CC) $(CFLAGS) -c -o $@ $<
499endef 444endef
500 445
501# .force: FORCE is a dependent that can be used to force targets to be
502# built.
503.PHONY: FORCE
504# A rule with no dependents and no commands always causes update.
505# (See GNUMake doc, make.info, Node: Force Targets)
506# (ignore the bit about using FORCE as being the same as using .PHONY
507# it's not, and we make use of that, see .special.version below)
508FORCE:
509
510# .special.version: version.o has a special rule so that it is always
511# built. This rule has no commands, this has the effect of adding the
512# dependents to those specified by other rules (in this case the implicit
513# .o:.c rule below, .rule.c-to-o). The extra dependent added is the
514# FORCE dependent (defined above, .force) which causes the target to be
515# always built.
516ifdef VARIETY
517$(PFM)/$(VARIETY)/version.o: FORCE
518endif
519
520# .rule.c-to-o: 446# .rule.c-to-o:
521$(PFM)/$(VARIETY)/%.o: %.c 447$(PFM)/$(VARIETY)/%.o: %.c
522 $(run-cc) 448 $(run-cc)
@@ -544,7 +470,7 @@ $(PFM)/$(VARIETY)/%.d: %.c
544ifdef VARIETY 470ifdef VARIETY
545ifdef TARGET 471ifdef TARGET
546# %%PART: Add the dependency file macro for the new part here. 472# %%PART: Add the dependency file macro for the new part here.
547include $(MPMDEP) $(AMSDEP) $(AMCDEP) $(LODEP) $(SWDEP) \ 473include $(MPMDEP) $(AMSDEP) $(AMCDEP) $(LODEP) \
548 $(AWLDEP) $(POOLNDEP) $(TESTLIBDEP) $(FMTDYDEP) $(FMTHETSTDEP) \ 474 $(AWLDEP) $(POOLNDEP) $(TESTLIBDEP) $(FMTDYDEP) $(FMTHETSTDEP) \
549 $(PLINTHDEP) $(EVENTPROCDEP) 475 $(PLINTHDEP) $(EVENTPROCDEP)
550endif 476endif
@@ -561,14 +487,15 @@ endif
561$(PFM)/$(VARIETY)/%.a: 487$(PFM)/$(VARIETY)/%.a:
562 $(ECHO) "$(PFM): $@" 488 $(ECHO) "$(PFM): $@"
563 rm -f $@ 489 rm -f $@
564 $(AR) $(ARFLAGS) $@ $^ 490 $(CC) $(CFLAGS) -c -o $(PFM)/$(VARIETY)/version.o version.c
491 $(AR) $(ARFLAGS) $@ $^ $(PFM)/$(VARIETY)/version.o
565 $(RANLIB) $@ 492 $(RANLIB) $@
566 493
567# Executable 494# Executable
568 495
569$(PFM)/$(VARIETY)/%: 496$(PFM)/$(VARIETY)/%:
570 $(ECHO) "$(PFM): $@" 497 $(ECHO) "$(PFM): $@"
571 $(CC) $(LINKFLAGS) -o $@ $^ $(LIBS) 498 $(CC) $(CFLAGS) $(LINKFLAGS) -o $@ $^ $(LIBS)
572 499
573 500
574# C. COPYRIGHT AND LICENSE 501# C. COPYRIGHT AND LICENSE
diff --git a/mps/code/commpost.nmk b/mps/code/commpost.nmk
index 3a855d81d88..568b914b8fe 100644
--- a/mps/code/commpost.nmk
+++ b/mps/code/commpost.nmk
@@ -11,8 +11,7 @@
11# PSEUDO-TARGETS 11# PSEUDO-TARGETS
12 12
13# "all" builds all the varieties of all targets 13# "all" builds all the varieties of all targets
14# %%TARGET: Add the target to the all dependencies, if it uses the 14# %%TARGET: Add the target to the all dependencies.
15# CONFIG_PROD_MPS configuration, to swall if CONFIG_PROD_EPCORE
16 15
17all: mpmss.exe amcss.exe amsss.exe amssshe.exe segsmss.exe awlut.exe awluthe.exe\ 16all: mpmss.exe amcss.exe amsss.exe amssshe.exe segsmss.exe awlut.exe awluthe.exe\
18 mpsicv.exe lockutw3.exe lockcov.exe poolncv.exe locv.exe qs.exe apss.exe \ 17 mpsicv.exe lockutw3.exe lockcov.exe poolncv.exe locv.exe qs.exe apss.exe \
@@ -21,9 +20,7 @@ all: mpmss.exe amcss.exe amsss.exe amssshe.exe segsmss.exe awlut.exe awluthe.exe
21 abqtest.exe cbstest.exe btcv.exe mv2test.exe messtest.exe steptest.exe \ 20 abqtest.exe cbstest.exe btcv.exe mv2test.exe messtest.exe steptest.exe \
22 locbwcss.exe locusss.exe zcoll.exe zmess.exe \ 21 locbwcss.exe locusss.exe zcoll.exe zmess.exe \
23 eventcnv.exe \ 22 eventcnv.exe \
24 mps.lib mpsplan.lib 23 mps.lib
25
26swall: mmsw.lib replaysw.exe
27 24
28 25
29# Convenience targets 26# Convenience targets
@@ -40,8 +37,7 @@ mpmss.exe amcss.exe amcsshe.exe amsss.exe amssshe.exe segsmss.exe awlut.exe awlu
40 walkt0.exe locbwcss.exe locusss.exe \ 37 walkt0.exe locbwcss.exe locusss.exe \
41 exposet0.exe zcoll.exe zmess.exe \ 38 exposet0.exe zcoll.exe zmess.exe \
42 replay.exe replaysw.exe eventcnv.exe \ 39 replay.exe replaysw.exe eventcnv.exe \
43 mmdw.lib mmsw.lib mps.lib mpsplan.lib mpsplcb.lib \ 40 mps.lib:
44 mpsdy.dll:
45!IFDEF VARIETY 41!IFDEF VARIETY
46 $(MAKE) /nologo /f $(PFM).nmk TARGET=$@ variety 42 $(MAKE) /nologo /f $(PFM).nmk TARGET=$@ variety
47!ELSE 43!ELSE
@@ -50,12 +46,10 @@ mpmss.exe amcss.exe amcsshe.exe amsss.exe amssshe.exe segsmss.exe awlut.exe awlu
50 46
51# "clean" removes the directory containing the build results. 47# "clean" removes the directory containing the build results.
52# Depends on there being no file called "clean". 48# Depends on there being no file called "clean".
53# Since we can't know whether we have rmdir, try with deltree as well.
54 49
55clean: 50clean:
56 $(ECHO) $(PFM): $@ 51 $(ECHO) $(PFM): $@
57 -echo y | rmdir/s $(PFM) 52 -echo y | rmdir/s $(PFM)
58 -deltree /Y $(PFM)
59 53
60# target target 54# target target
61# %%VARIETY: Optionally, add a recursive make call for the new variety, 55# %%VARIETY: Optionally, add a recursive make call for the new variety,
@@ -66,10 +60,8 @@ clean:
66!IFDEF TARGET 60!IFDEF TARGET
67!IFNDEF VARIETY 61!IFNDEF VARIETY
68target: 62target:
69 $(MAKE) /nologo /f $(PFM).nmk VARIETY=hi variety 63 $(MAKE) /nologo /f $(PFM).nmk VARIETY=hot variety
70 $(MAKE) /nologo /f $(PFM).nmk VARIETY=ci variety 64 $(MAKE) /nologo /f $(PFM).nmk VARIETY=cool variety
71 $(MAKE) /nologo /f $(PFM).nmk VARIETY=ti variety
72 $(MAKE) /nologo /f $(PFM).nmk VARIETY=wi variety
73!ENDIF 65!ENDIF
74!ENDIF 66!ENDIF
75 67
@@ -85,13 +77,56 @@ variety: $(PFM)\$(VARIETY)\$(TARGET)
85mpsicv.cov: 77mpsicv.cov:
86 $(MAKE) /nologo /f $(PFM).nmk TARGET=$@ VARIETY=cv variety 78 $(MAKE) /nologo /f $(PFM).nmk TARGET=$@ VARIETY=cv variety
87 79
88# FORCE
89# Used to force a target to be built.
90# Depends on there being no file called "FORCE".
91FORCE:
92 80
81# THE MPS LIBRARY
82#
83# The MPS library is built in two ways:
84#
85# 1. In the usual way, from a pile of object files compiled from their
86# corresponding sources.
87#
88# 2. From mps.c, which effectively concatenates all the sources, allowing
89# important global optimisation and inlining to occur.
90#
91# We mostly use the method (2), because it is fast to compile and execute.
92# But we use method (1) for some varieties to ensure correctness of
93# code (linkage errors are masked by (2)) and to maintain a correct list
94# of source files in case method (1) won't work on some future constrained
95# platform.
96#
97# %%VARIETY: Add a rule for how to build the MPS library for the variety
93 98
94# GENUINE TARGETS 99$(PFM)\rash\mps.lib: $(PFM)\rash\mps.obj
100 $(ECHO) $@
101 $(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
102
103$(PFM)\hot\mps.lib: $(PFM)\hot\mps.obj
104 $(ECHO) $@
105 $(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
106
107$(PFM)\cool\mps.lib: \
108 $(MPMOBJ) $(AMCOBJ) $(AMSOBJ) $(AWLOBJ) $(LOOBJ) $(SNCOBJ) \
109 $(MVFFOBJ) $(PLINTHOBJ) $(POOLNOBJ)
110 $(ECHO) $@
111 cl /c $(CFLAGS) /Fd$(PFM)\$(VARIETY)\ /Fo$(PFM)\$(VARIETY)\version.o version.c
112 $(LIBMAN) $(LIBFLAGS) /OUT:$@ $** $(PFM)\$(VARIETY)\version.o
113
114$(PFM)\di\mps.lib: \
115 $(MPMOBJ) $(AMCOBJ) $(AMSOBJ) $(AWLOBJ) $(LOOBJ) $(SNCOBJ) \
116 $(MVFFOBJ) $(PLINTHOBJ) $(POOLNOBJ)
117 $(ECHO) $@
118 cl /c $(CFLAGS) /Fd$(PFM)\$(VARIETY)\ /Fo$(PFM)\$(VARIETY)\version.o version.c
119 $(LIBMAN) $(LIBFLAGS) /OUT:$@ $** $(PFM)\$(VARIETY)\version.o
120
121$(PFM)\ti\mps.lib: \
122 $(MPMOBJ) $(AMCOBJ) $(AMSOBJ) $(AWLOBJ) $(LOOBJ) $(SNCOBJ) \
123 $(MVFFOBJ) $(PLINTHOBJ) $(POOLNOBJ)
124 $(ECHO) $@
125 cl /c $(CFLAGS) /Fd$(PFM)\$(VARIETY)\ /Fo$(PFM)\$(VARIETY)\version.o version.c
126 $(LIBMAN) $(LIBFLAGS) /OUT:$@ $** $(PFM)\$(VARIETY)\version.o
127
128
129# OTHER GENUINE TARGETS
95# 130#
96# Each line defines an executable or library target to be built and the object 131# Each line defines an executable or library target to be built and the object
97# files it is build from. For an executable these lines add dependencies to 132# files it is build from. For an executable these lines add dependencies to
@@ -100,125 +135,105 @@ FORCE:
100# to build it. 135# to build it.
101# %%TARGET: Add your new target here 136# %%TARGET: Add your new target here
102 137
103
104!IFDEF VARIETY 138!IFDEF VARIETY
105 139
106# .special.version: version.obj has a special rule so that it is always
107# built. This rule has no commands, meaning that the commands from
108# other rules (the implicit .c -> .obj rule in particular) will be used.
109# (Actually, there's a MS bug that causes this to randomly fail to build.)
110$(PFM)\$(VARIETY)\version.obj: FORCE
111
112$(PFM)\$(VARIETY)\finalcv.exe: $(PFM)\$(VARIETY)\finalcv.obj \ 140$(PFM)\$(VARIETY)\finalcv.exe: $(PFM)\$(VARIETY)\finalcv.obj \
113 $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(FMTTESTOBJ) \ 141 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
114 $(MRGOBJ) $(TESTLIBOBJ)
115 142
116$(PFM)\$(VARIETY)\finaltest.exe: $(PFM)\$(VARIETY)\finaltest.obj \ 143$(PFM)\$(VARIETY)\finaltest.exe: $(PFM)\$(VARIETY)\finaltest.obj \
117 $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(FMTTESTOBJ) \ 144 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
118 $(MRGOBJ) $(TESTLIBOBJ)
119 145
120$(PFM)\$(VARIETY)\expt825.exe: $(PFM)\$(VARIETY)\expt825.obj \ 146$(PFM)\$(VARIETY)\expt825.exe: $(PFM)\$(VARIETY)\expt825.obj \
121 $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(FMTTESTOBJ) \ 147 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
122 $(MRGOBJ) $(TESTLIBOBJ)
123 148
124$(PFM)\$(VARIETY)\locv.exe: $(PFM)\$(VARIETY)\locv.obj \ 149$(PFM)\$(VARIETY)\locv.exe: $(PFM)\$(VARIETY)\locv.obj \
125 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) $(LOOBJ) 150 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
126 151
127$(PFM)\$(VARIETY)\mpmss.exe: $(PFM)\$(VARIETY)\mpmss.obj \ 152$(PFM)\$(VARIETY)\mpmss.exe: $(PFM)\$(VARIETY)\mpmss.obj \
128 $(PFM)\$(VARIETY)\poolmvff.obj \ 153 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
129 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
130 154
131$(PFM)\$(VARIETY)\apss.exe: $(PFM)\$(VARIETY)\apss.obj \ 155$(PFM)\$(VARIETY)\apss.exe: $(PFM)\$(VARIETY)\apss.obj \
132 $(PFM)\$(VARIETY)\poolmvff.obj \ 156 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
133 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
134 157
135$(PFM)\$(VARIETY)\sacss.exe: $(PFM)\$(VARIETY)\sacss.obj \ 158$(PFM)\$(VARIETY)\sacss.exe: $(PFM)\$(VARIETY)\sacss.obj \
136 $(PFM)\$(VARIETY)\poolmvff.obj \ 159 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
137 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
138 160
139$(PFM)\$(VARIETY)\bttest.exe: $(PFM)\$(VARIETY)\bttest.obj \ 161$(PFM)\$(VARIETY)\bttest.exe: $(PFM)\$(VARIETY)\bttest.obj \
140 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 162 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
141 163
142$(PFM)\$(VARIETY)\teletest.exe: $(PFM)\$(VARIETY)\teletest.obj \ 164$(PFM)\$(VARIETY)\teletest.exe: $(PFM)\$(VARIETY)\teletest.obj \
143 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 165 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
144 166
145$(PFM)\$(VARIETY)\lockcov.exe: $(PFM)\$(VARIETY)\lockcov.obj \ 167$(PFM)\$(VARIETY)\lockcov.exe: $(PFM)\$(VARIETY)\lockcov.obj \
146 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 168 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
147 169
148$(PFM)\$(VARIETY)\lockutw3.exe: $(PFM)\$(VARIETY)\lockutw3.obj \ 170$(PFM)\$(VARIETY)\lockutw3.exe: $(PFM)\$(VARIETY)\lockutw3.obj \
149 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 171 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
150 172
151$(PFM)\$(VARIETY)\mpsicv.exe: $(PFM)\$(VARIETY)\mpsicv.obj \ 173$(PFM)\$(VARIETY)\mpsicv.exe: $(PFM)\$(VARIETY)\mpsicv.obj \
152 $(MPMOBJ) $(AMCOBJ) $(PLINTHOBJ) $(FMTTESTOBJ) \ 174 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
153 $(TESTLIBOBJ)
154 175
155$(PFM)\$(VARIETY)\amcss.exe: $(PFM)\$(VARIETY)\amcss.obj \ 176$(PFM)\$(VARIETY)\amcss.exe: $(PFM)\$(VARIETY)\amcss.obj \
156 $(MPMOBJ) $(AMCOBJ) $(PLINTHOBJ) $(FMTTESTOBJ) \ 177 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
157 $(TESTLIBOBJ)
158 178
159$(PFM)\$(VARIETY)\amcsshe.exe: $(PFM)\$(VARIETY)\amcsshe.obj \ 179$(PFM)\$(VARIETY)\amcsshe.exe: $(PFM)\$(VARIETY)\amcsshe.obj \
160 $(MPMOBJ) $(AMCOBJ) $(PLINTHOBJ) $(FMTTESTOBJ) \ 180 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
161 $(TESTLIBOBJ)
162 181
163$(PFM)\$(VARIETY)\amsss.exe: $(PFM)\$(VARIETY)\amsss.obj \ 182$(PFM)\$(VARIETY)\amsss.exe: $(PFM)\$(VARIETY)\amsss.obj \
164 $(MPMOBJ) $(AMSOBJ) $(PLINTHOBJ) $(FMTTESTOBJ) \ 183 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
165 $(TESTLIBOBJ)
166 184
167$(PFM)\$(VARIETY)\amssshe.exe: $(PFM)\$(VARIETY)\amssshe.obj \ 185$(PFM)\$(VARIETY)\amssshe.exe: $(PFM)\$(VARIETY)\amssshe.obj \
168 $(MPMOBJ) $(AMSOBJ) $(PLINTHOBJ) $(FMTTESTOBJ) \ 186 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
169 $(TESTLIBOBJ)
170 187
171$(PFM)\$(VARIETY)\segsmss.exe: $(PFM)\$(VARIETY)\segsmss.obj \ 188$(PFM)\$(VARIETY)\segsmss.exe: $(PFM)\$(VARIETY)\segsmss.obj \
172 $(MPMOBJ) $(AMSOBJ) $(PLINTHOBJ) $(FMTTESTOBJ) \ 189 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
173 $(TESTLIBOBJ)
174 190
175$(PFM)\$(VARIETY)\locbwcss.exe: $(PFM)\$(VARIETY)\locbwcss.obj \ 191$(PFM)\$(VARIETY)\locbwcss.exe: $(PFM)\$(VARIETY)\locbwcss.obj \
176 $(PFM)\$(VARIETY)\poolmvff.obj \ 192 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
177 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
178 193
179$(PFM)\$(VARIETY)\locusss.exe: $(PFM)\$(VARIETY)\locusss.obj \ 194$(PFM)\$(VARIETY)\locusss.exe: $(PFM)\$(VARIETY)\locusss.obj \
180 $(PFM)\$(VARIETY)\poolmvff.obj \ 195 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
181 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ)
182 196
183$(PFM)\$(VARIETY)\dwstress.exe: $(PFM)\$(VARIETY)\dwstress.obj \ 197$(PFM)\$(VARIETY)\dwstress.exe: $(PFM)\$(VARIETY)\dwstress.obj \
184 $(DWOBJ) $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) 198 $(DWOBJ) $(PFM)\$(VARIETY)\mps.lib
185 199
186$(PFM)\$(VARIETY)\awlut.exe: $(PFM)\$(VARIETY)\awlut.obj \ 200$(PFM)\$(VARIETY)\awlut.exe: $(PFM)\$(VARIETY)\awlut.obj \
187 $(FMTTESTOBJ) \ 201 $(FMTTESTOBJ) \
188 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) $(LOOBJ) $(AWLOBJ) 202 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
189 203
190$(PFM)\$(VARIETY)\awluthe.exe: $(PFM)\$(VARIETY)\awluthe.obj \ 204$(PFM)\$(VARIETY)\awluthe.exe: $(PFM)\$(VARIETY)\awluthe.obj \
191 $(FMTTESTOBJ) \ 205 $(FMTTESTOBJ) \
192 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) $(LOOBJ) $(AWLOBJ) 206 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
193 207
194$(PFM)\$(VARIETY)\poolncv.exe: $(PFM)\$(VARIETY)\poolncv.obj \ 208$(PFM)\$(VARIETY)\poolncv.exe: $(PFM)\$(VARIETY)\poolncv.obj \
195 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) $(POOLNOBJ) 209 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
196 210
197$(PFM)\$(VARIETY)\qs.exe: $(PFM)\$(VARIETY)\qs.obj \ 211$(PFM)\$(VARIETY)\qs.exe: $(PFM)\$(VARIETY)\qs.obj \
198 $(AMCOBJ) $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 212 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
199 213
200$(PFM)\$(VARIETY)\arenacv.exe: $(PFM)\$(VARIETY)\arenacv.obj \ 214$(PFM)\$(VARIETY)\arenacv.exe: $(PFM)\$(VARIETY)\arenacv.obj \
201 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 215 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
202 216
203$(PFM)\$(VARIETY)\abqtest.exe: $(PFM)\$(VARIETY)\abqtest.obj \ 217$(PFM)\$(VARIETY)\abqtest.exe: $(PFM)\$(VARIETY)\abqtest.obj \
204 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 218 $(PFM)\$(VARIETY)\abq.obj $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
205 219
206$(PFM)\$(VARIETY)\cbstest.exe: $(PFM)\$(VARIETY)\cbstest.obj \ 220$(PFM)\$(VARIETY)\cbstest.exe: $(PFM)\$(VARIETY)\cbstest.obj \
207 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 221 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
208 222
209$(PFM)\$(VARIETY)\btcv.exe: $(PFM)\$(VARIETY)\btcv.obj \ 223$(PFM)\$(VARIETY)\btcv.exe: $(PFM)\$(VARIETY)\btcv.obj \
210 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 224 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
211 225
212$(PFM)\$(VARIETY)\mv2test.exe: $(PFM)\$(VARIETY)\mv2test.obj \ 226$(PFM)\$(VARIETY)\mv2test.exe: $(PFM)\$(VARIETY)\mv2test.obj \
213 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 227 $(PFM)\$(VARIETY)\poolmv2.obj $(PFM)\$(VARIETY)\abq.obj \
228 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
214 229
215$(PFM)\$(VARIETY)\zcoll.exe: $(PFM)\$(VARIETY)\zcoll.obj \ 230$(PFM)\$(VARIETY)\zcoll.exe: $(PFM)\$(VARIETY)\zcoll.obj \
216 $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(FMTTESTOBJ) \ 231 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) \
217 $(MRGOBJ) $(TESTLIBOBJ) 232 $(TESTLIBOBJ)
218 233
219$(PFM)\$(VARIETY)\zmess.exe: $(PFM)\$(VARIETY)\zmess.obj \ 234$(PFM)\$(VARIETY)\zmess.exe: $(PFM)\$(VARIETY)\zmess.obj \
220 $(MPMOBJ) $(PLINTHOBJ) $(AMCOBJ) $(FMTTESTOBJ) \ 235 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) \
221 $(MRGOBJ) $(TESTLIBOBJ) 236 $(TESTLIBOBJ)
222 237
223$(PFM)\$(VARIETY)\eventcnv.exe: $(PFM)\$(VARIETY)\eventcnv.obj \ 238$(PFM)\$(VARIETY)\eventcnv.exe: $(PFM)\$(VARIETY)\eventcnv.obj \
224 $(PFM)\$(VARIETY)\eventpro.obj $(PFM)\$(VARIETY)\table.obj 239 $(PFM)\$(VARIETY)\eventpro.obj $(PFM)\$(VARIETY)\table.obj
@@ -226,8 +241,7 @@ $(PFM)\$(VARIETY)\eventcnv.exe: $(PFM)\$(VARIETY)\eventcnv.obj \
226$(PFM)\$(VARIETY)\replay.exe: $(PFM)\$(VARIETY)\replay.obj \ 241$(PFM)\$(VARIETY)\replay.exe: $(PFM)\$(VARIETY)\replay.obj \
227 $(PFM)\$(VARIETY)\eventrep.obj \ 242 $(PFM)\$(VARIETY)\eventrep.obj \
228 $(PFM)\$(VARIETY)\eventpro.obj $(PFM)\$(VARIETY)\table.obj \ 243 $(PFM)\$(VARIETY)\eventpro.obj $(PFM)\$(VARIETY)\table.obj \
229 $(MPMOBJ) $(AWLOBJ) $(AMSOBJ) $(POOLNOBJ) $(AMCOBJ) $(SNCOBJ) \ 244 $(PFM)\$(VARIETY)\mps.lib
230 $(PFM)\$(VARIETY)\poolmvff.obj $(PFM)\$(VARIETY)\mpsliban.obj
231 245
232# Have to rename the object file, because the names must match, or 246# Have to rename the object file, because the names must match, or
233# the template rule for .exe.obj won't be used. 247# the template rule for .exe.obj won't be used.
@@ -235,63 +249,17 @@ $(PFM)\$(VARIETY)\replaysw.obj: $(PFM)\$(VARIETY)\replay.obj
235 $(ECHO) $@ 249 $(ECHO) $@
236 copy $** $@ >nul: 250 copy $** $@ >nul:
237 251
238$(PFM)\$(VARIETY)\replaysw.exe: $(PFM)\$(VARIETY)\replaysw.obj \
239 $(PFM)\$(VARIETY)\eventrep.obj \
240 $(PFM)\$(VARIETY)\eventpro.obj $(PFM)\$(VARIETY)\table.obj \
241 $(PFM)\$(VARIETY)\fmtpstst.obj $(TESTLIBOBJ) \
242 $(PFM)\$(VARIETY)\mpsliban.obj $(SWOBJ)
243
244$(PFM)\$(VARIETY)\messtest.exe: $(PFM)\$(VARIETY)\messtest.obj \ 252$(PFM)\$(VARIETY)\messtest.exe: $(PFM)\$(VARIETY)\messtest.obj \
245 $(MPMOBJ) $(PLINTHOBJ) $(TESTLIBOBJ) 253 $(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)
246 254
247$(PFM)\$(VARIETY)\steptest.exe: $(PFM)\$(VARIETY)\steptest.obj \ 255$(PFM)\$(VARIETY)\steptest.exe: $(PFM)\$(VARIETY)\steptest.obj \
248 $(MPMOBJ) $(AMCOBJ) $(PLINTHOBJ) $(FMTTESTOBJ) \ 256 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
249 $(TESTLIBOBJ)
250 257
251$(PFM)\$(VARIETY)\walkt0.exe: $(PFM)\$(VARIETY)\walkt0.obj \ 258$(PFM)\$(VARIETY)\walkt0.exe: $(PFM)\$(VARIETY)\walkt0.obj \
252 $(MPMOBJ) $(AMCOBJ) $(PLINTHOBJ) $(FMTTESTOBJ) \ 259 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
253 $(TESTLIBOBJ)
254 260
255$(PFM)\$(VARIETY)\exposet0.exe: $(PFM)\$(VARIETY)\exposet0.obj \ 261$(PFM)\$(VARIETY)\exposet0.exe: $(PFM)\$(VARIETY)\exposet0.obj \
256 $(MPMOBJ) $(AMCOBJ) $(PLINTHOBJ) $(FMTTESTOBJ) \ 262 $(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
257 $(TESTLIBOBJ)
258
259$(PFM)\$(VARIETY)\mmsw.lib: $(SWOBJ)
260 $(ECHO) $@
261 $(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
262
263$(PFM)\$(VARIETY)\mmdw.lib: $(MPMOBJ) $(AMCOBJ) $(DWOBJ) \
264 $(AWLOBJ) $(LOOBJ) $(SNCOBJ)
265 $(ECHO) $@
266 $(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
267
268$(PFM)\$(VARIETY)\mps.lib: $(MPMOBJ) $(AMCOBJ) $(LOOBJ) $(SNCOBJ) \
269 $(MVFFOBJ) $(AMSOBJ) $(AWLOBJ)
270 $(ECHO) $@
271 $(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
272
273# We would like to use $** in the linker command line here, but we
274# cannot because the target, mpsdy.dll, depends on the w3gen.def file,
275# but this is not to be treated as an object on the linker line. Sorry
276# about the repetition of the object list.
277$(PFM)\$(VARIETY)\mpsdy.dll: $(PFM)\$(VARIETY)\mpslibcb.obj \
278 $(MPMOBJ) $(AMCOBJ) $(LOOBJ) $(SNCOBJ) \
279 $(MVFFOBJ) $(AMSOBJ) $(AWLOBJ) w3gen.def \
280 mpslibcb.def
281 $(ECHO) $@
282 $(LINKER) $(LINKFLAGS) /def:w3gen.def \
283 /def:mpslibcb.def /dll /OUT:$@ \
284 $(PFM)\$(VARIETY)\mpslibcb.obj \
285 $(MPMOBJ) $(AMCOBJ) $(LOOBJ) $(SNCOBJ) \
286 $(MVFFOBJ) $(AMSOBJ) $(AWLOBJ)
287
288$(PFM)\$(VARIETY)\mpsplan.lib: $(PLINTHOBJ)
289 $(ECHO) $@
290 $(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
291
292$(PFM)\$(VARIETY)\mpsplcb.lib: $(PFM)\$(VARIETY)\mpslibcb.obj
293 $(ECHO) $@
294 $(LIBMAN) $(LIBFLAGS) /OUT:$@ $**
295 263
296!ENDIF 264!ENDIF
297 265
diff --git a/mps/code/commpre.nmk b/mps/code/commpre.nmk
index a27b704134c..08a3d02587d 100644
--- a/mps/code/commpre.nmk
+++ b/mps/code/commpre.nmk
@@ -24,7 +24,6 @@
24# AMS as above for the "ams" part 24# AMS as above for the "ams" part
25# LO as above for the "lo" part 25# LO as above for the "lo" part
26# MRG as above for the "mrg" part 26# MRG as above for the "mrg" part
27# SW as above for the "sw" part
28# TESTLIB as above for the "testlib" part 27# TESTLIB as above for the "testlib" part
29# NOISY if defined, causes command to be emitted 28# NOISY if defined, causes command to be emitted
30# 29#
@@ -64,9 +63,6 @@
64!IFNDEF AMS 63!IFNDEF AMS
65!ERROR commpre.nmk: AMS not defined 64!ERROR commpre.nmk: AMS not defined
66!ENDIF 65!ENDIF
67!IFNDEF SW
68!ERROR commpre.nmk: SW not defined
69!ENDIF
70!IFNDEF TESTLIB 66!IFNDEF TESTLIB
71!ERROR commpre.nmk: TESTLIB not defined 67!ERROR commpre.nmk: TESTLIB not defined
72!ENDIF 68!ENDIF
@@ -90,39 +86,12 @@ ECHO = echo
90# /ML means compile for single-threaded environment. 86# /ML means compile for single-threaded environment.
91# A 'd' at the end means compile for debugging. 87# A 'd' at the end means compile for debugging.
92 88
93!ifdef TARGET 89CFLAGSTARGETPRE =
94!if "$(TARGET)" == "mmsw.lib" || "$(TARGET)" == "epvmss.exe" || "$(TARGET)" == "replaysw.exe"
95CFLAGSTARGETPRE = /DCONFIG_PROD_EPCORE
96CFLAGSTARGETPOST =
97CRTFLAGSW = /MD
98CRTFLAGSH = /MDd
99CRTFLAGSC = /MDd
100LINKFLAGSWHITE = msvcrt.lib
101LINKFLAGSHOT = msvcrtd.lib
102LINKFLAGSCOOL = msvcrtd.lib
103
104!elseif "$(TARGET)" == "mmdw.lib"
105# /Oy- is actually 86-specific, but Dylan is only built for that platform
106CFLAGSTARGETPRE = /DCONFIG_PROD_DYLAN
107CFLAGSTARGETPOST = /Oy-
108CRTFLAGSW = /MT
109CRTFLAGSH = /MT
110CRTFLAGSC = /MT
111LINKFLAGSWHITE = libcmt.lib
112LINKFLAGSHOT = libcmt.lib
113LINKFLAGSCOOL = libcmt.lib
114
115!else
116CFLAGSTARGETPRE = /DCONFIG_PROD_MPS
117CFLAGSTARGETPOST = 90CFLAGSTARGETPOST =
118CRTFLAGSW = /MT 91CRTFLAGSHOT = /MT
119CRTFLAGSH = /MT 92CRTFLAGSCOOL = /MTd
120CRTFLAGSC = /MTd
121LINKFLAGSWHITE = libcmt.lib
122LINKFLAGSHOT = libcmt.lib 93LINKFLAGSHOT = libcmt.lib
123LINKFLAGSCOOL = libcmtd.lib 94LINKFLAGSCOOL = libcmtd.lib
124!endif
125!endif
126 95
127CFLAGSCOMMONPRE = /nologo /W4 /WX $(PFMDEFS) $(CFLAGSTARGETPRE) 96CFLAGSCOMMONPRE = /nologo /W4 /WX $(PFMDEFS) $(CFLAGSTARGETPRE)
128CFLAGSCOMMONPOST = $(CFLAGSTARGETPOST) 97CFLAGSCOMMONPOST = $(CFLAGSTARGETPOST)
@@ -144,14 +113,11 @@ CFLAGSEXTERNAL =
144 113
145# The combinations of variety 114# The combinations of variety
146# %%VARIETY: Define a macro containing the set of flags for the new variety. 115# %%VARIETY: Define a macro containing the set of flags for the new variety.
147CFWE = /DCONFIG_VAR_WE $(CRTFLAGSW) $(CFLAGSHOT) $(CFLAGSEXTERNAL) 116CFRASH = /DCONFIG_VAR_RASH $(CRTFLAGSHOT) $(CFLAGSHOT) $(CFLAGSEXTERNAL)
148CFWI = /DCONFIG_VAR_WI $(CRTFLAGSW) $(CFLAGSHOT) $(CFLAGSINTERNAL) 117CFHOT = /DCONFIG_VAR_HOT $(CRTFLAGSHOT) $(CFLAGSHOT) $(CFLAGSEXTERNAL)
149CFHE = /DCONFIG_VAR_HE $(CRTFLAGSH) $(CFLAGSHOT) $(CFLAGSEXTERNAL) 118CFDIAG = /DCONFIG_VAR_DIAG $(CRTFLAGSHOT) $(CFLAGSHOT) $(CFLAGSINTERNAL)
150CFHI = /DCONFIG_VAR_HI $(CRTFLAGSH) $(CFLAGSHOT) $(CFLAGSINTERNAL) 119CFCOOL = /DCONFIG_VAR_COOL $(CRTFLAGSCOOL) $(CFLAGSCOOL) $(CFLAGSINTERNAL)
151CFDI = /DCONFIG_VAR_DI $(CRTFLAGSH) $(CFLAGSHOT) $(CFLAGSINTERNAL) 120CFTI = /DCONFIG_VAR_TI $(CRTFLAGSCOOL) $(CFLAGSCOOL) $(CFLAGSINTERNAL)
152CFCE = /DCONFIG_VAR_CE $(CRTFLAGSC) $(CFLAGSCOOL) $(CFLAGSEXTERNAL)
153CFCI = /DCONFIG_VAR_CI $(CRTFLAGSC) $(CFLAGSCOOL) $(CFLAGSINTERNAL)
154CFTI = /DCONFIG_VAR_TI $(CRTFLAGSC) $(CFLAGSCOOL) $(CFLAGSINTERNAL)
155 121
156# Microsoft documentation is not very clear on the point of using both 122# Microsoft documentation is not very clear on the point of using both
157# optimization and debug information 123# optimization and debug information
@@ -164,14 +130,11 @@ LINKFLAGSINTERNAL = /DEBUG
164# ( Internal flags used to be set to /DEBUG:full ) 130# ( Internal flags used to be set to /DEBUG:full )
165LINKFLAGSEXTERNAL = /RELEASE 131LINKFLAGSEXTERNAL = /RELEASE
166 132
167LFWE = $(LINKFLAGSWHITE) $(LINKFLAGSEXTERNAL) 133LFRASH = $(LINKFLAGSHOT) $(LINKFLAGSEXTERNAL)
168LFWI = $(LINKFLAGSWHITE) $(LINKFLAGSINTERNAL) 134LFHOT = $(LINKFLAGSHOT) $(LINKFLAGSEXTERNAL)
169LFHE = $(LINKFLAGSHOT) $(LINKFLAGSEXTERNAL) 135LFDIAG = $(LINKFLAGSHOT) $(LINKFLAGSINTERNAL)
170LFHI = $(LINKFLAGSHOT) $(LINKFLAGSINTERNAL) 136LFCOOL = $(LINKFLAGSCOOL) $(LINKFLAGSINTERNAL)
171LFDI = $(LINKFLAGSHOT) $(LINKFLAGSINTERNAL) 137LFTI = $(LINKFLAGSCOOL) $(LINKFLAGSINTERNAL)
172LFCE = $(LINKFLAGSCOOL) $(LINKFLAGSEXTERNAL)
173LFCI = $(LINKFLAGSCOOL) $(LINKFLAGSINTERNAL)
174LFTI = $(LINKFLAGSCOOL) $(LINKFLAGSINTERNAL)
175 138
176#LFCV = /PROFILE /DEBUG:full /DEBUGTYPE:cv 139#LFCV = /PROFILE /DEBUG:full /DEBUGTYPE:cv
177 140
@@ -180,15 +143,11 @@ LFTI = $(LINKFLAGSCOOL) $(LINKFLAGSINTERNAL)
180LIBMAN = lib # can't call this LIB - it screws the environment 143LIBMAN = lib # can't call this LIB - it screws the environment
181LIBFLAGSCOMMON = /nologo 144LIBFLAGSCOMMON = /nologo
182 145
183LIBFLAGSWE = 146LIBFLAGSRASH =
184LIBFLAGSWI = 147LIBFLAGSHOT =
185LIBFLAGSHE = 148LIBFLAGSDIAG =
186LIBFLAGSHI = 149LIBFLAGSCOOL =
187LIBFLAGSDI =
188LIBFLAGSCE =
189LIBFLAGSCI =
190LIBFLAGSTI = 150LIBFLAGSTI =
191#LIBFLAGSCV =
192 151
193# Browser database manager [not used at present] 152# Browser database manager [not used at present]
194#BSC = bscmake 153#BSC = bscmake
diff --git a/mps/code/config.h b/mps/code/config.h
index acae1a481bf..2b14da1b289 100644
--- a/mps/code/config.h
+++ b/mps/code/config.h
@@ -21,39 +21,52 @@
21 21
22/* Variety Configuration */ 22/* Variety Configuration */
23 23
24/* First translate GG build directives into better ones. 24/* Then deal with CONFIG_VAR_* build directives. These are translated into
25 */ 25 the directives CONFIG_ASSERT, CONFIG_STATS, CONFIG_LOG, etc. which control
26 26 actual compilation features. */
27#ifdef CONFIG_DEBUG
28/* Translate CONFIG_DEBUG to CONFIG_STATS, because that's what it */
29/* means. It's got nothing to do with debugging! RHSK 2007-06-29 */
30#define CONFIG_STATS
31#endif
32 27
33 28/* CONFIG_VAR_RASH -- the rash and reckless variety
34/* Then deal with old-style CONFIG_VAR_* build directives. These
35 * must be translated into the new directives CONFIG_ASSERT,
36 * CONFIG_STATS, and CONFIG_LOG.
37 * 29 *
38 * One day the old build system may be converted to use the new 30 * This variety switches off as many features as possible for maximum
39 * directives. 31 * performance, but is therefore unsafe and undebuggable. It is not intended
32 * for use, but for comparison with the hot variety, to check that assertion,
33 * logging, etc. have negligible overhead.
40 */ 34 */
41 35
42#if defined(CONFIG_VAR_WI) || defined(CONFIG_VAR_WE) /* White-hot varieties */ 36#if defined(CONFIG_VAR_RASH)
43/* no asserts */ 37/* no asserts */
44/* ... so CHECKLEVEL_INITIAL is irrelevant */
45/* no statistic meters */ 38/* no statistic meters */
46/* no telemetry log events */ 39/* no telemetry log events */
47 40
48#elif defined(CONFIG_VAR_HI) || defined(CONFIG_VAR_HE) /* Hot varieties */ 41
42/* CONFIG_VAR_HOT -- the hot variety
43 *
44 * This variety is the default variety for distribution in products that use
45 * the MPS. It has maximum performance while retaining a good level of
46 * consistency checking and allowing some debugging and telemetry features.
47 */
48
49#elif defined(CONFIG_VAR_HOT)
49#define CONFIG_ASSERT 50#define CONFIG_ASSERT
50#define CHECKLEVEL_INITIAL CheckLevelMINIMAL 51#ifndef CHECKLEVEL
52#define CHECKLEVEL CheckLevelMINIMAL
53#endif
51/* no statistic meters */ 54/* no statistic meters */
52/* no telemetry log events */ 55/* no telemetry log events */
53 56
54#elif defined(CONFIG_VAR_DI) /* Diagnostic variety */ 57
58/* CONFIG_VAR_DIAG -- diagnostic variety
59 *
60 * Deprecated. The diagnostic variety prints messages about the internals
61 * of the MPS to an output stream. This is being replaced by an extended
62 * telemetry system. RB 2012-08-31
63 */
64
65#elif defined(CONFIG_VAR_DIAG) /* Diagnostic variety */
55#define CONFIG_ASSERT 66#define CONFIG_ASSERT
56#define CHECKLEVEL_INITIAL CheckLevelMINIMAL 67#ifndef CHECKLEVEL
68#define CHECKLEVEL CheckLevelMINIMAL
69#endif
57#define CONFIG_STATS 70#define CONFIG_STATS
58/* For diagnostics, choose a DIAG_WITH_... output method. 71/* For diagnostics, choose a DIAG_WITH_... output method.
59 * (We need to choose because the DIAG output system is under 72 * (We need to choose because the DIAG output system is under
@@ -63,24 +76,42 @@
63/* #define DIAG_WITH_PRINTF */ 76/* #define DIAG_WITH_PRINTF */
64/* no telemetry log events */ 77/* no telemetry log events */
65 78
66#elif defined(CONFIG_VAR_CI) || defined(CONFIG_VAR_CE) /* Cool varieties */ 79
80/* CONFIG_VAR_COOL -- cool variety
81 *
82 * The cool variety is intended for use when developing an integration with
83 * the MPS or debugging memory problems or collecting detailed telemetry
84 * data for performance analysis. It has more thorough consistency checking
85 * and data collection and output, and full debugging information.
86 */
87
88#elif defined(CONFIG_VAR_COOL)
67#define CONFIG_ASSERT 89#define CONFIG_ASSERT
68/* ... let PRODUCT determine CHECKLEVEL_INITIAL */ 90#define CONFIG_ASSERT_ALL
69#define CONFIG_STATS 91#define CONFIG_STATS
92#ifndef CHECKLEVEL
93#define CHECKLEVEL CheckLevelSHALLOW
94#endif
70/* no telemetry log events */ 95/* no telemetry log events */
71 96
97
98/* CONFIG_VAR_TI -- telemetry variety
99 *
100 * Deprecated. This is the variety with event logging to a telemetry stream.
101 * Currently being reworked to retain event logging with negligible overhead
102 * on all other varieties. RB 2012-08-31
103 */
104
72#elif defined(CONFIG_VAR_TI) /* Telemetry, Internal; variety.ti */ 105#elif defined(CONFIG_VAR_TI) /* Telemetry, Internal; variety.ti */
73#define CONFIG_ASSERT 106#define CONFIG_ASSERT
74/* ... let PRODUCT determine CHECKLEVEL_INITIAL */ 107#define CONFIG_ASSERT_ALL
108#ifndef CHECKLEVEL
109#define CHECKLEVEL CheckLevelSHALLOW
110#endif
75#define CONFIG_STATS 111#define CONFIG_STATS
76#define CONFIG_LOG 112#define CONFIG_LOG
77 113
78#elif defined(CONFIG_VAR_II) /* Ice, Internal; variety.ii (HotLog) */ 114#endif /* CONFIG_VAR_* */
79#define CONFIG_ASSERT
80#define CHECKLEVEL_INITIAL CheckLevelMINIMAL
81/* no statistic meters */
82#define CONFIG_LOG
83#endif
84 115
85 116
86/* Build Features */ 117/* Build Features */
@@ -90,8 +121,13 @@
90/* asserts: AVER, AVERT, NOTREACHED, CHECKx */ 121/* asserts: AVER, AVERT, NOTREACHED, CHECKx */
91/* note: a direct call to ASSERT() will *still* fire */ 122/* note: a direct call to ASSERT() will *still* fire */
92#define AVER_AND_CHECK 123#define AVER_AND_CHECK
124#if defined(CONFIG_ASSERT_ALL)
125#define AVER_AND_CHECK_ALL
126#define MPS_ASSERT_STRING "assertastic"
127#else /* CONFIG_ASSERT_ALL, not */
93#define MPS_ASSERT_STRING "asserted" 128#define MPS_ASSERT_STRING "asserted"
94#else 129#endif /* CONFIG_ASSERT_ALL */
130#else /* CONFIG_ASSERT, not */
95#define AVER_AND_CHECK_NONE 131#define AVER_AND_CHECK_NONE
96#define MPS_ASSERT_STRING "nonasserted" 132#define MPS_ASSERT_STRING "nonasserted"
97#endif 133#endif
@@ -347,30 +383,11 @@
347 383
348/* Product Configuration 384/* Product Configuration
349 * 385 *
350 * Convert CONFIG_PROD_* defined on compiler command line into 386 * Deprecated, see design/config/#req.prod>. This now only contains the
351 * internal configuration parameters. See <design/config/#prod>. 387 * configuration used by the former "MPS" product, which is now the only
388 * product.
352 */ 389 */
353 390
354#if defined(CONFIG_PROD_EPCORE)
355#define MPS_PROD_STRING "epcore"
356#define MPS_PROD_EPCORE
357#define ARENA_INIT_SPARE_COMMIT_LIMIT ((Size)0)
358/* .nosync.why: ScriptWorks is single-threaded when using the MM. */
359#define THREAD_SINGLE
360#define PROTECTION_NONE
361#define DONGLE_NONE
362#define PROD_CHECKLEVEL_INITIAL CheckLevelMINIMAL /* CheckLevelSHALLOW is too slow for SW */
363
364#elif defined(CONFIG_PROD_DYLAN)
365#define MPS_PROD_STRING "dylan"
366#define MPS_PROD_DYLAN
367#define ARENA_INIT_SPARE_COMMIT_LIMIT ((Size)10uL*1024uL*1024uL)
368#define THREAD_MULTI
369#define PROTECTION
370#define DONGLE_NONE
371#define PROD_CHECKLEVEL_INITIAL CheckLevelSHALLOW
372
373#elif defined(CONFIG_PROD_MPS)
374#define MPS_PROD_STRING "mps" 391#define MPS_PROD_STRING "mps"
375#define MPS_PROD_MPS 392#define MPS_PROD_MPS
376#define ARENA_INIT_SPARE_COMMIT_LIMIT ((Size)10uL*1024uL*1024uL) 393#define ARENA_INIT_SPARE_COMMIT_LIMIT ((Size)10uL*1024uL*1024uL)
@@ -379,36 +396,6 @@
379#define DONGLE_NONE 396#define DONGLE_NONE
380#define PROD_CHECKLEVEL_INITIAL CheckLevelSHALLOW 397#define PROD_CHECKLEVEL_INITIAL CheckLevelSHALLOW
381 398
382#else
383#error "No target product configured."
384#endif
385
386/* .prod.arena-size: ARENA_SIZE is currently set larger for the
387 * MM/Dylan product as an interim solution.
388 * See request.dylan.170170.sol.patch and change.dylan.buffalo.170170.
389 * Note that this define is only used by the implementation of the
390 * deprecated mps_space_create interface.
391 */
392#define ARENA_SIZE ((Size)1<<30)
393
394/* if CHECKLEVEL_INITIAL hasn't been defined already (e.g. by a variety, or
395 * in a makefile), take the value from the product. */
396
397#ifndef CHECKLEVEL_INITIAL
398#define CHECKLEVEL_INITIAL PROD_CHECKLEVEL_INITIAL
399#endif
400
401
402/* Dongle configuration */
403
404#if defined(DONGLE)
405#define DONGLE_TEST_FREQUENCY ((unsigned int)4000)
406#elif defined(DONGLE_NONE)
407/* nothing to do */
408#else
409#error "No dongle configured."
410#endif
411
412 399
413/* Pool Class AMC configuration */ 400/* Pool Class AMC configuration */
414 401
diff --git a/mps/code/dbgpool.c b/mps/code/dbgpool.c
index 79d14a77727..c433d044ef1 100644
--- a/mps/code/dbgpool.c
+++ b/mps/code/dbgpool.c
@@ -72,7 +72,7 @@ Bool PoolDebugMixinCheck(PoolDebugMixin debug)
72 CHECKL(TagInitMethodCheck(debug->tagInit)); 72 CHECKL(TagInitMethodCheck(debug->tagInit));
73 /* Nothing to check about tagSize */ 73 /* Nothing to check about tagSize */
74 CHECKD(Pool, debug->tagPool); 74 CHECKD(Pool, debug->tagPool);
75 CHECKL(CHECKTYPE(Addr, void*)); /* tagPool relies on this */ 75 CHECKL(COMPATTYPE(Addr, void*)); /* tagPool relies on this */
76 /* Nothing to check about missingTags */ 76 /* Nothing to check about missingTags */
77 CHECKL(SplayTreeCheck(&debug->index)); 77 CHECKL(SplayTreeCheck(&debug->index));
78 } 78 }
@@ -224,7 +224,7 @@ static void freeSplat(PoolDebugMixin debug, Pool pool, Addr base, Addr limit)
224 Addr p, next; 224 Addr p, next;
225 Size freeSize = debug->freeSize; 225 Size freeSize = debug->freeSize;
226 Arena arena; 226 Arena arena;
227 Seg seg; 227 Seg seg = NULL; /* suppress "may be used uninitialized" */
228 Bool inSeg; 228 Bool inSeg;
229 229
230 AVER(base < limit); 230 AVER(base < limit);
@@ -258,7 +258,7 @@ static Bool freeCheck(PoolDebugMixin debug, Pool pool, Addr base, Addr limit)
258 Size freeSize = debug->freeSize; 258 Size freeSize = debug->freeSize;
259 Res res; 259 Res res;
260 Arena arena; 260 Arena arena;
261 Seg seg; 261 Seg seg = NULL; /* suppress "may be used uninitialized" */
262 Bool inSeg; 262 Bool inSeg;
263 263
264 AVER(base < limit); 264 AVER(base < limit);
@@ -472,7 +472,7 @@ static Res DebugPoolAlloc(Addr *aReturn,
472 Pool pool, Size size, Bool withReservoir) 472 Pool pool, Size size, Bool withReservoir)
473{ 473{
474 Res res; 474 Res res;
475 Addr new; 475 Addr new = NULL; /* suppress "may be used uninitialized" warning */
476 PoolDebugMixin debug; 476 PoolDebugMixin debug;
477 477
478 AVER(aReturn != NULL); 478 AVER(aReturn != NULL);
diff --git a/mps/code/dbgpooli.c b/mps/code/dbgpooli.c
index 52b6e7d3916..ebc8733e3c2 100644
--- a/mps/code/dbgpooli.c
+++ b/mps/code/dbgpooli.c
@@ -21,8 +21,8 @@ void mps_pool_check_fenceposts(mps_pool_t mps_pool)
21 Pool pool = (Pool)mps_pool; 21 Pool pool = (Pool)mps_pool;
22 Arena arena; 22 Arena arena;
23 23
24 /* CHECKT not AVERT, see <design/interface-c/#check.space */ 24 /* TESTT not AVERT, see <design/interface-c/#check.space */
25 AVER(CHECKT(Pool, pool)); 25 AVER(TESTT(Pool, pool));
26 arena = PoolArena(pool); 26 arena = PoolArena(pool);
27 27
28 ArenaEnter(arena); 28 ArenaEnter(arena);
@@ -41,8 +41,8 @@ void mps_pool_check_free_space(mps_pool_t mps_pool)
41 Pool pool = (Pool)mps_pool; 41 Pool pool = (Pool)mps_pool;
42 Arena arena; 42 Arena arena;
43 43
44 /* CHECKT not AVERT, see <design/interface-c/#check.space */ 44 /* TESTT not AVERT, see <design/interface-c/#check.space */
45 AVER(CHECKT(Pool, pool)); 45 AVER(TESTT(Pool, pool));
46 arena = PoolArena(pool); 46 arena = PoolArena(pool);
47 47
48 ArenaEnter(arena); 48 ArenaEnter(arena);
diff --git a/mps/code/eventpro.c b/mps/code/eventpro.c
index 5655d35171b..16cbf41d3c9 100644
--- a/mps/code/eventpro.c
+++ b/mps/code/eventpro.c
@@ -356,20 +356,20 @@ void EventDestroy(EventProc proc, Event event)
356 356
357/* Checking macros, copied from check.h */ 357/* Checking macros, copied from check.h */
358 358
359#define CHECKLVALUE(lv1, lv2) \ 359#define COMPATLVALUE(lv1, lv2) \
360 ((void)sizeof((lv1) = (lv2)), (void)sizeof((lv2) = (lv1)), TRUE) 360 ((void)sizeof((lv1) = (lv2)), (void)sizeof((lv2) = (lv1)), TRUE)
361 361
362#define CHECKTYPE(t1, t2) \ 362#define COMPATTYPE(t1, t2) \
363 (sizeof(t1) == sizeof(t2) && \ 363 (sizeof(t1) == sizeof(t2) && \
364 CHECKLVALUE(*((t1 *)0), *((t2 *)0))) 364 COMPATLVALUE(*((t1 *)0), *((t2 *)0)))
365 365
366#define CHECKFIELDAPPROX(s1, f1, s2, f2) \ 366#define COMPATFIELDAPPROX(s1, f1, s2, f2) \
367 (sizeof(((s1 *)0)->f1) == sizeof(((s2 *)0)->f2) && \ 367 (sizeof(((s1 *)0)->f1) == sizeof(((s2 *)0)->f2) && \
368 offsetof(s1, f1) == offsetof(s2, f2)) 368 offsetof(s1, f1) == offsetof(s2, f2))
369 369
370#define CHECKFIELD(s1, f1, s2, f2) \ 370#define COMPATFIELD(s1, f1, s2, f2) \
371 (CHECKFIELDAPPROX(s1, f1, s2, f2) && \ 371 (COMPATFIELDAPPROX(s1, f1, s2, f2) && \
372 CHECKLVALUE(((s1 *)0)->f1, ((s2 *)0)->f2)) 372 COMPATLVALUE(((s1 *)0)->f1, ((s2 *)0)->f2))
373 373
374 374
375/* EventProcCreate -- initialize the module */ 375/* EventProcCreate -- initialize the module */
@@ -383,8 +383,8 @@ Res EventProcCreate(EventProc *procReturn, Bool partial,
383 if (proc == NULL) return ResMEMORY; 383 if (proc == NULL) return ResMEMORY;
384 384
385 /* check event struct access */ 385 /* check event struct access */
386 assert(CHECKFIELD(EventUnion, any.code, EventWSStruct, code)); 386 assert(COMPATFIELD(EventUnion, any.code, EventWSStruct, code));
387 assert(CHECKFIELD(EventUnion, any.clock, EventWSStruct, clock)); 387 assert(COMPATFIELD(EventUnion, any.clock, EventWSStruct, clock));
388 /* check use of labelTable */ 388 /* check use of labelTable */
389#if !defined(MPS_OS_FR) 389#if !defined(MPS_OS_FR)
390 /* GCC -ansi -pedantic -Werror on FreeBSD will fail here 390 /* GCC -ansi -pedantic -Werror on FreeBSD will fail here
diff --git a/mps/code/eventrep.c b/mps/code/eventrep.c
index 7bbf2828eb2..75437f532b4 100644
--- a/mps/code/eventrep.c
+++ b/mps/code/eventrep.c
@@ -682,12 +682,12 @@ void EventReplay(Event event, Word etime)
682 682
683/* Checking macros, copied from check.h */ 683/* Checking macros, copied from check.h */
684 684
685#define CHECKLVALUE(lv1, lv2) \ 685#define COMPATLVALUE(lv1, lv2) \
686 ((void)sizeof((lv1) = (lv2)), (void)sizeof((lv2) = (lv1)), TRUE) 686 ((void)sizeof((lv1) = (lv2)), (void)sizeof((lv2) = (lv1)), TRUE)
687 687
688#define CHECKTYPE(t1, t2) \ 688#define COMPATTYPE(t1, t2) \
689 (sizeof(t1) == sizeof(t2) && \ 689 (sizeof(t1) == sizeof(t2) && \
690 CHECKLVALUE(*((t1 *)0), *((t2 *)0))) 690 COMPATLVALUE(*((t1 *)0), *((t2 *)0)))
691 691
692 692
693/* CHECKCONV -- check t2 can be cast to t1 without loss */ 693/* CHECKCONV -- check t2 can be cast to t1 without loss */
@@ -705,8 +705,8 @@ Res EventRepInit(Bool partial)
705 /* Check using pointers as keys in the tables. */ 705 /* Check using pointers as keys in the tables. */
706 verify(CHECKCONV(Word, void *)); 706 verify(CHECKCONV(Word, void *));
707 /* Check storage of MPS opaque handles in the tables. */ 707 /* Check storage of MPS opaque handles in the tables. */
708 verify(CHECKTYPE(mps_arena_t, void *)); 708 verify(COMPATTYPE(mps_arena_t, void *));
709 verify(CHECKTYPE(mps_ap_t, void *)); 709 verify(COMPATTYPE(mps_ap_t, void *));
710 /* .event-conv: Conversion of event fields into the types required */ 710 /* .event-conv: Conversion of event fields into the types required */
711 /* by the MPS functions is justified by the reverse conversion */ 711 /* by the MPS functions is justified by the reverse conversion */
712 /* being acceptable (which is upto the event log generator). */ 712 /* being acceptable (which is upto the event log generator). */
diff --git a/mps/code/expgen.sh b/mps/code/expgen.sh
deleted file mode 100755
index 78fd5a29c0d..00000000000
--- a/mps/code/expgen.sh
+++ /dev/null
@@ -1,203 +0,0 @@
1#!/bin/sh
2# $Header$
3#
4# Copyright (C) 2004-2005 Ravenbrook Limited. See end of file for license.
5#
6# expgen.sh
7#
8# Export Generator
9#
10# This is a script to generate the a list of exports that is required
11# for Windows DLL creation.
12#
13# It processed the mps header files and produces a .DEF file that is
14# suitable for use with the linker when producing a DLL file on Windows.
15#
16# When run, this script produces the following output files:
17# expgen - a plain text list of functions declared in the header files.
18# w3gen.def - a .def file suitable for use in the linker stage when
19# building a Windows .DLL.
20#
21# Procedure for rebuilding a new w3gen.def
22#
23# This procedure should be carried out when the contents of w3gen.def
24# would change. This is a bit tricky to say exactly when, but certainly
25# when:
26# a) new functions are declared in public header files.
27# b) different header files are released to a client.
28#
29# Procedure:
30#
31# 0) Note: This procedure worked with gcc 3.3 "gcc (GCC) 3.3 20030304
32# (Apple Computer, Inc. build 1495)", running on Mac OS X 10.3.
33# However, at 2005-10-12, with gcc 4.0 "gcc version 4.0.0 (Apple
34# Computer, Inc. build 5026)", running on Mac OS X 10.4.2, it did not
35# work. Invoking "gcc -fdump-translation-unit spong.h" did not produce
36# a "spong.h.tu" file.
37#
38# 1) Ensure that the sources for w3gen.def are submitted. w3gen.def
39# must be built from versioned sources.
40# The sources are:
41# expgen.sh
42# w3build.bat
43# all the headers that get included.
44# For safety's sake better to ensure that no files are open:
45# p4 opened ...
46# should say '... - file(s) not opened on this client.'
47#
48# 2) Open w3gen.def for edit (making it writable)
49# p4 open w3gen.def
50#
51# 3) Run this script.
52# sh expgen.sh
53# There should be no output when successful.
54#
55# 4) Eyeball the diff.
56# p4 diff ...
57# Check the that resulting diff is sane. For most changes it should
58# just consist of a new symbol being included (plus some Header related
59# junk).
60#
61# 5) Submit the change.
62# p4 submit ...
63#
64#
65# Design
66#
67# The script works by using the -fdump-translation-unit option of gcc.
68# This produces a more easily parseable rendering of the header files.
69# A fairly simple awk script is used to process the output.
70#
71#
72# Dependencies
73#
74# This script currently depends fairly heavily on being run in a
75# Unix-like environment with access to the GNU compiler.
76#
77# It's also fairly sensitive to changes in the undocumented format
78# produced by gcc -fdump-translation-unit. Hopefully it is fairly easy
79# to adapt to changes in this output.
80#
81# Assumes it can freely write to the files "fun", "name-s".
82#
83#
84# Awk crash course
85#
86# Awk processes files line-by-line, thus the entire script is executed
87# for each line of the input file (more complex awk scripts can control
88# this using "next" and "getline" and so on).
89#
90# In awk $exp identifies a field within the line. $1 is the first
91# field, $2 is the second and so on. $0 is the whole line. By default
92# fields are separated by whitespace.
93#
94# string ~ RE is a matching expression and evaulated to true iff the
95# string is matched by the regular expression.
96#
97# REFERENCES
98#
99# [SUSV3] Single UNIX Specification Version 3,
100# http://www.unix.org/single_unix_specification/
101#
102# For documenation of the standard utilities: sh, awk, join, sort, sed
103#
104# [MSDN-LINKER-DEF] Module-Definition (.def) files,
105# http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_module.2d.definition_files.asp
106#
107# For documentation on the format of .def files.
108
109tu () {
110 # if invoked on a file called spong.h will produce a file named
111 # spong.h.tu
112 gcc -fdump-translation-unit -o /dev/null "$@"
113}
114
115# This list of header files is produced by
116# awk '/^copy.*\.h/{print $2}' w3build.bat
117# followed by manual removal of mpsw3.h mpswin.h (which gcc on UNIX
118# cannot parse). Also removed are mpsio.h mpslib.h as they defined
119# interfaces that mps _uses_ not defines. Also removed is mpscmvff.h as
120# it does not get included in mps.lib. Also removed is mpslibcb.h,
121# which now has its own mpslibcb.def file (job002148).
122# The functions declared in mpsw3.h have to be added to the .def file by
123# hand later in this script.
124f='mps.h
125mpsavm.h
126mpsacl.h
127mpscamc.h
128mpscams.h
129mpscawl.h
130mpsclo.h
131mpscmv.h
132mpscsnc.h
133mpstd.h'
134
135tu $f
136
137>expgen
138
139for a in $f
140do
141 >fun
142 awk '
143 $2=="function_decl" && $7=="srcp:" && $8 ~ /^'$a':/ {print $4 >"fun"}
144 $2=="identifier_node"{print $1,$4}
145 ' $a.tu |
146 sort -k 1 >name-s
147
148 echo ';' $a >>expgen
149 sort -k 1 fun |
150 join -o 2.2 - name-s >>expgen
151done
152
153{
154 printf '; %sHeader%s\n' '$' '$'
155 echo '; DO NOT EDIT. Automatically generated by $Header$' | sed 's/\$/!/g'
156 echo 'EXPORTS'
157 cat expgen
158 # This is where we manually the functions declared in mpsw3.h
159 echo ';' mpsw3.h - by hand
160 echo mps_SEH_filter
161 echo mps_SEH_handler
162} > w3gen.def
163
164
165# C. COPYRIGHT AND LICENSE
166#
167# Copyright (C) 2004-2005 Ravenbrook Limited <http://www.ravenbrook.com/>.
168# All rights reserved. This is an open source license. Contact
169# Ravenbrook for commercial licensing options.
170#
171# Redistribution and use in source and binary forms, with or without
172# modification, are permitted provided that the following conditions are
173# met:
174#
175# 1. Redistributions of source code must retain the above copyright
176# notice, this list of conditions and the following disclaimer.
177#
178# 2. Redistributions in binary form must reproduce the above copyright
179# notice, this list of conditions and the following disclaimer in the
180# documentation and/or other materials provided with the distribution.
181#
182# 3. Redistributions in any form must be accompanied by information on how
183# to obtain complete source code for this software and any accompanying
184# software that uses this software. The source code must either be
185# included in the distribution or be available for no more than the cost
186# of distribution plus a nominal fee, and must be freely redistributable
187# under reasonable conditions. For an executable file, complete source
188# code means the source code for all modules it contains. It does not
189# include source code for modules or files that typically accompany the
190# major components of the operating system on which the executable file
191# runs.
192#
193# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
194# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
195# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
196# PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE
197# COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
198# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
199# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
200# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
201# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
202# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
203# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/mps/code/fri3gc.gmk b/mps/code/fri3gc.gmk
index 32f4496de6e..f2895c00404 100644
--- a/mps/code/fri3gc.gmk
+++ b/mps/code/fri3gc.gmk
@@ -5,19 +5,16 @@
5 5
6PFM = fri3gc 6PFM = fri3gc
7 7
8PFMDEFS = -D_REENTRANT
9
10MPMPF = lockix.c thix.c pthrdext.c vmix.c \ 8MPMPF = lockix.c thix.c pthrdext.c vmix.c \
11 protix.c protsgix.c prmcan.c prmci3fr.c ssixi3.c span.c 9 protix.c protsgix.c prmcan.c prmci3fr.c ssixi3.c span.c
12SWPF = than.c vmfr.c protsw.c prmcan.c ssan.c
13 10
14LIBS = -lm -pthread 11LIBS = -lm -pthread
15 12
16include gc.gmk 13include gc.gmk
17 14
18CFLAGSCOMPILER := $(subst -pedantic,,$(CFLAGSCOMPILER)) 15# FIXME: We pun types through the MPS interface, setting off this warning.
19CFLAGSDEBUG = -g3 16# Can we avoid this? The puns might indeed be dangerous.
20CFLAGSOPT = -O -g3 17CFLAGSCOMPILER := $(CFLAGSCOMPILER) -Wno-strict-aliasing
21 18
22CC = cc 19CC = cc
23 20
diff --git a/mps/code/fri6gc.gmk b/mps/code/fri6gc.gmk
index 44358be0767..814d0a7e204 100644
--- a/mps/code/fri6gc.gmk
+++ b/mps/code/fri6gc.gmk
@@ -5,19 +5,14 @@
5 5
6PFM = fri6gc 6PFM = fri6gc
7 7
8PFMDEFS = -D_REENTRANT
9
10MPMPF = lockix.c thix.c pthrdext.c vmix.c \ 8MPMPF = lockix.c thix.c pthrdext.c vmix.c \
11 protix.c protsgix.c prmcan.c prmci6fr.c ssixi6.c span.c 9 protix.c protsgix.c prmcan.c prmci6fr.c ssixi6.c span.c
12SWPF = than.c vmfr.c protsw.c prmcan.c ssan.c
13 10
14LIBS = -lm -pthread 11LIBS = -lm -pthread
15 12
16include gc.gmk 13include gc.gmk
17 14
18CFLAGSCOMPILER := $(subst -pedantic,,$(CFLAGSCOMPILER)) 15CFLAGSCOMPILER := $(CFLAGSCOMPILER) -Wno-strict-aliasing
19CFLAGSDEBUG = -g3
20CFLAGSOPT = -O -g3
21 16
22CC = cc 17CC = cc
23 18
diff --git a/mps/code/gc.gmk b/mps/code/gc.gmk
index 75b83bf8118..5eb513176f4 100644
--- a/mps/code/gc.gmk
+++ b/mps/code/gc.gmk
@@ -13,9 +13,8 @@ CFLAGSCOMPILER := \
13 -Wstrict-prototypes -Wmissing-prototypes \ 13 -Wstrict-prototypes -Wmissing-prototypes \
14 -Winline -Waggregate-return -Wnested-externs \ 14 -Winline -Waggregate-return -Wnested-externs \
15 -Wcast-qual -Wshadow 15 -Wcast-qual -Wshadow
16CFLAGSDEBUG = -g -ggdb3 16CFLAGSDEBUG = -O -g3
17CFLAGSOPT = -O -g -ggdb3 17CFLAGSOPT = -O2 -g3
18CFLAGSOPTNODEBUG = -O -g0
19 18
20# gcc -MM generates a dependency line of the form: 19# gcc -MM generates a dependency line of the form:
21# thing.o : thing.c ... 20# thing.o : thing.c ...
diff --git a/mps/code/global.c b/mps/code/global.c
index ede40309f4a..db0e6800dea 100644
--- a/mps/code/global.c
+++ b/mps/code/global.c
@@ -462,6 +462,10 @@ Ring GlobalsRememberedSummaryRing(Globals global)
462 462
463/* ArenaEnter -- enter the state where you can look at the arena */ 463/* ArenaEnter -- enter the state where you can look at the arena */
464 464
465/* TODO: The THREAD_SINGLE and PROTECTION_NONE build configs aren't regularly
466 tested, though they might well be useful for embedded custom targets.
467 Should test them. RB 2012-09-03 */
468
465#if defined(THREAD_SINGLE) && defined(PROTECTION_NONE) 469#if defined(THREAD_SINGLE) && defined(PROTECTION_NONE)
466void (ArenaEnter)(Arena arena) 470void (ArenaEnter)(Arena arena)
467{ 471{
@@ -484,7 +488,7 @@ void arenaEnterLock(Arena arena, int recursive)
484 /* This check is safe to do outside the lock. Unless the client 488 /* This check is safe to do outside the lock. Unless the client
485 is also calling ArenaDestroy, but that's a protocol violation by 489 is also calling ArenaDestroy, but that's a protocol violation by
486 the client if so. */ 490 the client if so. */
487 AVER(CHECKT(Arena, arena)); 491 AVER(TESTT(Arena, arena));
488 492
489 StackProbe(StackProbeDEPTH); 493 StackProbe(StackProbeDEPTH);
490 lock = ArenaGlobals(arena)->lock; 494 lock = ArenaGlobals(arena)->lock;
@@ -912,7 +916,7 @@ void ArenaPokeSeg(Arena arena, Seg seg, Addr addr, Ref ref)
912Ref ArenaRead(Arena arena, Addr addr) 916Ref ArenaRead(Arena arena, Addr addr)
913{ 917{
914 Bool b; 918 Bool b;
915 Seg seg; 919 Seg seg = NULL; /* suppress "may be used uninitialized" */
916 920
917 AVERT(Arena, arena); 921 AVERT(Arena, arena);
918 922
@@ -946,7 +950,7 @@ Res GlobalsDescribe(Globals arenaGlobals, mps_lib_FILE *stream)
946 Ring node, nextNode; 950 Ring node, nextNode;
947 Index i; 951 Index i;
948 952
949 if (!CHECKT(Globals, arenaGlobals)) return ResFAIL; 953 if (!TESTT(Globals, arenaGlobals)) return ResFAIL;
950 if (stream == NULL) return ResFAIL; 954 if (stream == NULL) return ResFAIL;
951 955
952 arena = GlobalsArena(arenaGlobals); 956 arena = GlobalsArena(arenaGlobals);
diff --git a/mps/code/gp.gmk b/mps/code/gp.gmk
index 229064d3055..8e16b524c38 100644
--- a/mps/code/gp.gmk
+++ b/mps/code/gp.gmk
@@ -16,7 +16,6 @@ CFLAGSCOMPILER = \
16 -Wcast-qual -Wshadow -pg 16 -Wcast-qual -Wshadow -pg
17CFLAGSDEBUG = -g -ggdb3 17CFLAGSDEBUG = -g -ggdb3
18CFLAGSOPT = -O -g -ggdb3 18CFLAGSOPT = -O -g -ggdb3
19CFLAGSOPTNODEBUG = -O -g0
20 19
21# gcc -MM generates a dependency line of the form: 20# gcc -MM generates a dependency line of the form:
22# thing.o : thing.c ... 21# thing.o : thing.c ...
diff --git a/mps/code/lii3gc.gmk b/mps/code/lii3gc.gmk
index 3652016cc45..58176c0571f 100644
--- a/mps/code/lii3gc.gmk
+++ b/mps/code/lii3gc.gmk
@@ -8,13 +8,8 @@ PFM = lii3gc
8THREADSRC = lockli.c thix.c pthrdext.c 8THREADSRC = lockli.c thix.c pthrdext.c
9THREADLIB = -lpthread 9THREADLIB = -lpthread
10 10
11# _XOPEN_SOURCE is to get the modern POSIX signal handling
12# _GNU_SOURCE is to get register numbers in prmci3li.c
13PFMDEFS = -D_REENTRANT -D_XOPEN_SOURCE=500 -D_GNU_SOURCE
14
15MPMPF = ${THREADSRC} vmix.c \ 11MPMPF = ${THREADSRC} vmix.c \
16 protix.c protli.c proti3.c prmci3li.c ssixi3.c span.c 12 protix.c protli.c proti3.c prmci3li.c ssixi3.c span.c
17SWPF = than.c vmli.c protsw.c prmcan.c ssan.c
18 13
19LIBS = -lm ${THREADLIB} 14LIBS = -lm ${THREADLIB}
20 15
diff --git a/mps/code/lii6gc.gmk b/mps/code/lii6gc.gmk
index 47d1bb744e0..4c48923b082 100644
--- a/mps/code/lii6gc.gmk
+++ b/mps/code/lii6gc.gmk
@@ -8,13 +8,8 @@ PFM = lii6gc
8THREADSRC = lockli.c thix.c pthrdext.c 8THREADSRC = lockli.c thix.c pthrdext.c
9THREADLIB = -lpthread 9THREADLIB = -lpthread
10 10
11# _XOPEN_SOURCE is to get the modern POSIX signal handling
12# _GNU_SOURCE is to get register numbers in prmci3li.c
13PFMDEFS = -D_REENTRANT -D_XOPEN_SOURCE=500 -D_GNU_SOURCE
14
15MPMPF = ${THREADSRC} vmix.c \ 11MPMPF = ${THREADSRC} vmix.c \
16 protix.c protli.c proti6.c prmci6li.c ssixi6.c span.c 12 protix.c protli.c proti6.c prmci6li.c ssixi6.c span.c
17SWPF = than.c vmli.c protsw.c prmcan.c ssan.c
18 13
19LIBS = -lm ${THREADLIB} 14LIBS = -lm ${THREADLIB}
20 15
diff --git a/mps/code/lockli.c b/mps/code/lockli.c
index deac899e0f2..8bd03649bbf 100644
--- a/mps/code/lockli.c
+++ b/mps/code/lockli.c
@@ -22,15 +22,14 @@
22 * while we hold the mutex. 22 * while we hold the mutex.
23 */ 23 */
24 24
25#define _XOPEN_SOURCE 500
26#include <pthread.h>
27#include <semaphore.h>
28#include <errno.h>
29
30#include "mpmtypes.h" 25#include "mpmtypes.h"
31#include "lock.h" 26#include "lock.h"
32#include "config.h" 27#include "config.h"
33 28
29#include <pthread.h>
30#include <semaphore.h>
31#include <errno.h>
32
34 33
35#ifndef MPS_OS_LI 34#ifndef MPS_OS_LI
36#error "lockli.c is specific to LinuxThreads but MPS_OS_LI not defined" 35#error "lockli.c is specific to LinuxThreads but MPS_OS_LI not defined"
diff --git a/mps/code/mpm.c b/mps/code/mpm.c
index 71b93d8a41d..86b73b0eb77 100644
--- a/mps/code/mpm.c
+++ b/mps/code/mpm.c
@@ -23,10 +23,12 @@ SRCID(mpm, "$Id$");
23 23
24/* CheckLevel -- Control check level 24/* CheckLevel -- Control check level
25 * 25 *
26 * This controls the behaviour of Check methods (see impl.h.check). 26 * This controls the behaviour of Check methods (see check.h).
27 */ 27 */
28 28
29unsigned CheckLevel = CHECKLEVEL_INITIAL; 29#ifdef CHECKLEVEL_DYNAMIC
30unsigned CheckLevel = CHECKLEVEL_DYNAMIC;
31#endif
30 32
31 33
32/* MPMCheck -- test MPM assumptions */ 34/* MPMCheck -- test MPM assumptions */
diff --git a/mps/code/mps.c b/mps/code/mps.c
index 13c51f551e3..8adcf146226 100644
--- a/mps/code/mps.c
+++ b/mps/code/mps.c
@@ -18,6 +18,16 @@
18 * which closely mirror those in the makefiles. 18 * which closely mirror those in the makefiles.
19 */ 19 */
20 20
21
22/* Platform interface
23 *
24 * This must be included first as it defines symbols which affect system
25 * headers, such as _POSIX_C_SOURCE _REENTRANT etc.
26 */
27
28#include "mpstd.h"
29
30
21/* MPM Core */ 31/* MPM Core */
22 32
23#include "mpsi.c" 33#include "mpsi.c"
@@ -77,10 +87,6 @@
77#include "mpsioan.c" 87#include "mpsioan.c"
78#endif 88#endif
79 89
80/* Platform interface */
81
82#include "mpstd.h"
83
84/* Mac OS X on 32-bit Intel built with Clang or GCC */ 90/* Mac OS X on 32-bit Intel built with Clang or GCC */
85 91
86#if defined(MPS_PF_XCI3LL) || defined(MPS_PF_XCI3GC) 92#if defined(MPS_PF_XCI3LL) || defined(MPS_PF_XCI3GC)
@@ -112,7 +118,7 @@
112#elif defined(MPS_PF_FRI3GC) 118#elif defined(MPS_PF_FRI3GC)
113 119
114#include "lockix.c" /* Posix locks */ 120#include "lockix.c" /* Posix locks */
115#include "thix.c" /* FreeBSD on 32-bit Intel threading */ 121#include "thix.c" /* Posix threading */
116#include "pthrdext.c" /* Posix thread extensions */ 122#include "pthrdext.c" /* Posix thread extensions */
117#include "vmix.c" /* Posix virtual memory */ 123#include "vmix.c" /* Posix virtual memory */
118#include "protix.c" /* Posix protection */ 124#include "protix.c" /* Posix protection */
@@ -122,6 +128,21 @@
122#include "span.c" /* generic stack probe */ 128#include "span.c" /* generic stack probe */
123#include "ssixi3.c" /* Posix on 32-bit Intel stack scan */ 129#include "ssixi3.c" /* Posix on 32-bit Intel stack scan */
124 130
131/* FreeBSD on 64-bit Intel built with GCC */
132
133#elif defined(MPS_PF_FRI6GC)
134
135#include "lockix.c" /* Posix locks */
136#include "thix.c" /* Posix threading */
137#include "pthrdext.c" /* Posix thread extensions */
138#include "vmix.c" /* Posix virtual memory */
139#include "protix.c" /* Posix protection */
140#include "protsgix.c" /* Posix signal handling */
141#include "prmcan.c" /* generic mutator context */
142#include "prmci6fr.c" /* 64-bit Intel for FreeBSD mutator context */
143#include "span.c" /* generic stack probe */
144#include "ssixi6.c" /* Posix on 64-bit Intel stack scan */
145
125/* Linux on 32-bit Intel with GCC */ 146/* Linux on 32-bit Intel with GCC */
126 147
127#elif defined(MPS_PF_LII3GC) 148#elif defined(MPS_PF_LII3GC)
@@ -147,10 +168,10 @@
147#include "vmix.c" /* Posix virtual memory */ 168#include "vmix.c" /* Posix virtual memory */
148#include "protix.c" /* Posix protection */ 169#include "protix.c" /* Posix protection */
149#include "protli.c" /* Linux protection */ 170#include "protli.c" /* Linux protection */
150#include "proti6.c" /* 32-bit Intel mutator context */ 171#include "proti6.c" /* 64-bit Intel mutator context */
151#include "prmci6li.c" /* 32-bit Intel for Linux mutator context */ 172#include "prmci6li.c" /* 64-bit Intel for Linux mutator context */
152#include "span.c" /* generic stack probe */ 173#include "span.c" /* generic stack probe */
153#include "ssixi6.c" /* Posix on 32-bit Intel stack scan */ 174#include "ssixi6.c" /* Posix on 64-bit Intel stack scan */
154 175
155/* Windows on 32-bit Intel with Microsoft Visual Studio */ 176/* Windows on 32-bit Intel with Microsoft Visual Studio */
156 177
diff --git a/mps/code/mps.h b/mps/code/mps.h
index 427d9ccba94..633dbb5ddac 100644
--- a/mps/code/mps.h
+++ b/mps/code/mps.h
@@ -274,10 +274,6 @@ extern mps_res_t mps_arena_create(mps_arena_t *, mps_arena_class_t, ...);
274extern mps_res_t mps_arena_create_v(mps_arena_t *, mps_arena_class_t, va_list); 274extern mps_res_t mps_arena_create_v(mps_arena_t *, mps_arena_class_t, va_list);
275extern void mps_arena_destroy(mps_arena_t); 275extern void mps_arena_destroy(mps_arena_t);
276 276
277/* these two for backward compatibility */
278extern mps_res_t mps_space_create(mps_space_t *);
279extern void mps_space_destroy(mps_space_t);
280
281extern size_t mps_arena_reserved(mps_arena_t); 277extern size_t mps_arena_reserved(mps_arena_t);
282extern size_t mps_arena_committed(mps_arena_t); 278extern size_t mps_arena_committed(mps_arena_t);
283extern size_t mps_arena_spare_committed(mps_arena_t); 279extern size_t mps_arena_spare_committed(mps_arena_t);
diff --git a/mps/code/mps.xcodeproj/project.pbxproj b/mps/code/mps.xcodeproj/project.pbxproj
index f71b1bf30e7..20610876843 100644
--- a/mps/code/mps.xcodeproj/project.pbxproj
+++ b/mps/code/mps.xcodeproj/project.pbxproj
@@ -2081,7 +2081,7 @@
2081 31EEABDA156AAE9E00714D05 /* Project object */ = { 2081 31EEABDA156AAE9E00714D05 /* Project object */ = {
2082 isa = PBXProject; 2082 isa = PBXProject;
2083 attributes = { 2083 attributes = {
2084 LastUpgradeCheck = 0430; 2084 LastUpgradeCheck = 0440;
2085 }; 2085 };
2086 buildConfigurationList = 31EEABDD156AAE9E00714D05 /* Build configuration list for PBXProject "mps" */; 2086 buildConfigurationList = 31EEABDD156AAE9E00714D05 /* Build configuration list for PBXProject "mps" */;
2087 compatibilityVersion = "Xcode 3.2"; 2087 compatibilityVersion = "Xcode 3.2";
@@ -2818,6 +2818,7 @@
2818 3104AFF3156D37A0000A585A /* Debug */ = { 2818 3104AFF3156D37A0000A585A /* Debug */ = {
2819 isa = XCBuildConfiguration; 2819 isa = XCBuildConfiguration;
2820 buildSettings = { 2820 buildSettings = {
2821 COMBINE_HIDPI_IMAGES = YES;
2821 PRODUCT_NAME = "$(TARGET_NAME)"; 2822 PRODUCT_NAME = "$(TARGET_NAME)";
2822 }; 2823 };
2823 name = Debug; 2824 name = Debug;
@@ -2825,6 +2826,7 @@
2825 3104AFF4156D37A0000A585A /* Release */ = { 2826 3104AFF4156D37A0000A585A /* Release */ = {
2826 isa = XCBuildConfiguration; 2827 isa = XCBuildConfiguration;
2827 buildSettings = { 2828 buildSettings = {
2829 COMBINE_HIDPI_IMAGES = YES;
2828 PRODUCT_NAME = "$(TARGET_NAME)"; 2830 PRODUCT_NAME = "$(TARGET_NAME)";
2829 }; 2831 };
2830 name = Release; 2832 name = Release;
@@ -3109,6 +3111,285 @@
3109 }; 3111 };
3110 name = Release; 3112 name = Release;
3111 }; 3113 };
3114 318387EB15DC30CC008E4EA0 /* WE */ = {
3115 isa = XCBuildConfiguration;
3116 buildSettings = {
3117 ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
3118 CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
3119 CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
3120 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
3121 GCC_C_LANGUAGE_STANDARD = ansi;
3122 GCC_OPTIMIZATION_LEVEL = 2;
3123 GCC_PREPROCESSOR_DEFINITIONS = CONFIG_VAR_WE;
3124 GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
3125 GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
3126 GCC_TREAT_WARNINGS_AS_ERRORS = NO;
3127 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
3128 GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
3129 GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO;
3130 GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
3131 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
3132 GCC_WARN_ABOUT_RETURN_TYPE = YES;
3133 GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
3134 GCC_WARN_PEDANTIC = YES;
3135 GCC_WARN_SHADOW = YES;
3136 GCC_WARN_SIGN_COMPARE = YES;
3137 GCC_WARN_UNINITIALIZED_AUTOS = YES;
3138 GCC_WARN_UNKNOWN_PRAGMAS = YES;
3139 GCC_WARN_UNUSED_FUNCTION = YES;
3140 GCC_WARN_UNUSED_LABEL = YES;
3141 GCC_WARN_UNUSED_PARAMETER = YES;
3142 GCC_WARN_UNUSED_VARIABLE = YES;
3143 OTHER_CFLAGS = (
3144 "-pedantic",
3145 "-Wall",
3146 "-Wno-extended-offsetof",
3147 );
3148 SDKROOT = macosx;
3149 WARNING_CFLAGS = (
3150 "-pedantic",
3151 "-Wpointer-arith",
3152 "-Wstrict-prototypes",
3153 "-Wmissing-prototypes",
3154 "-Winline",
3155 "-Waggregate-return",
3156 "-Wnested-externs",
3157 "-Wcast-qual",
3158 "-Wshadow",
3159 "-Wall",
3160 "-Wno-extended-offsetof",
3161 );
3162 };
3163 name = WE;
3164 };
3165 318387EC15DC30CC008E4EA0 /* WE */ = {
3166 isa = XCBuildConfiguration;
3167 buildSettings = {
3168 COMBINE_HIDPI_IMAGES = YES;
3169 PRODUCT_NAME = "$(TARGET_NAME)";
3170 };
3171 name = WE;
3172 };
3173 318387ED15DC30CC008E4EA0 /* WE */ = {
3174 isa = XCBuildConfiguration;
3175 buildSettings = {
3176 ALWAYS_SEARCH_USER_PATHS = NO;
3177 COMBINE_HIDPI_IMAGES = YES;
3178 EXECUTABLE_PREFIX = lib;
3179 PRODUCT_NAME = "$(TARGET_NAME)";
3180 };
3181 name = WE;
3182 };
3183 318387EE15DC30CC008E4EA0 /* WE */ = {
3184 isa = XCBuildConfiguration;
3185 buildSettings = {
3186 PRODUCT_NAME = "$(TARGET_NAME)";
3187 };
3188 name = WE;
3189 };
3190 318387EF15DC30CC008E4EA0 /* WE */ = {
3191 isa = XCBuildConfiguration;
3192 buildSettings = {
3193 PRODUCT_NAME = "$(TARGET_NAME)";
3194 };
3195 name = WE;
3196 };
3197 318387F015DC30CC008E4EA0 /* WE */ = {
3198 isa = XCBuildConfiguration;
3199 buildSettings = {
3200 PRODUCT_NAME = "$(TARGET_NAME)";
3201 };
3202 name = WE;
3203 };
3204 318387F115DC30CC008E4EA0 /* WE */ = {
3205 isa = XCBuildConfiguration;
3206 buildSettings = {
3207 PRODUCT_NAME = "$(TARGET_NAME)";
3208 };
3209 name = WE;
3210 };
3211 318387F215DC30CC008E4EA0 /* WE */ = {
3212 isa = XCBuildConfiguration;
3213 buildSettings = {
3214 PRODUCT_NAME = "$(TARGET_NAME)";
3215 };
3216 name = WE;
3217 };
3218 318387F315DC30CC008E4EA0 /* WE */ = {
3219 isa = XCBuildConfiguration;
3220 buildSettings = {
3221 PRODUCT_NAME = "$(TARGET_NAME)";
3222 };
3223 name = WE;
3224 };
3225 318387F415DC30CC008E4EA0 /* WE */ = {
3226 isa = XCBuildConfiguration;
3227 buildSettings = {
3228 PRODUCT_NAME = "$(TARGET_NAME)";
3229 };
3230 name = WE;
3231 };
3232 318387F515DC30CC008E4EA0 /* WE */ = {
3233 isa = XCBuildConfiguration;
3234 buildSettings = {
3235 PRODUCT_NAME = "$(TARGET_NAME)";
3236 };
3237 name = WE;
3238 };
3239 318387F615DC30CC008E4EA0 /* WE */ = {
3240 isa = XCBuildConfiguration;
3241 buildSettings = {
3242 PRODUCT_NAME = "$(TARGET_NAME)";
3243 };
3244 name = WE;
3245 };
3246 318387F715DC30CC008E4EA0 /* WE */ = {
3247 isa = XCBuildConfiguration;
3248 buildSettings = {
3249 PRODUCT_NAME = "$(TARGET_NAME)";
3250 };
3251 name = WE;
3252 };
3253 318387F815DC30CC008E4EA0 /* WE */ = {
3254 isa = XCBuildConfiguration;
3255 buildSettings = {
3256 PRODUCT_NAME = "$(TARGET_NAME)";
3257 };
3258 name = WE;
3259 };
3260 318387F915DC30CC008E4EA0 /* WE */ = {
3261 isa = XCBuildConfiguration;
3262 buildSettings = {
3263 PRODUCT_NAME = "$(TARGET_NAME)";
3264 };
3265 name = WE;
3266 };
3267 318387FA15DC30CC008E4EA0 /* WE */ = {
3268 isa = XCBuildConfiguration;
3269 buildSettings = {
3270 PRODUCT_NAME = "$(TARGET_NAME)";
3271 };
3272 name = WE;
3273 };
3274 318387FB15DC30CC008E4EA0 /* WE */ = {
3275 isa = XCBuildConfiguration;
3276 buildSettings = {
3277 PRODUCT_NAME = "$(TARGET_NAME)";
3278 };
3279 name = WE;
3280 };
3281 318387FC15DC30CC008E4EA0 /* WE */ = {
3282 isa = XCBuildConfiguration;
3283 buildSettings = {
3284 PRODUCT_NAME = "$(TARGET_NAME)";
3285 };
3286 name = WE;
3287 };
3288 318387FD15DC30CC008E4EA0 /* WE */ = {
3289 isa = XCBuildConfiguration;
3290 buildSettings = {
3291 PRODUCT_NAME = "$(TARGET_NAME)";
3292 };
3293 name = WE;
3294 };
3295 318387FE15DC30CC008E4EA0 /* WE */ = {
3296 isa = XCBuildConfiguration;
3297 buildSettings = {
3298 PRODUCT_NAME = "$(TARGET_NAME)";
3299 };
3300 name = WE;
3301 };
3302 318387FF15DC30CC008E4EA0 /* WE */ = {
3303 isa = XCBuildConfiguration;
3304 buildSettings = {
3305 PRODUCT_NAME = "$(TARGET_NAME)";
3306 };
3307 name = WE;
3308 };
3309 3183880015DC30CC008E4EA0 /* WE */ = {
3310 isa = XCBuildConfiguration;
3311 buildSettings = {
3312 PRODUCT_NAME = "$(TARGET_NAME)";
3313 };
3314 name = WE;
3315 };
3316 3183880115DC30CC008E4EA0 /* WE */ = {
3317 isa = XCBuildConfiguration;
3318 buildSettings = {
3319 PRODUCT_NAME = "$(TARGET_NAME)";
3320 };
3321 name = WE;
3322 };
3323 3183880215DC30CC008E4EA0 /* WE */ = {
3324 isa = XCBuildConfiguration;
3325 buildSettings = {
3326 PRODUCT_NAME = "$(TARGET_NAME)";
3327 };
3328 name = WE;
3329 };
3330 3183880315DC30CC008E4EA0 /* WE */ = {
3331 isa = XCBuildConfiguration;
3332 buildSettings = {
3333 PRODUCT_NAME = "$(TARGET_NAME)";
3334 };
3335 name = WE;
3336 };
3337 3183880415DC30CC008E4EA0 /* WE */ = {
3338 isa = XCBuildConfiguration;
3339 buildSettings = {
3340 PRODUCT_NAME = "$(TARGET_NAME)";
3341 };
3342 name = WE;
3343 };
3344 3183880515DC30CC008E4EA0 /* WE */ = {
3345 isa = XCBuildConfiguration;
3346 buildSettings = {
3347 PRODUCT_NAME = "$(TARGET_NAME)";
3348 };
3349 name = WE;
3350 };
3351 3183880615DC30CC008E4EA0 /* WE */ = {
3352 isa = XCBuildConfiguration;
3353 buildSettings = {
3354 PRODUCT_NAME = "$(TARGET_NAME)";
3355 };
3356 name = WE;
3357 };
3358 3183880715DC30CC008E4EA0 /* WE */ = {
3359 isa = XCBuildConfiguration;
3360 buildSettings = {
3361 PRODUCT_NAME = "$(TARGET_NAME)";
3362 };
3363 name = WE;
3364 };
3365 3183880815DC30CC008E4EA0 /* WE */ = {
3366 isa = XCBuildConfiguration;
3367 buildSettings = {
3368 PRODUCT_NAME = "$(TARGET_NAME)";
3369 };
3370 name = WE;
3371 };
3372 3183880915DC30CC008E4EA0 /* WE */ = {
3373 isa = XCBuildConfiguration;
3374 buildSettings = {
3375 PRODUCT_NAME = "$(TARGET_NAME)";
3376 };
3377 name = WE;
3378 };
3379 3183880A15DC30CC008E4EA0 /* WE */ = {
3380 isa = XCBuildConfiguration;
3381 buildSettings = {
3382 PRODUCT_NAME = "$(TARGET_NAME)";
3383 };
3384 name = WE;
3385 };
3386 3183880B15DC30CC008E4EA0 /* WE */ = {
3387 isa = XCBuildConfiguration;
3388 buildSettings = {
3389 PRODUCT_NAME = "$(TARGET_NAME)";
3390 };
3391 name = WE;
3392 };
3112 31D60015156D3CB200337B26 /* Debug */ = { 3393 31D60015156D3CB200337B26 /* Debug */ = {
3113 isa = XCBuildConfiguration; 3394 isa = XCBuildConfiguration;
3114 buildSettings = { 3395 buildSettings = {
@@ -3202,11 +3483,7 @@
3202 COPY_PHASE_STRIP = NO; 3483 COPY_PHASE_STRIP = NO;
3203 GCC_C_LANGUAGE_STANDARD = ansi; 3484 GCC_C_LANGUAGE_STANDARD = ansi;
3204 GCC_OPTIMIZATION_LEVEL = 0; 3485 GCC_OPTIMIZATION_LEVEL = 0;
3205 GCC_PREPROCESSOR_DEFINITIONS = ( 3486 GCC_PREPROCESSOR_DEFINITIONS = CONFIG_VAR_COOL;
3206 CONFIG_PF_XCI6LL,
3207 CONFIG_PROD_MPS,
3208 CONFIG_VAR_CI,
3209 );
3210 GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 3487 GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
3211 GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; 3488 GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
3212 GCC_TREAT_WARNINGS_AS_ERRORS = NO; 3489 GCC_TREAT_WARNINGS_AS_ERRORS = NO;
@@ -3226,7 +3503,6 @@
3226 GCC_WARN_UNUSED_LABEL = YES; 3503 GCC_WARN_UNUSED_LABEL = YES;
3227 GCC_WARN_UNUSED_PARAMETER = YES; 3504 GCC_WARN_UNUSED_PARAMETER = YES;
3228 GCC_WARN_UNUSED_VARIABLE = YES; 3505 GCC_WARN_UNUSED_VARIABLE = YES;
3229 MACOSX_DEPLOYMENT_TARGET = 10.4;
3230 ONLY_ACTIVE_ARCH = YES; 3506 ONLY_ACTIVE_ARCH = YES;
3231 OTHER_CFLAGS = ( 3507 OTHER_CFLAGS = (
3232 "-pedantic", 3508 "-pedantic",
@@ -3258,12 +3534,8 @@
3258 CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 3534 CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
3259 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 3535 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
3260 GCC_C_LANGUAGE_STANDARD = ansi; 3536 GCC_C_LANGUAGE_STANDARD = ansi;
3261 GCC_PREPROCESSOR_DEFINITIONS = ( 3537 GCC_OPTIMIZATION_LEVEL = 2;
3262 CONFIG_PF_XCI6LL, 3538 GCC_PREPROCESSOR_DEFINITIONS = CONFIG_VAR_HOT;
3263 CONFIG_PROD_MPS,
3264 CONFIG_VAR_HE,
3265 NDEBUG,
3266 );
3267 GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 3539 GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
3268 GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; 3540 GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
3269 GCC_TREAT_WARNINGS_AS_ERRORS = NO; 3541 GCC_TREAT_WARNINGS_AS_ERRORS = NO;
@@ -3283,7 +3555,6 @@
3283 GCC_WARN_UNUSED_LABEL = YES; 3555 GCC_WARN_UNUSED_LABEL = YES;
3284 GCC_WARN_UNUSED_PARAMETER = YES; 3556 GCC_WARN_UNUSED_PARAMETER = YES;
3285 GCC_WARN_UNUSED_VARIABLE = YES; 3557 GCC_WARN_UNUSED_VARIABLE = YES;
3286 MACOSX_DEPLOYMENT_TARGET = 10.4;
3287 OTHER_CFLAGS = ( 3558 OTHER_CFLAGS = (
3288 "-pedantic", 3559 "-pedantic",
3289 "-Wall", 3560 "-Wall",
@@ -3310,6 +3581,7 @@
3310 isa = XCBuildConfiguration; 3581 isa = XCBuildConfiguration;
3311 buildSettings = { 3582 buildSettings = {
3312 ALWAYS_SEARCH_USER_PATHS = NO; 3583 ALWAYS_SEARCH_USER_PATHS = NO;
3584 COMBINE_HIDPI_IMAGES = YES;
3313 EXECUTABLE_PREFIX = lib; 3585 EXECUTABLE_PREFIX = lib;
3314 PRODUCT_NAME = "$(TARGET_NAME)"; 3586 PRODUCT_NAME = "$(TARGET_NAME)";
3315 }; 3587 };
@@ -3319,6 +3591,7 @@
3319 isa = XCBuildConfiguration; 3591 isa = XCBuildConfiguration;
3320 buildSettings = { 3592 buildSettings = {
3321 ALWAYS_SEARCH_USER_PATHS = NO; 3593 ALWAYS_SEARCH_USER_PATHS = NO;
3594 COMBINE_HIDPI_IMAGES = YES;
3322 EXECUTABLE_PREFIX = lib; 3595 EXECUTABLE_PREFIX = lib;
3323 PRODUCT_NAME = "$(TARGET_NAME)"; 3596 PRODUCT_NAME = "$(TARGET_NAME)";
3324 }; 3597 };
@@ -3346,6 +3619,7 @@
3346 buildConfigurations = ( 3619 buildConfigurations = (
3347 3104AFBA156D357B000A585A /* Debug */, 3620 3104AFBA156D357B000A585A /* Debug */,
3348 3104AFBB156D357B000A585A /* Release */, 3621 3104AFBB156D357B000A585A /* Release */,
3622 318387EF15DC30CC008E4EA0 /* WE */,
3349 ); 3623 );
3350 defaultConfigurationIsVisible = 0; 3624 defaultConfigurationIsVisible = 0;
3351 defaultConfigurationName = Release; 3625 defaultConfigurationName = Release;
@@ -3355,6 +3629,7 @@
3355 buildConfigurations = ( 3629 buildConfigurations = (
3356 3104AFD0156D35E2000A585A /* Debug */, 3630 3104AFD0156D35E2000A585A /* Debug */,
3357 3104AFD1156D35E2000A585A /* Release */, 3631 3104AFD1156D35E2000A585A /* Release */,
3632 318387F315DC30CC008E4EA0 /* WE */,
3358 ); 3633 );
3359 defaultConfigurationIsVisible = 0; 3634 defaultConfigurationIsVisible = 0;
3360 defaultConfigurationName = Release; 3635 defaultConfigurationName = Release;
@@ -3364,6 +3639,7 @@
3364 buildConfigurations = ( 3639 buildConfigurations = (
3365 3104AFE5156D3682000A585A /* Debug */, 3640 3104AFE5156D3682000A585A /* Debug */,
3366 3104AFE6156D3682000A585A /* Release */, 3641 3104AFE6156D3682000A585A /* Release */,
3642 318387F415DC30CC008E4EA0 /* WE */,
3367 ); 3643 );
3368 defaultConfigurationIsVisible = 0; 3644 defaultConfigurationIsVisible = 0;
3369 defaultConfigurationName = Release; 3645 defaultConfigurationName = Release;
@@ -3373,6 +3649,7 @@
3373 buildConfigurations = ( 3649 buildConfigurations = (
3374 3104AFF3156D37A0000A585A /* Debug */, 3650 3104AFF3156D37A0000A585A /* Debug */,
3375 3104AFF4156D37A0000A585A /* Release */, 3651 3104AFF4156D37A0000A585A /* Release */,
3652 318387EC15DC30CC008E4EA0 /* WE */,
3376 ); 3653 );
3377 defaultConfigurationIsVisible = 0; 3654 defaultConfigurationIsVisible = 0;
3378 defaultConfigurationName = Release; 3655 defaultConfigurationName = Release;
@@ -3382,6 +3659,7 @@
3382 buildConfigurations = ( 3659 buildConfigurations = (
3383 3104B011156D38F3000A585A /* Debug */, 3660 3104B011156D38F3000A585A /* Debug */,
3384 3104B012156D38F3000A585A /* Release */, 3661 3104B012156D38F3000A585A /* Release */,
3662 318387F515DC30CC008E4EA0 /* WE */,
3385 ); 3663 );
3386 defaultConfigurationIsVisible = 0; 3664 defaultConfigurationIsVisible = 0;
3387 defaultConfigurationName = Release; 3665 defaultConfigurationName = Release;
@@ -3391,6 +3669,7 @@
3391 buildConfigurations = ( 3669 buildConfigurations = (
3392 3104B02A156D39D4000A585A /* Debug */, 3670 3104B02A156D39D4000A585A /* Debug */,
3393 3104B02B156D39D4000A585A /* Release */, 3671 3104B02B156D39D4000A585A /* Release */,
3672 318387F615DC30CC008E4EA0 /* WE */,
3394 ); 3673 );
3395 defaultConfigurationIsVisible = 0; 3674 defaultConfigurationIsVisible = 0;
3396 defaultConfigurationName = Release; 3675 defaultConfigurationName = Release;
@@ -3400,6 +3679,7 @@
3400 buildConfigurations = ( 3679 buildConfigurations = (
3401 3104B045156D3AD8000A585A /* Debug */, 3680 3104B045156D3AD8000A585A /* Debug */,
3402 3104B046156D3AD8000A585A /* Release */, 3681 3104B046156D3AD8000A585A /* Release */,
3682 318387F715DC30CC008E4EA0 /* WE */,
3403 ); 3683 );
3404 defaultConfigurationIsVisible = 0; 3684 defaultConfigurationIsVisible = 0;
3405 defaultConfigurationName = Release; 3685 defaultConfigurationName = Release;
@@ -3409,6 +3689,7 @@
3409 buildConfigurations = ( 3689 buildConfigurations = (
3410 3114A597156E913C001E0AA3 /* Debug */, 3690 3114A597156E913C001E0AA3 /* Debug */,
3411 3114A598156E913C001E0AA3 /* Release */, 3691 3114A598156E913C001E0AA3 /* Release */,
3692 318387FE15DC30CC008E4EA0 /* WE */,
3412 ); 3693 );
3413 defaultConfigurationIsVisible = 0; 3694 defaultConfigurationIsVisible = 0;
3414 defaultConfigurationName = Release; 3695 defaultConfigurationName = Release;
@@ -3418,6 +3699,7 @@
3418 buildConfigurations = ( 3699 buildConfigurations = (
3419 3114A5AF156E92C0001E0AA3 /* Debug */, 3700 3114A5AF156E92C0001E0AA3 /* Debug */,
3420 3114A5B0156E92C0001E0AA3 /* Release */, 3701 3114A5B0156E92C0001E0AA3 /* Release */,
3702 318387FF15DC30CC008E4EA0 /* WE */,
3421 ); 3703 );
3422 defaultConfigurationIsVisible = 0; 3704 defaultConfigurationIsVisible = 0;
3423 defaultConfigurationName = Release; 3705 defaultConfigurationName = Release;
@@ -3427,6 +3709,7 @@
3427 buildConfigurations = ( 3709 buildConfigurations = (
3428 3114A5C5156E9315001E0AA3 /* Debug */, 3710 3114A5C5156E9315001E0AA3 /* Debug */,
3429 3114A5C6156E9315001E0AA3 /* Release */, 3711 3114A5C6156E9315001E0AA3 /* Release */,
3712 3183880015DC30CC008E4EA0 /* WE */,
3430 ); 3713 );
3431 defaultConfigurationIsVisible = 0; 3714 defaultConfigurationIsVisible = 0;
3432 defaultConfigurationName = Release; 3715 defaultConfigurationName = Release;
@@ -3436,6 +3719,7 @@
3436 buildConfigurations = ( 3719 buildConfigurations = (
3437 3114A5DE156E93A0001E0AA3 /* Debug */, 3720 3114A5DE156E93A0001E0AA3 /* Debug */,
3438 3114A5DF156E93A0001E0AA3 /* Release */, 3721 3114A5DF156E93A0001E0AA3 /* Release */,
3722 3183880115DC30CC008E4EA0 /* WE */,
3439 ); 3723 );
3440 defaultConfigurationIsVisible = 0; 3724 defaultConfigurationIsVisible = 0;
3441 defaultConfigurationName = Release; 3725 defaultConfigurationName = Release;
@@ -3445,6 +3729,7 @@
3445 buildConfigurations = ( 3729 buildConfigurations = (
3446 3114A5F7156E93E7001E0AA3 /* Debug */, 3730 3114A5F7156E93E7001E0AA3 /* Debug */,
3447 3114A5F8156E93E7001E0AA3 /* Release */, 3731 3114A5F8156E93E7001E0AA3 /* Release */,
3732 3183880215DC30CC008E4EA0 /* WE */,
3448 ); 3733 );
3449 defaultConfigurationIsVisible = 0; 3734 defaultConfigurationIsVisible = 0;
3450 defaultConfigurationName = Release; 3735 defaultConfigurationName = Release;
@@ -3454,6 +3739,7 @@
3454 buildConfigurations = ( 3739 buildConfigurations = (
3455 3114A60D156E9430001E0AA3 /* Debug */, 3740 3114A60D156E9430001E0AA3 /* Debug */,
3456 3114A60E156E9430001E0AA3 /* Release */, 3741 3114A60E156E9430001E0AA3 /* Release */,
3742 3183880315DC30CC008E4EA0 /* WE */,
3457 ); 3743 );
3458 defaultConfigurationIsVisible = 0; 3744 defaultConfigurationIsVisible = 0;
3459 defaultConfigurationName = Release; 3745 defaultConfigurationName = Release;
@@ -3463,6 +3749,7 @@
3463 buildConfigurations = ( 3749 buildConfigurations = (
3464 3114A624156E9485001E0AA3 /* Debug */, 3750 3114A624156E9485001E0AA3 /* Debug */,
3465 3114A625156E9485001E0AA3 /* Release */, 3751 3114A625156E9485001E0AA3 /* Release */,
3752 3183880415DC30CC008E4EA0 /* WE */,
3466 ); 3753 );
3467 defaultConfigurationIsVisible = 0; 3754 defaultConfigurationIsVisible = 0;
3468 defaultConfigurationName = Release; 3755 defaultConfigurationName = Release;
@@ -3472,6 +3759,7 @@
3472 buildConfigurations = ( 3759 buildConfigurations = (
3473 3114A63B156E94DB001E0AA3 /* Debug */, 3760 3114A63B156E94DB001E0AA3 /* Debug */,
3474 3114A63C156E94DB001E0AA3 /* Release */, 3761 3114A63C156E94DB001E0AA3 /* Release */,
3762 3183880515DC30CC008E4EA0 /* WE */,
3475 ); 3763 );
3476 defaultConfigurationIsVisible = 0; 3764 defaultConfigurationIsVisible = 0;
3477 defaultConfigurationName = Release; 3765 defaultConfigurationName = Release;
@@ -3481,6 +3769,7 @@
3481 buildConfigurations = ( 3769 buildConfigurations = (
3482 3114A654156E9596001E0AA3 /* Debug */, 3770 3114A654156E9596001E0AA3 /* Debug */,
3483 3114A655156E9596001E0AA3 /* Release */, 3771 3114A655156E9596001E0AA3 /* Release */,
3772 3183880615DC30CC008E4EA0 /* WE */,
3484 ); 3773 );
3485 defaultConfigurationIsVisible = 0; 3774 defaultConfigurationIsVisible = 0;
3486 defaultConfigurationName = Release; 3775 defaultConfigurationName = Release;
@@ -3490,6 +3779,7 @@
3490 buildConfigurations = ( 3779 buildConfigurations = (
3491 3114A66A156E95D9001E0AA3 /* Debug */, 3780 3114A66A156E95D9001E0AA3 /* Debug */,
3492 3114A66B156E95D9001E0AA3 /* Release */, 3781 3114A66B156E95D9001E0AA3 /* Release */,
3782 3183880715DC30CC008E4EA0 /* WE */,
3493 ); 3783 );
3494 defaultConfigurationIsVisible = 0; 3784 defaultConfigurationIsVisible = 0;
3495 defaultConfigurationName = Release; 3785 defaultConfigurationName = Release;
@@ -3499,6 +3789,7 @@
3499 buildConfigurations = ( 3789 buildConfigurations = (
3500 3114A684156E9669001E0AA3 /* Debug */, 3790 3114A684156E9669001E0AA3 /* Debug */,
3501 3114A685156E9669001E0AA3 /* Release */, 3791 3114A685156E9669001E0AA3 /* Release */,
3792 3183880815DC30CC008E4EA0 /* WE */,
3502 ); 3793 );
3503 defaultConfigurationIsVisible = 0; 3794 defaultConfigurationIsVisible = 0;
3504 defaultConfigurationName = Release; 3795 defaultConfigurationName = Release;
@@ -3508,6 +3799,7 @@
3508 buildConfigurations = ( 3799 buildConfigurations = (
3509 3114A69D156E971B001E0AA3 /* Debug */, 3800 3114A69D156E971B001E0AA3 /* Debug */,
3510 3114A69E156E971B001E0AA3 /* Release */, 3801 3114A69E156E971B001E0AA3 /* Release */,
3802 3183880915DC30CC008E4EA0 /* WE */,
3511 ); 3803 );
3512 defaultConfigurationIsVisible = 0; 3804 defaultConfigurationIsVisible = 0;
3513 defaultConfigurationName = Release; 3805 defaultConfigurationName = Release;
@@ -3517,6 +3809,7 @@
3517 buildConfigurations = ( 3809 buildConfigurations = (
3518 3114A6B4156E9759001E0AA3 /* Debug */, 3810 3114A6B4156E9759001E0AA3 /* Debug */,
3519 3114A6B5156E9759001E0AA3 /* Release */, 3811 3114A6B5156E9759001E0AA3 /* Release */,
3812 3183880A15DC30CC008E4EA0 /* WE */,
3520 ); 3813 );
3521 defaultConfigurationIsVisible = 0; 3814 defaultConfigurationIsVisible = 0;
3522 defaultConfigurationName = Release; 3815 defaultConfigurationName = Release;
@@ -3526,6 +3819,7 @@
3526 buildConfigurations = ( 3819 buildConfigurations = (
3527 3114A6CE156E9815001E0AA3 /* Debug */, 3820 3114A6CE156E9815001E0AA3 /* Debug */,
3528 3114A6CF156E9815001E0AA3 /* Release */, 3821 3114A6CF156E9815001E0AA3 /* Release */,
3822 3183880B15DC30CC008E4EA0 /* WE */,
3529 ); 3823 );
3530 defaultConfigurationIsVisible = 0; 3824 defaultConfigurationIsVisible = 0;
3531 defaultConfigurationName = Release; 3825 defaultConfigurationName = Release;
@@ -3535,6 +3829,7 @@
3535 buildConfigurations = ( 3829 buildConfigurations = (
3536 3124CAC0156BE3EC00753214 /* Debug */, 3830 3124CAC0156BE3EC00753214 /* Debug */,
3537 3124CAC1156BE3EC00753214 /* Release */, 3831 3124CAC1156BE3EC00753214 /* Release */,
3832 318387F015DC30CC008E4EA0 /* WE */,
3538 ); 3833 );
3539 defaultConfigurationIsVisible = 0; 3834 defaultConfigurationIsVisible = 0;
3540 defaultConfigurationName = Release; 3835 defaultConfigurationName = Release;
@@ -3544,6 +3839,7 @@
3544 buildConfigurations = ( 3839 buildConfigurations = (
3545 3124CADC156BE64A00753214 /* Debug */, 3840 3124CADC156BE64A00753214 /* Debug */,
3546 3124CADD156BE64A00753214 /* Release */, 3841 3124CADD156BE64A00753214 /* Release */,
3842 318387F215DC30CC008E4EA0 /* WE */,
3547 ); 3843 );
3548 defaultConfigurationIsVisible = 0; 3844 defaultConfigurationIsVisible = 0;
3549 defaultConfigurationName = Release; 3845 defaultConfigurationName = Release;
@@ -3553,6 +3849,7 @@
3553 buildConfigurations = ( 3849 buildConfigurations = (
3554 3124CAF3156BE7F300753214 /* Debug */, 3850 3124CAF3156BE7F300753214 /* Debug */,
3555 3124CAF4156BE7F300753214 /* Release */, 3851 3124CAF4156BE7F300753214 /* Release */,
3852 318387EE15DC30CC008E4EA0 /* WE */,
3556 ); 3853 );
3557 defaultConfigurationIsVisible = 0; 3854 defaultConfigurationIsVisible = 0;
3558 defaultConfigurationName = Release; 3855 defaultConfigurationName = Release;
@@ -3562,6 +3859,7 @@
3562 buildConfigurations = ( 3859 buildConfigurations = (
3563 31D60015156D3CB200337B26 /* Debug */, 3860 31D60015156D3CB200337B26 /* Debug */,
3564 31D60016156D3CB200337B26 /* Release */, 3861 31D60016156D3CB200337B26 /* Release */,
3862 318387F815DC30CC008E4EA0 /* WE */,
3565 ); 3863 );
3566 defaultConfigurationIsVisible = 0; 3864 defaultConfigurationIsVisible = 0;
3567 defaultConfigurationName = Release; 3865 defaultConfigurationName = Release;
@@ -3571,6 +3869,7 @@
3571 buildConfigurations = ( 3869 buildConfigurations = (
3572 31D6002F156D3D3F00337B26 /* Debug */, 3870 31D6002F156D3D3F00337B26 /* Debug */,
3573 31D60030156D3D3F00337B26 /* Release */, 3871 31D60030156D3D3F00337B26 /* Release */,
3872 318387F915DC30CC008E4EA0 /* WE */,
3574 ); 3873 );
3575 defaultConfigurationIsVisible = 0; 3874 defaultConfigurationIsVisible = 0;
3576 defaultConfigurationName = Release; 3875 defaultConfigurationName = Release;
@@ -3580,6 +3879,7 @@
3580 buildConfigurations = ( 3879 buildConfigurations = (
3581 31D60046156D3EC700337B26 /* Debug */, 3880 31D60046156D3EC700337B26 /* Debug */,
3582 31D60047156D3EC700337B26 /* Release */, 3881 31D60047156D3EC700337B26 /* Release */,
3882 318387FA15DC30CC008E4EA0 /* WE */,
3583 ); 3883 );
3584 defaultConfigurationIsVisible = 0; 3884 defaultConfigurationIsVisible = 0;
3585 defaultConfigurationName = Release; 3885 defaultConfigurationName = Release;
@@ -3589,6 +3889,7 @@
3589 buildConfigurations = ( 3889 buildConfigurations = (
3590 31D6005C156D3F3500337B26 /* Debug */, 3890 31D6005C156D3F3500337B26 /* Debug */,
3591 31D6005D156D3F3500337B26 /* Release */, 3891 31D6005D156D3F3500337B26 /* Release */,
3892 318387FB15DC30CC008E4EA0 /* WE */,
3592 ); 3893 );
3593 defaultConfigurationIsVisible = 0; 3894 defaultConfigurationIsVisible = 0;
3594 defaultConfigurationName = Release; 3895 defaultConfigurationName = Release;
@@ -3598,6 +3899,7 @@
3598 buildConfigurations = ( 3899 buildConfigurations = (
3599 31D60079156D3FBC00337B26 /* Debug */, 3900 31D60079156D3FBC00337B26 /* Debug */,
3600 31D6007A156D3FBC00337B26 /* Release */, 3901 31D6007A156D3FBC00337B26 /* Release */,
3902 318387FC15DC30CC008E4EA0 /* WE */,
3601 ); 3903 );
3602 defaultConfigurationIsVisible = 0; 3904 defaultConfigurationIsVisible = 0;
3603 defaultConfigurationName = Release; 3905 defaultConfigurationName = Release;
@@ -3607,6 +3909,7 @@
3607 buildConfigurations = ( 3909 buildConfigurations = (
3608 31D60094156D402900337B26 /* Debug */, 3910 31D60094156D402900337B26 /* Debug */,
3609 31D60095156D402900337B26 /* Release */, 3911 31D60095156D402900337B26 /* Release */,
3912 318387FD15DC30CC008E4EA0 /* WE */,
3610 ); 3913 );
3611 defaultConfigurationIsVisible = 0; 3914 defaultConfigurationIsVisible = 0;
3612 defaultConfigurationName = Release; 3915 defaultConfigurationName = Release;
@@ -3616,6 +3919,7 @@
3616 buildConfigurations = ( 3919 buildConfigurations = (
3617 31EEABDF156AAE9E00714D05 /* Debug */, 3920 31EEABDF156AAE9E00714D05 /* Debug */,
3618 31EEABE0156AAE9E00714D05 /* Release */, 3921 31EEABE0156AAE9E00714D05 /* Release */,
3922 318387EB15DC30CC008E4EA0 /* WE */,
3619 ); 3923 );
3620 defaultConfigurationIsVisible = 0; 3924 defaultConfigurationIsVisible = 0;
3621 defaultConfigurationName = Release; 3925 defaultConfigurationName = Release;
@@ -3625,6 +3929,7 @@
3625 buildConfigurations = ( 3929 buildConfigurations = (
3626 31EEABFD156AAF9D00714D05 /* Debug */, 3930 31EEABFD156AAF9D00714D05 /* Debug */,
3627 31EEABFE156AAF9D00714D05 /* Release */, 3931 31EEABFE156AAF9D00714D05 /* Release */,
3932 318387ED15DC30CC008E4EA0 /* WE */,
3628 ); 3933 );
3629 defaultConfigurationIsVisible = 0; 3934 defaultConfigurationIsVisible = 0;
3630 defaultConfigurationName = Release; 3935 defaultConfigurationName = Release;
@@ -3634,6 +3939,7 @@
3634 buildConfigurations = ( 3939 buildConfigurations = (
3635 31EEAC6D156AB52600714D05 /* Debug */, 3940 31EEAC6D156AB52600714D05 /* Debug */,
3636 31EEAC6E156AB52600714D05 /* Release */, 3941 31EEAC6E156AB52600714D05 /* Release */,
3942 318387F115DC30CC008E4EA0 /* WE */,
3637 ); 3943 );
3638 defaultConfigurationIsVisible = 0; 3944 defaultConfigurationIsVisible = 0;
3639 defaultConfigurationName = Release; 3945 defaultConfigurationName = Release;
diff --git a/mps/code/mpsi.c b/mps/code/mpsi.c
index 3a356f5d50a..aa60a7ed70b 100644
--- a/mps/code/mpsi.c
+++ b/mps/code/mpsi.c
@@ -73,7 +73,7 @@ static Bool mpsi_check(void)
73 /* .check.rc: Check that external and internal result codes match. */ 73 /* .check.rc: Check that external and internal result codes match. */
74 /* See <code/mps.h#result-codes> and <code/mpmtypes.h#result-codes>. */ 74 /* See <code/mps.h#result-codes> and <code/mpmtypes.h#result-codes>. */
75 /* Also see .check.enum.cast. */ 75 /* Also see .check.enum.cast. */
76 CHECKL(CHECKTYPE(mps_res_t, Res)); 76 CHECKL(COMPATTYPE(mps_res_t, Res));
77 CHECKL((int)MPS_RES_OK == (int)ResOK); 77 CHECKL((int)MPS_RES_OK == (int)ResOK);
78 CHECKL((int)MPS_RES_FAIL == (int)ResFAIL); 78 CHECKL((int)MPS_RES_FAIL == (int)ResFAIL);
79 CHECKL((int)MPS_RES_RESOURCE == (int)ResRESOURCE); 79 CHECKL((int)MPS_RES_RESOURCE == (int)ResRESOURCE);
@@ -86,7 +86,7 @@ static Bool mpsi_check(void)
86 /* Check that external and internal rank numbers match. */ 86 /* Check that external and internal rank numbers match. */
87 /* See <code/mps.h#ranks> and <code/mpmtypes.h#ranks>. */ 87 /* See <code/mps.h#ranks> and <code/mpmtypes.h#ranks>. */
88 /* Also see .check.enum.cast. */ 88 /* Also see .check.enum.cast. */
89 CHECKL(CHECKTYPE(mps_rank_t, Rank)); 89 CHECKL(COMPATTYPE(mps_rank_t, Rank));
90 CHECKL((int)MPS_RANK_AMBIG == (int)RankAMBIG); 90 CHECKL((int)MPS_RANK_AMBIG == (int)RankAMBIG);
91 CHECKL((int)MPS_RANK_EXACT == (int)RankEXACT); 91 CHECKL((int)MPS_RANK_EXACT == (int)RankEXACT);
92 CHECKL((int)MPS_RANK_WEAK == (int)RankWEAK); 92 CHECKL((int)MPS_RANK_WEAK == (int)RankWEAK);
@@ -95,7 +95,7 @@ static Bool mpsi_check(void)
95 /* See <code/mps.h#message.types> and */ 95 /* See <code/mps.h#message.types> and */
96 /* <code/mpmtypes.h#message.types>. */ 96 /* <code/mpmtypes.h#message.types>. */
97 /* Also see .check.enum.cast. */ 97 /* Also see .check.enum.cast. */
98 CHECKL(CHECKTYPE(mps_message_type_t, MessageType)); 98 CHECKL(COMPATTYPE(mps_message_type_t, MessageType));
99 CHECKL((int)MessageTypeFINALIZATION 99 CHECKL((int)MessageTypeFINALIZATION
100 == (int)MPS_MESSAGE_TYPE_FINALIZATION); 100 == (int)MPS_MESSAGE_TYPE_FINALIZATION);
101 CHECKL((int)MessageTypeGC 101 CHECKL((int)MessageTypeGC
@@ -106,74 +106,74 @@ static Bool mpsi_check(void)
106 /* The external idea of a word width and the internal one */ 106 /* The external idea of a word width and the internal one */
107 /* had better match. See <design/interface-c/#cons>. */ 107 /* had better match. See <design/interface-c/#cons>. */
108 CHECKL(sizeof(mps_word_t) == sizeof(void *)); 108 CHECKL(sizeof(mps_word_t) == sizeof(void *));
109 CHECKL(CHECKTYPE(mps_word_t, Word)); 109 CHECKL(COMPATTYPE(mps_word_t, Word));
110 110
111 /* The external idea of an address and the internal one */ 111 /* The external idea of an address and the internal one */
112 /* had better match. */ 112 /* had better match. */
113 CHECKL(CHECKTYPE(mps_addr_t, Addr)); 113 CHECKL(COMPATTYPE(mps_addr_t, Addr));
114 114
115 /* The external idea of size and the internal one had */ 115 /* The external idea of size and the internal one had */
116 /* better match. See <design/interface-c/#cons.size> */ 116 /* better match. See <design/interface-c/#cons.size> */
117 /* and <design/interface-c/#pun.size>. */ 117 /* and <design/interface-c/#pun.size>. */
118 CHECKL(CHECKTYPE(size_t, Size)); 118 CHECKL(COMPATTYPE(size_t, Size));
119 119
120 /* Clock values are passed from external to internal and back */ 120 /* Clock values are passed from external to internal and back */
121 /* out to external. */ 121 /* out to external. */
122 CHECKL(CHECKTYPE(mps_clock_t, Clock)); 122 CHECKL(COMPATTYPE(mps_clock_t, Clock));
123 123
124 /* Check ap_s/APStruct compatibility by hand */ 124 /* Check ap_s/APStruct compatibility by hand */
125 /* .check.ap: See <code/mps.h#ap> and <code/buffer.h#ap>. */ 125 /* .check.ap: See <code/mps.h#ap> and <code/buffer.h#ap>. */
126 CHECKL(sizeof(mps_ap_s) == sizeof(APStruct)); 126 CHECKL(sizeof(mps_ap_s) == sizeof(APStruct));
127 CHECKL(CHECKFIELD(mps_ap_s, init, APStruct, init)); 127 CHECKL(COMPATFIELD(mps_ap_s, init, APStruct, init));
128 CHECKL(CHECKFIELD(mps_ap_s, alloc, APStruct, alloc)); 128 CHECKL(COMPATFIELD(mps_ap_s, alloc, APStruct, alloc));
129 CHECKL(CHECKFIELD(mps_ap_s, limit, APStruct, limit)); 129 CHECKL(COMPATFIELD(mps_ap_s, limit, APStruct, limit));
130 130
131 /* Check sac_s/ExternalSACStruct compatibility by hand */ 131 /* Check sac_s/ExternalSACStruct compatibility by hand */
132 /* See <code/mps.h#sac> and <code/sac.h#sac>. */ 132 /* See <code/mps.h#sac> and <code/sac.h#sac>. */
133 CHECKL(sizeof(mps_sac_s) == sizeof(ExternalSACStruct)); 133 CHECKL(sizeof(mps_sac_s) == sizeof(ExternalSACStruct));
134 CHECKL(CHECKFIELD(mps_sac_s, mps_middle, ExternalSACStruct, middle)); 134 CHECKL(COMPATFIELD(mps_sac_s, mps_middle, ExternalSACStruct, middle));
135 CHECKL(CHECKFIELD(mps_sac_s, mps_trapped, 135 CHECKL(COMPATFIELD(mps_sac_s, mps_trapped,
136 ExternalSACStruct, trapped)); 136 ExternalSACStruct, trapped));
137 CHECKL(CHECKFIELDAPPROX(mps_sac_s, mps_freelists, 137 CHECKL(COMPATFIELDAPPROX(mps_sac_s, mps_freelists,
138 ExternalSACStruct, freelists)); 138 ExternalSACStruct, freelists));
139 CHECKL(sizeof(mps_sac_freelist_block_s) 139 CHECKL(sizeof(mps_sac_freelist_block_s)
140 == sizeof(SACFreeListBlockStruct)); 140 == sizeof(SACFreeListBlockStruct));
141 CHECKL(CHECKFIELD(mps_sac_freelist_block_s, mps_size, 141 CHECKL(COMPATFIELD(mps_sac_freelist_block_s, mps_size,
142 SACFreeListBlockStruct, size)); 142 SACFreeListBlockStruct, size));
143 CHECKL(CHECKFIELD(mps_sac_freelist_block_s, mps_count, 143 CHECKL(COMPATFIELD(mps_sac_freelist_block_s, mps_count,
144 SACFreeListBlockStruct, count)); 144 SACFreeListBlockStruct, count));
145 CHECKL(CHECKFIELD(mps_sac_freelist_block_s, mps_count_max, 145 CHECKL(COMPATFIELD(mps_sac_freelist_block_s, mps_count_max,
146 SACFreeListBlockStruct, countMax)); 146 SACFreeListBlockStruct, countMax));
147 CHECKL(CHECKFIELD(mps_sac_freelist_block_s, mps_blocks, 147 CHECKL(COMPATFIELD(mps_sac_freelist_block_s, mps_blocks,
148 SACFreeListBlockStruct, blocks)); 148 SACFreeListBlockStruct, blocks));
149 149
150 /* Check sac_classes_s/SACClassesStruct compatibility by hand */ 150 /* Check sac_classes_s/SACClassesStruct compatibility by hand */
151 /* See <code/mps.h#sacc> and <code/sac.h#sacc>. */ 151 /* See <code/mps.h#sacc> and <code/sac.h#sacc>. */
152 CHECKL(sizeof(mps_sac_classes_s) == sizeof(SACClassesStruct)); 152 CHECKL(sizeof(mps_sac_classes_s) == sizeof(SACClassesStruct));
153 CHECKL(CHECKFIELD(mps_sac_classes_s, mps_block_size, 153 CHECKL(COMPATFIELD(mps_sac_classes_s, mps_block_size,
154 SACClassesStruct, blockSize)); 154 SACClassesStruct, blockSize));
155 CHECKL(CHECKFIELD(mps_sac_classes_s, mps_cached_count, 155 CHECKL(COMPATFIELD(mps_sac_classes_s, mps_cached_count,
156 SACClassesStruct, cachedCount)); 156 SACClassesStruct, cachedCount));
157 CHECKL(CHECKFIELD(mps_sac_classes_s, mps_frequency, 157 CHECKL(COMPATFIELD(mps_sac_classes_s, mps_frequency,
158 SACClassesStruct, frequency)); 158 SACClassesStruct, frequency));
159 159
160 /* Check ss_s/ScanStateStruct compatibility by hand */ 160 /* Check ss_s/ScanStateStruct compatibility by hand */
161 /* .check.ss: See <code/mps.h#ss> and <code/mpmst.h#ss>. */ 161 /* .check.ss: See <code/mps.h#ss> and <code/mpmst.h#ss>. */
162 /* Note that the size of the mps_ss_s and ScanStateStruct */ 162 /* Note that the size of the mps_ss_s and ScanStateStruct */
163 /* are not equal. See <code/mpmst.h#ss>. CHECKFIELDAPPROX */ 163 /* are not equal. See <code/mpmst.h#ss>. COMPATFIELDAPPROX */
164 /* is used on the fix field because its type is punned and */ 164 /* is used on the fix field because its type is punned and */
165 /* therefore isn't exactly checkable. See */ 165 /* therefore isn't exactly checkable. See */
166 /* <design/interface-c/#pun.addr>. */ 166 /* <design/interface-c/#pun.addr>. */
167 CHECKL(CHECKFIELDAPPROX(mps_ss_s, fix, ScanStateStruct, fix)); 167 CHECKL(COMPATFIELDAPPROX(mps_ss_s, fix, ScanStateStruct, fix));
168 CHECKL(CHECKFIELD(mps_ss_s, w0, ScanStateStruct, zoneShift)); 168 CHECKL(COMPATFIELD(mps_ss_s, w0, ScanStateStruct, zoneShift));
169 CHECKL(CHECKFIELD(mps_ss_s, w1, ScanStateStruct, white)); 169 CHECKL(COMPATFIELD(mps_ss_s, w1, ScanStateStruct, white));
170 CHECKL(CHECKFIELD(mps_ss_s, w2, ScanStateStruct, unfixedSummary)); 170 CHECKL(COMPATFIELD(mps_ss_s, w2, ScanStateStruct, unfixedSummary));
171 171
172 /* Check ld_s/LDStruct compatibility by hand */ 172 /* Check ld_s/LDStruct compatibility by hand */
173 /* .check.ld: See also <code/mpmst.h#ld.struct> and <code/mps.h#ld> */ 173 /* .check.ld: See also <code/mpmst.h#ld.struct> and <code/mps.h#ld> */
174 CHECKL(sizeof(mps_ld_s) == sizeof(LDStruct)); 174 CHECKL(sizeof(mps_ld_s) == sizeof(LDStruct));
175 CHECKL(CHECKFIELD(mps_ld_s, w0, LDStruct, epoch)); 175 CHECKL(COMPATFIELD(mps_ld_s, w0, LDStruct, epoch));
176 CHECKL(CHECKFIELD(mps_ld_s, w1, LDStruct, rs)); 176 CHECKL(COMPATFIELD(mps_ld_s, w1, LDStruct, rs));
177 177
178 return TRUE; 178 return TRUE;
179} 179}
@@ -459,13 +459,6 @@ mps_res_t mps_arena_create_v(mps_arena_t *mps_arena_o,
459 return MPS_RES_OK; 459 return MPS_RES_OK;
460} 460}
461 461
462/* DEPRECATED */
463mps_res_t mps_space_create(mps_space_t *mps_space_o)
464{
465 return mps_arena_create(mps_space_o, mps_arena_class_vm(), ARENA_SIZE);
466}
467
468
469/* mps_arena_destroy -- destroy an arena object */ 462/* mps_arena_destroy -- destroy an arena object */
470 463
471void mps_arena_destroy(mps_arena_t mps_arena) 464void mps_arena_destroy(mps_arena_t mps_arena)
@@ -476,12 +469,6 @@ void mps_arena_destroy(mps_arena_t mps_arena)
476 ArenaDestroy(arena); 469 ArenaDestroy(arena);
477} 470}
478 471
479/* DEPRECATED */
480void mps_space_destroy(mps_space_t mps_space)
481{
482 mps_arena_destroy(mps_space);
483}
484
485 472
486/* mps_arena_has_addr -- is this address managed by this arena? */ 473/* mps_arena_has_addr -- is this address managed by this arena? */
487 474
@@ -726,7 +713,7 @@ void mps_fmt_destroy(mps_fmt_t mps_fmt)
726 Format format = (Format)mps_fmt; 713 Format format = (Format)mps_fmt;
727 Arena arena; 714 Arena arena;
728 715
729 AVER(CHECKT(Format, format)); 716 AVER(TESTT(Format, format));
730 arena = FormatArena(format); 717 arena = FormatArena(format);
731 718
732 ArenaEnter(arena); 719 ArenaEnter(arena);
@@ -776,7 +763,7 @@ void mps_pool_destroy(mps_pool_t mps_pool)
776 Pool pool = (Pool)mps_pool; 763 Pool pool = (Pool)mps_pool;
777 Arena arena; 764 Arena arena;
778 765
779 AVER(CHECKT(Pool, pool)); 766 AVER(TESTT(Pool, pool));
780 arena = PoolArena(pool); 767 arena = PoolArena(pool);
781 768
782 ArenaEnter(arena); 769 ArenaEnter(arena);
@@ -794,7 +781,7 @@ mps_res_t mps_alloc(mps_addr_t *p_o, mps_pool_t mps_pool, size_t size, ...)
794 Addr p; 781 Addr p;
795 Res res; 782 Res res;
796 783
797 AVER(CHECKT(Pool, pool)); 784 AVER(TESTT(Pool, pool));
798 arena = PoolArena(pool); 785 arena = PoolArena(pool);
799 786
800 ArenaEnter(arena); 787 ArenaEnter(arena);
@@ -836,7 +823,7 @@ void mps_free(mps_pool_t mps_pool, mps_addr_t p, size_t size)
836 Pool pool = (Pool)mps_pool; 823 Pool pool = (Pool)mps_pool;
837 Arena arena; 824 Arena arena;
838 825
839 AVER(CHECKT(Pool, pool)); 826 AVER(TESTT(Pool, pool));
840 arena = PoolArena(pool); 827 arena = PoolArena(pool);
841 828
842 ArenaEnter(arena); 829 ArenaEnter(arena);
@@ -864,7 +851,7 @@ mps_res_t mps_ap_create(mps_ap_t *mps_ap_o, mps_pool_t mps_pool, ...)
864 va_list args; 851 va_list args;
865 852
866 AVER(mps_ap_o != NULL); 853 AVER(mps_ap_o != NULL);
867 AVER(CHECKT(Pool, pool)); 854 AVER(TESTT(Pool, pool));
868 arena = PoolArena(pool); 855 arena = PoolArena(pool);
869 856
870 ArenaEnter(arena); 857 ArenaEnter(arena);
@@ -897,7 +884,7 @@ mps_res_t mps_ap_create_v(mps_ap_t *mps_ap_o, mps_pool_t mps_pool,
897 Res res; 884 Res res;
898 885
899 AVER(mps_ap_o != NULL); 886 AVER(mps_ap_o != NULL);
900 AVER(CHECKT(Pool, pool)); 887 AVER(TESTT(Pool, pool));
901 arena = PoolArena(pool); 888 arena = PoolArena(pool);
902 889
903 ArenaEnter(arena); 890 ArenaEnter(arena);
@@ -921,7 +908,7 @@ void mps_ap_destroy(mps_ap_t mps_ap)
921 Arena arena; 908 Arena arena;
922 909
923 AVER(mps_ap != NULL); 910 AVER(mps_ap != NULL);
924 AVER(CHECKT(Buffer, buf)); 911 AVER(TESTT(Buffer, buf));
925 arena = BufferArena(buf); 912 arena = BufferArena(buf);
926 913
927 ArenaEnter(arena); 914 ArenaEnter(arena);
@@ -945,7 +932,7 @@ mps_res_t (mps_reserve)(mps_addr_t *p_o, mps_ap_t mps_ap, size_t size)
945 932
946 AVER(p_o != NULL); 933 AVER(p_o != NULL);
947 AVER(mps_ap != NULL); 934 AVER(mps_ap != NULL);
948 AVER(CHECKT(Buffer, BufferOfAP((AP)mps_ap))); 935 AVER(TESTT(Buffer, BufferOfAP((AP)mps_ap)));
949 AVER(mps_ap->init == mps_ap->alloc); 936 AVER(mps_ap->init == mps_ap->alloc);
950 AVER(size > 0); 937 AVER(size > 0);
951 938
@@ -964,7 +951,7 @@ mps_res_t mps_reserve_with_reservoir_permit(mps_addr_t *p_o,
964 AVER(p_o != NULL); 951 AVER(p_o != NULL);
965 AVER(size > 0); 952 AVER(size > 0);
966 AVER(mps_ap != NULL); 953 AVER(mps_ap != NULL);
967 AVER(CHECKT(Buffer, BufferOfAP((AP)mps_ap))); 954 AVER(TESTT(Buffer, BufferOfAP((AP)mps_ap)));
968 AVER(mps_ap->init == mps_ap->alloc); 955 AVER(mps_ap->init == mps_ap->alloc);
969 956
970 MPS_RESERVE_WITH_RESERVOIR_PERMIT_BLOCK(res, *p_o, mps_ap, size); 957 MPS_RESERVE_WITH_RESERVOIR_PERMIT_BLOCK(res, *p_o, mps_ap, size);
@@ -985,7 +972,7 @@ mps_res_t mps_reserve_with_reservoir_permit(mps_addr_t *p_o,
985mps_bool_t (mps_commit)(mps_ap_t mps_ap, mps_addr_t p, size_t size) 972mps_bool_t (mps_commit)(mps_ap_t mps_ap, mps_addr_t p, size_t size)
986{ 973{
987 AVER(mps_ap != NULL); 974 AVER(mps_ap != NULL);
988 AVER(CHECKT(Buffer, BufferOfAP((AP)mps_ap))); 975 AVER(TESTT(Buffer, BufferOfAP((AP)mps_ap)));
989 AVER(p != NULL); 976 AVER(p != NULL);
990 AVER(size > 0); 977 AVER(size > 0);
991 AVER(p == mps_ap->init); 978 AVER(p == mps_ap->init);
@@ -1027,7 +1014,7 @@ mps_res_t (mps_ap_frame_push)(mps_frame_t *frame_o, mps_ap_t mps_ap)
1027 AllocFrame frame; 1014 AllocFrame frame;
1028 Res res; 1015 Res res;
1029 1016
1030 AVER(CHECKT(Buffer, buf)); 1017 AVER(TESTT(Buffer, buf));
1031 arena = BufferArena(buf); 1018 arena = BufferArena(buf);
1032 1019
1033 ArenaEnter(arena); 1020 ArenaEnter(arena);
@@ -1070,7 +1057,7 @@ mps_res_t (mps_ap_frame_pop)(mps_ap_t mps_ap, mps_frame_t frame)
1070 Arena arena; 1057 Arena arena;
1071 Res res; 1058 Res res;
1072 1059
1073 AVER(CHECKT(Buffer, buf)); 1060 AVER(TESTT(Buffer, buf));
1074 arena = BufferArena(buf); 1061 arena = BufferArena(buf);
1075 1062
1076 ArenaEnter(arena); 1063 ArenaEnter(arena);
@@ -1097,7 +1084,7 @@ mps_res_t mps_ap_fill(mps_addr_t *p_o, mps_ap_t mps_ap, size_t size)
1097 Res res; 1084 Res res;
1098 1085
1099 AVER(mps_ap != NULL); 1086 AVER(mps_ap != NULL);
1100 AVER(CHECKT(Buffer, buf)); 1087 AVER(TESTT(Buffer, buf));
1101 arena = BufferArena(buf); 1088 arena = BufferArena(buf);
1102 1089
1103 ArenaEnter(arena); 1090 ArenaEnter(arena);
@@ -1128,7 +1115,7 @@ mps_res_t mps_ap_fill_with_reservoir_permit(mps_addr_t *p_o, mps_ap_t mps_ap,
1128 Res res; 1115 Res res;
1129 1116
1130 AVER(mps_ap != NULL); 1117 AVER(mps_ap != NULL);
1131 AVER(CHECKT(Buffer, buf)); 1118 AVER(TESTT(Buffer, buf));
1132 arena = BufferArena(buf); 1119 arena = BufferArena(buf);
1133 1120
1134 ArenaEnter(arena); 1121 ArenaEnter(arena);
@@ -1162,7 +1149,7 @@ mps_bool_t mps_ap_trip(mps_ap_t mps_ap, mps_addr_t p, size_t size)
1162 Bool b; 1149 Bool b;
1163 1150
1164 AVER(mps_ap != NULL); 1151 AVER(mps_ap != NULL);
1165 AVER(CHECKT(Buffer, buf)); 1152 AVER(TESTT(Buffer, buf));
1166 arena = BufferArena(buf); 1153 arena = BufferArena(buf);
1167 1154
1168 ArenaEnter(arena); 1155 ArenaEnter(arena);
@@ -1191,7 +1178,7 @@ mps_res_t mps_sac_create(mps_sac_t *mps_sac_o, mps_pool_t mps_pool,
1191 Res res; 1178 Res res;
1192 1179
1193 AVER(mps_sac_o != NULL); 1180 AVER(mps_sac_o != NULL);
1194 AVER(CHECKT(Pool, pool)); 1181 AVER(TESTT(Pool, pool));
1195 arena = PoolArena(pool); 1182 arena = PoolArena(pool);
1196 1183
1197 ArenaEnter(arena); 1184 ArenaEnter(arena);
@@ -1214,7 +1201,7 @@ void mps_sac_destroy(mps_sac_t mps_sac)
1214 SAC sac = SACOfExternalSAC((ExternalSAC)mps_sac); 1201 SAC sac = SACOfExternalSAC((ExternalSAC)mps_sac);
1215 Arena arena; 1202 Arena arena;
1216 1203
1217 AVER(CHECKT(SAC, sac)); 1204 AVER(TESTT(SAC, sac));
1218 arena = SACArena(sac); 1205 arena = SACArena(sac);
1219 1206
1220 ArenaEnter(arena); 1207 ArenaEnter(arena);
@@ -1232,7 +1219,7 @@ void mps_sac_flush(mps_sac_t mps_sac)
1232 SAC sac = SACOfExternalSAC((ExternalSAC)mps_sac); 1219 SAC sac = SACOfExternalSAC((ExternalSAC)mps_sac);
1233 Arena arena; 1220 Arena arena;
1234 1221
1235 AVER(CHECKT(SAC, sac)); 1222 AVER(TESTT(SAC, sac));
1236 arena = SACArena(sac); 1223 arena = SACArena(sac);
1237 1224
1238 ArenaEnter(arena); 1225 ArenaEnter(arena);
@@ -1250,11 +1237,11 @@ mps_res_t mps_sac_fill(mps_addr_t *p_o, mps_sac_t mps_sac, size_t size,
1250{ 1237{
1251 SAC sac = SACOfExternalSAC((ExternalSAC)mps_sac); 1238 SAC sac = SACOfExternalSAC((ExternalSAC)mps_sac);
1252 Arena arena; 1239 Arena arena;
1253 Addr p; 1240 Addr p = NULL; /* suppress "may be used uninitialized" */
1254 Res res; 1241 Res res;
1255 1242
1256 AVER(p_o != NULL); 1243 AVER(p_o != NULL);
1257 AVER(CHECKT(SAC, sac)); 1244 AVER(TESTT(SAC, sac));
1258 arena = SACArena(sac); 1245 arena = SACArena(sac);
1259 1246
1260 ArenaEnter(arena); 1247 ArenaEnter(arena);
@@ -1276,7 +1263,7 @@ void mps_sac_empty(mps_sac_t mps_sac, mps_addr_t p, size_t size)
1276 SAC sac = SACOfExternalSAC((ExternalSAC)mps_sac); 1263 SAC sac = SACOfExternalSAC((ExternalSAC)mps_sac);
1277 Arena arena; 1264 Arena arena;
1278 1265
1279 AVER(CHECKT(SAC, sac)); 1266 AVER(TESTT(SAC, sac));
1280 arena = SACArena(sac); 1267 arena = SACArena(sac);
1281 1268
1282 ArenaEnter(arena); 1269 ArenaEnter(arena);
@@ -1295,7 +1282,7 @@ mps_res_t mps_sac_alloc(mps_addr_t *p_o, mps_sac_t mps_sac, size_t size,
1295 Res res; 1282 Res res;
1296 1283
1297 AVER(p_o != NULL); 1284 AVER(p_o != NULL);
1298 AVER(CHECKT(SAC, SACOfExternalSAC((ExternalSAC)mps_sac))); 1285 AVER(TESTT(SAC, SACOfExternalSAC((ExternalSAC)mps_sac)));
1299 AVER(size > 0); 1286 AVER(size > 0);
1300 1287
1301 MPS_SAC_ALLOC_FAST(res, *p_o, mps_sac, size, (has_reservoir_permit != 0)); 1288 MPS_SAC_ALLOC_FAST(res, *p_o, mps_sac, size, (has_reservoir_permit != 0));
@@ -1307,7 +1294,7 @@ mps_res_t mps_sac_alloc(mps_addr_t *p_o, mps_sac_t mps_sac, size_t size,
1307 1294
1308void mps_sac_free(mps_sac_t mps_sac, mps_addr_t p, size_t size) 1295void mps_sac_free(mps_sac_t mps_sac, mps_addr_t p, size_t size)
1309{ 1296{
1310 AVER(CHECKT(SAC, SACOfExternalSAC((ExternalSAC)mps_sac))); 1297 AVER(TESTT(SAC, SACOfExternalSAC((ExternalSAC)mps_sac)));
1311 /* Can't check p outside arena lock */ 1298 /* Can't check p outside arena lock */
1312 AVER(size > 0); 1299 AVER(size > 0);
1313 1300
@@ -1940,7 +1927,7 @@ mps_res_t mps_ap_alloc_pattern_begin(mps_ap_t mps_ap,
1940 1927
1941 AVER(mps_ap != NULL); 1928 AVER(mps_ap != NULL);
1942 buf = BufferOfAP((AP)mps_ap); 1929 buf = BufferOfAP((AP)mps_ap);
1943 AVER(CHECKT(Buffer, buf)); 1930 AVER(TESTT(Buffer, buf));
1944 1931
1945 arena = BufferArena(buf); 1932 arena = BufferArena(buf);
1946 ArenaEnter(arena); 1933 ArenaEnter(arena);
@@ -1961,7 +1948,7 @@ mps_res_t mps_ap_alloc_pattern_end(mps_ap_t mps_ap,
1961 1948
1962 AVER(mps_ap != NULL); 1949 AVER(mps_ap != NULL);
1963 buf = BufferOfAP((AP)mps_ap); 1950 buf = BufferOfAP((AP)mps_ap);
1964 AVER(CHECKT(Buffer, buf)); 1951 AVER(TESTT(Buffer, buf));
1965 UNUSED(alloc_pattern); /* .ramp.hack */ 1952 UNUSED(alloc_pattern); /* .ramp.hack */
1966 1953
1967 arena = BufferArena(buf); 1954 arena = BufferArena(buf);
@@ -1982,7 +1969,7 @@ mps_res_t mps_ap_alloc_pattern_reset(mps_ap_t mps_ap)
1982 1969
1983 AVER(mps_ap != NULL); 1970 AVER(mps_ap != NULL);
1984 buf = BufferOfAP((AP)mps_ap); 1971 buf = BufferOfAP((AP)mps_ap);
1985 AVER(CHECKT(Buffer, buf)); 1972 AVER(TESTT(Buffer, buf));
1986 1973
1987 arena = BufferArena(buf); 1974 arena = BufferArena(buf);
1988 ArenaEnter(arena); 1975 ArenaEnter(arena);
@@ -2074,7 +2061,7 @@ void mps_chain_destroy(mps_chain_t mps_chain)
2074 Arena arena; 2061 Arena arena;
2075 Chain chain = (Chain)mps_chain; 2062 Chain chain = (Chain)mps_chain;
2076 2063
2077 AVER(CHECKT(Chain, chain)); 2064 AVER(TESTT(Chain, chain));
2078 arena = chain->arena; 2065 arena = chain->arena;
2079 2066
2080 ArenaEnter(arena); 2067 ArenaEnter(arena);
diff --git a/mps/code/mpslibcb.c b/mps/code/mpslibcb.c
deleted file mode 100644
index 41bf5bcb6c7..00000000000
--- a/mps/code/mpslibcb.c
+++ /dev/null
@@ -1,343 +0,0 @@
1/* mpslibcb.c: RAVENBROOK MEMORY POOL SYSTEM LIBRARY INTERFACE (CALLBACK)
2 *
3 * $Header$
4 * Copyright (c) 2005 Ravenbrook Limited. See end of file for license.
5 *
6 * .purpose: The purpose of this code is
7 * 1. permit the MPS Library Interface to be used conveniently when
8 * the MPS is packaged as a dynamic library (and in particular a
9 * Windows DLL).
10 *
11 * .readership: For MPS client application developers and MPS developers.
12 * .sources: <design/lib/>
13 *
14 * .freestanding: This is designed to be deployed in a freestanding
15 * environment, so we can't use strcmp from <string.h>, so we have to
16 * roll our own (in fact we only ever need equality so we define a
17 * simpler interface).
18 *
19 * .mpm.not: This module occupies a halfway house between the MPM and
20 * the client. Let's make it clearer: this module should not use any
21 * services of the MPM. That is, it should be written as if the client
22 * could have, in principle, written it. .mpm.not.why: Perhaps the most
23 * compelling reason is that if config.h is included (via mpm.h) then
24 * the compile breaks on platform.w3i3mv because of "#define
25 * mps_lib_memset memset" in config.h.
26 */
27
28#include "mpslibcb.h"
29#include "mpslib.h"
30#include "mps.h"
31
32/* Forward declarations. */
33
34int mps_lib_callback_default_get_EOF(void);
35mps_lib_FILE *mps_lib_callback_default_get_stderr(void);
36mps_lib_FILE *mps_lib_callback_default_get_stdout(void);
37int mps_lib_callback_default_fputc(int c_, mps_lib_FILE *f_);
38int mps_lib_callback_default_fputs(const char *s_, mps_lib_FILE *f_);
39void *mps_lib_callback_default_memset(void *p_, int c_, size_t n_);
40void *mps_lib_callback_default_memcpy(void *p_, const void *q_, size_t n_);
41int mps_lib_callback_default_memcmp(const void *p_, const void *q_, size_t n_);
42mps_clock_t mps_lib_callback_default_clock(void);
43mps_clock_t mps_lib_callback_default_clocks_per_sec(void);
44unsigned long mps_lib_callback_default_telemetry_control(void);
45int mps_lib_callback_streq(const char *, const char *);
46
47/* Macros */
48
49/* See .freestanding */
50#define EQ(p, q) (mps_lib_callback_streq((p), (q)))
51/* We use this to call mps_lib_asssert_fail (which we only ever do
52 * unconditionally). See .mpm.not on why we cannot use ASSERT from
53 * mpm.h */
54#define AFAIL mps_lib_assert_fail
55/* Replaced UNUSED from mpm.h, see .mpm.not */
56#define UNUSED(x) ((void)(x))
57
58/* Structures and Types */
59
60struct mps_lib_callback_s
61{
62 int (*lib_get_EOF)(void);
63 mps_lib_FILE * (*lib_get_stderr)(void);
64 mps_lib_FILE * (*lib_get_stdout)(void);
65 int (*lib_fputc)(int, mps_lib_FILE *);
66 int (*lib_fputs)(const char *, mps_lib_FILE *);
67 void (*lib_assert_fail)(const char *);
68 void * (*lib_memset)(void *, int, size_t);
69 void * (*lib_memcpy)(void *, const void *, size_t);
70 int (*lib_memcmp)(const void *, const void *, size_t);
71 mps_clock_t (*clock)(void);
72 mps_clock_t (*clocks_per_sec)(void);
73 unsigned long (*lib_telemetry_control)(void);
74};
75
76/* Globals */
77
78/* .global.why: A global is necessary so that we can store the function
79 * pointers that the client gives us. The functions in the mpslib.h
80 * interface _are_ global. There is no scope for having one memset
81 * function for one Arena and a different memset function for another.
82 * */
83
84/* The default functions are stubs that assert. Except for the
85 * assert_fail function (which is called when assertions fail) which
86 * will be NULL. This means: if you provide assert_fail and forget
87 * something else, you'll know about it. If you do not provide
88 * assert_fail then it will probably stop anyway.
89 *
90 * These functions really do need to fail, so they subvert the checking
91 * mechanism (which is in mpm.h and not available to us, see .mpm.not)
92 */
93
94struct mps_lib_callback_s mps_lib_callback_global = {
95 mps_lib_callback_default_get_EOF,
96 mps_lib_callback_default_get_stderr,
97 mps_lib_callback_default_get_stdout,
98 mps_lib_callback_default_fputc,
99 mps_lib_callback_default_fputs,
100 NULL, /* assert_fail */
101 mps_lib_callback_default_memset,
102 mps_lib_callback_default_memcpy,
103 mps_lib_callback_default_memcmp,
104 mps_lib_callback_default_clock,
105 mps_lib_callback_default_clocks_per_sec,
106 mps_lib_callback_default_telemetry_control
107};
108
109/* Functions */
110
111int mps_lib_callback_register(const char *name, mps_lib_function_t f)
112{
113 if(NULL == name) {
114 return MPS_RES_FAIL;
115 }
116 if(EQ(name, "mps_lib_get_EOF")) {
117 mps_lib_callback_global.lib_get_EOF = (int(*)(void))f;
118 } else if(EQ(name, "mps_lib_get_stderr")) {
119 mps_lib_callback_global.lib_get_stderr = (mps_lib_FILE *(*)(void))f;
120 } else if(EQ(name, "mps_lib_get_stdout")) {
121 mps_lib_callback_global.lib_get_stdout = (mps_lib_FILE *(*)(void))f;
122 } else if(EQ(name, "mps_lib_fputc")) {
123 mps_lib_callback_global.lib_fputc = (int(*)(int, mps_lib_FILE *))f;
124 } else if(EQ(name, "mps_lib_fputs")) {
125 mps_lib_callback_global.lib_fputs =
126 (int(*)(const char *, mps_lib_FILE *))f;
127 } else if(EQ(name, "mps_lib_assert_fail")) {
128 mps_lib_callback_global.lib_assert_fail = (void(*)(const char *))f;
129 } else if(EQ(name, "mps_lib_memset")) {
130 mps_lib_callback_global.lib_memset = (void *(*)(void *, int, size_t))f;
131 } else if(EQ(name, "mps_lib_memcpy")) {
132 mps_lib_callback_global.lib_memcpy =
133 (void *(*)(void *, const void *, size_t))f;
134 } else if(EQ(name, "mps_lib_memcmp")) {
135 mps_lib_callback_global.lib_memcmp =
136 (int(*)(const void *, const void *, size_t))f;
137 } else if(EQ(name, "mps_clock")) {
138 mps_lib_callback_global.clock = (mps_clock_t(*)(void))f;
139 } else if(EQ(name, "mps_clocks_per_sec")) {
140 mps_lib_callback_global.clocks_per_sec = (mps_clock_t(*)(void))f;
141 } else if(EQ(name, "mps_lib_telemetry_control")) {
142 mps_lib_callback_global.lib_telemetry_control =
143 (unsigned long(*)(void))f;
144 } else {
145 return MPS_RES_UNIMPL;
146 }
147 return MPS_RES_OK;
148}
149
150/* Return non-zero if and only if string p equals string q. */
151int mps_lib_callback_streq(const char *p, const char *q)
152{
153 do {
154 if(*p == '\0' && *q == '\0') {
155 return 1;
156 }
157 } while(*p++ == *q++);
158 return 0;
159}
160
161int mps_lib_callback_default_get_EOF(void)
162{
163 AFAIL("mps_lib_get_EOF needs to be provided");
164 return 0;
165}
166
167mps_lib_FILE *mps_lib_callback_default_get_stderr(void)
168{
169 AFAIL("mps_lib_get_stderr needs to be provided");
170 return NULL;
171}
172
173mps_lib_FILE *mps_lib_callback_default_get_stdout(void)
174{
175 AFAIL("mps_lib_get_stdout needs to be provided");
176 return NULL;
177}
178
179int mps_lib_callback_default_fputc(int c_, mps_lib_FILE *f_)
180{
181 UNUSED(c_);
182 UNUSED(f_);
183 AFAIL("mps_lib_fputc needs to be provided");
184 return 0;
185}
186
187int mps_lib_callback_default_fputs(const char *s_, mps_lib_FILE *f_)
188{
189 UNUSED(s_);
190 UNUSED(f_);
191 AFAIL("mps_lib_fputs needs to be provided");
192 return 0;
193}
194
195/* No default implementation for mps_lib_assert_fail */
196
197void *mps_lib_callback_default_memset(void *p_, int c_, size_t n_)
198{
199 UNUSED(p_);
200 UNUSED(c_);
201 UNUSED(n_);
202 AFAIL("mps_lib_memset needs to be provided");
203 return NULL;
204}
205
206void *mps_lib_callback_default_memcpy(void *p_, const void *q_, size_t n_)
207{
208 UNUSED(p_);
209 UNUSED(q_);
210 UNUSED(n_);
211 AFAIL("mps_lib_memcpy needs to be provided");
212 return NULL;
213}
214
215int mps_lib_callback_default_memcmp(const void *p_, const void *q_, size_t n_)
216{
217 UNUSED(p_);
218 UNUSED(q_);
219 UNUSED(n_);
220 AFAIL("mps_lib_memcmp needs to be provided");
221 return 0;
222}
223
224mps_clock_t mps_lib_callback_default_clock(void)
225{
226 AFAIL("mps_clock needs to be provided");
227 return 0;
228}
229
230mps_clock_t mps_lib_callback_default_clocks_per_sec(void)
231{
232 AFAIL("mps_clocks_per_sec needs to be provided");
233 return 0;
234}
235
236unsigned long mps_lib_callback_default_telemetry_control(void)
237{
238 AFAIL("mps_lib_telemetry_control needs to be provided");
239 return 0;
240}
241
242int mps_lib_get_EOF(void)
243{
244 return mps_lib_callback_global.lib_get_EOF();
245}
246
247mps_lib_FILE *mps_lib_get_stderr(void)
248{
249 return mps_lib_callback_global.lib_get_stderr();
250}
251
252mps_lib_FILE *mps_lib_get_stdout(void)
253{
254 return mps_lib_callback_global.lib_get_stdout();
255}
256
257int mps_lib_fputc(int c, mps_lib_FILE *f)
258{
259 return mps_lib_callback_global.lib_fputc(c, f);
260}
261
262int mps_lib_fputs(const char *s, mps_lib_FILE *f)
263{
264 return mps_lib_callback_global.lib_fputs(s, f);
265}
266
267void mps_lib_assert_fail(const char *m)
268{
269 mps_lib_callback_global.lib_assert_fail(m);
270}
271
272void *(mps_lib_memset)(void *p, int c, size_t n)
273{
274 return mps_lib_callback_global.lib_memset(p, c, n);
275}
276
277void *(mps_lib_memcpy)(void *p, const void *q, size_t n)
278{
279 return mps_lib_callback_global.lib_memcpy(p, q, n);
280}
281
282int (mps_lib_memcmp)(const void *p, const void *q, size_t n)
283{
284 return mps_lib_callback_global.lib_memcmp(p, q, n);
285}
286
287mps_clock_t mps_clock(void)
288{
289 return mps_lib_callback_global.clock();
290}
291
292mps_clock_t mps_clocks_per_sec(void)
293{
294 return mps_lib_callback_global.clocks_per_sec();
295}
296
297unsigned long mps_lib_telemetry_control(void)
298{
299 return mps_lib_callback_global.lib_telemetry_control();
300}
301
302
303
304/* C. COPYRIGHT AND LICENSE
305 *
306 * Copyright (C) 2005 Ravenbrook Limited <http://www.ravenbrook.com/>.
307 * All rights reserved. This is an open source license. Contact
308 * Ravenbrook for commercial licensing options.
309 *
310 * Redistribution and use in source and binary forms, with or without
311 * modification, are permitted provided that the following conditions are
312 * met:
313 *
314 * 1. Redistributions of source code must retain the above copyright
315 * notice, this list of conditions and the following disclaimer.
316 *
317 * 2. Redistributions in binary form must reproduce the above copyright
318 * notice, this list of conditions and the following disclaimer in the
319 * documentation and/or other materials provided with the distribution.
320 *
321 * 3. Redistributions in any form must be accompanied by information on how
322 * to obtain complete source code for this software and any accompanying
323 * software that uses this software. The source code must either be
324 * included in the distribution or be available for no more than the cost
325 * of distribution plus a nominal fee, and must be freely redistributable
326 * under reasonable conditions. For an executable file, complete source
327 * code means the source code for all modules it contains. It does not
328 * include source code for modules or files that typically accompany the
329 * major components of the operating system on which the executable file
330 * runs.
331 *
332 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
333 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
334 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
335 * PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE
336 * COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
337 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
338 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
339 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
340 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
341 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
342 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
343 */
diff --git a/mps/code/mpslibcb.def b/mps/code/mpslibcb.def
deleted file mode 100644
index 9b2f4e3b285..00000000000
--- a/mps/code/mpslibcb.def
+++ /dev/null
@@ -1,10 +0,0 @@
1; $Header$
2; --- EXTERNAL MPS FUNCTIONS ---
3; This file tells the linker to export the mpslibcb functions from
4; the MPS DLL.
5; This list is for the w3i3mv platform.
6;
7; This file was extracted by hand from expgen.sh; see MPS job002148.
8EXPORTS
9; mpslibcb.h
10mps_lib_callback_register
diff --git a/mps/code/mpslibcb.h b/mps/code/mpslibcb.h
deleted file mode 100644
index 140448e2482..00000000000
--- a/mps/code/mpslibcb.h
+++ /dev/null
@@ -1,58 +0,0 @@
1/* mpslibcb.h: RAVENBROOK MEMORY POOL SYSTEM LIBRARY CALLBACK INTERFACE
2 *
3 * $Header$
4 * Copyright (c) 2005 Ravenbrook Limited. See end of file for license.
5 *
6 * .readership: MPS client application developers, MPS developers.
7 *
8 */
9
10#ifndef mpslibcb_h
11#define mpslibcb_h
12
13typedef void (*mps_lib_function_t)(void);
14int mps_lib_callback_register(const char *, mps_lib_function_t);
15
16#endif /* mpslibcb_h */
17
18
19/* C. COPYRIGHT AND LICENSE
20 *
21 * Copyright (C) 2005 Ravenbrook Limited <http://www.ravenbrook.com/>.
22 * All rights reserved. This is an open source license. Contact
23 * Ravenbrook for commercial licensing options.
24 *
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions are
27 * met:
28 *
29 * 1. Redistributions of source code must retain the above copyright
30 * notice, this list of conditions and the following disclaimer.
31 *
32 * 2. Redistributions in binary form must reproduce the above copyright
33 * notice, this list of conditions and the following disclaimer in the
34 * documentation and/or other materials provided with the distribution.
35 *
36 * 3. Redistributions in any form must be accompanied by information on how
37 * to obtain complete source code for this software and any accompanying
38 * software that uses this software. The source code must either be
39 * included in the distribution or be available for no more than the cost
40 * of distribution plus a nominal fee, and must be freely redistributable
41 * under reasonable conditions. For an executable file, complete source
42 * code means the source code for all modules it contains. It does not
43 * include source code for modules or files that typically accompany the
44 * major components of the operating system on which the executable file
45 * runs.
46 *
47 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
48 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
49 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
50 * PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE
51 * COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
52 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
53 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
54 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
55 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
56 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
57 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58 */
diff --git a/mps/code/mpstd.h b/mps/code/mpstd.h
index 10d3d2833a6..1725639691f 100644
--- a/mps/code/mpstd.h
+++ b/mps/code/mpstd.h
@@ -127,6 +127,7 @@
127#define MPS_WORD_SHIFT 5 127#define MPS_WORD_SHIFT 5
128#define MPS_PF_ALIGN 4 /* I'm just guessing. */ 128#define MPS_PF_ALIGN 4 /* I'm just guessing. */
129 129
130
130/* Apple clang version 3.1, clang -E -dM */ 131/* Apple clang version 3.1, clang -E -dM */
131 132
132#elif defined(__APPLE__) && defined(__i386__) && defined(__MACH__) \ 133#elif defined(__APPLE__) && defined(__i386__) && defined(__MACH__) \
@@ -145,6 +146,7 @@
145#define MPS_WORD_SHIFT 5 146#define MPS_WORD_SHIFT 5
146#define MPS_PF_ALIGN 4 /* I'm just guessing. */ 147#define MPS_PF_ALIGN 4 /* I'm just guessing. */
147 148
149
148/* Apple clang version 3.1, clang -E -dM */ 150/* Apple clang version 3.1, clang -E -dM */
149 151
150#elif defined(__APPLE__) && defined(__x86_64__) && defined(__MACH__) \ 152#elif defined(__APPLE__) && defined(__x86_64__) && defined(__MACH__) \
@@ -163,6 +165,7 @@
163#define MPS_WORD_SHIFT 6 165#define MPS_WORD_SHIFT 6
164#define MPS_PF_ALIGN 8 166#define MPS_PF_ALIGN 8
165 167
168
166/* GCC 2.6.3, gcc -E -dM 169/* GCC 2.6.3, gcc -E -dM
167 * The actual granularity of GNU malloc is 8, but field alignments are 170 * The actual granularity of GNU malloc is 8, but field alignments are
168 * all 4. 171 * all 4.
@@ -183,6 +186,13 @@
183#define MPS_WORD_SHIFT 5 186#define MPS_WORD_SHIFT 5
184#define MPS_PF_ALIGN 4 187#define MPS_PF_ALIGN 4
185 188
189#ifndef _REENTRANT /* it's also defined by cc -pthread */
190#define _REENTRANT /* defines, e.g., pthread_mutexattr_settype */
191#endif
192#define _XOPEN_SOURCE 500 /* to get POSIX signal handling */
193#define _GNU_SOURCE /* to get register numbers for prmci3li.c */
194
195
186/* GCC 4.6.3, gcc -E -dM */ 196/* GCC 4.6.3, gcc -E -dM */
187 197
188#elif defined(__linux__) && defined(__x86_64) && defined(__GNUC__) 198#elif defined(__linux__) && defined(__x86_64) && defined(__GNUC__)
@@ -200,22 +210,12 @@
200#define MPS_WORD_SHIFT 6 210#define MPS_WORD_SHIFT 6
201#define MPS_PF_ALIGN 8 211#define MPS_PF_ALIGN 8
202 212
203/* GCC 2.7.2, gcc -E -dM */ 213#ifndef _REENTRANT /* it's also defined by cc -pthread */
204 214#define _REENTRANT /* defines, e.g., pthread_mutexattr_settype */
205#elif defined(__linux__) && defined(__PPC__) && defined(__GNUC__)
206#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_LIPPGC)
207#error "specified CONFIG_PF_... inconsistent with detected lippgc"
208#endif 215#endif
209#define MPS_PF_LIPPGC 216#define _XOPEN_SOURCE 500 /* to get POSIX signal handling */
210#define MPS_PF_STRING "lippgc" 217#define _GNU_SOURCE /* to get register numbers for prmci3li.c */
211#define MPS_OS_LI 218
212#define MPS_ARCH_PP
213#define MPS_BUILD_GC
214#define MPS_T_WORD unsigned long
215#define MPS_T_ULONGEST unsigned long
216#define MPS_WORD_WIDTH 32
217#define MPS_WORD_SHIFT 5
218#define MPS_PF_ALIGN 8 /* @@@@ not tested */
219 219
220/* GCC 2.95.3, gcc -E -dM */ 220/* GCC 2.95.3, gcc -E -dM */
221 221
@@ -234,6 +234,7 @@
234#define MPS_WORD_SHIFT 5 234#define MPS_WORD_SHIFT 5
235#define MPS_PF_ALIGN 4 235#define MPS_PF_ALIGN 4
236 236
237
237#elif defined(__FreeBSD__) && defined (__x86_64__) && defined (__GNUC__) 238#elif defined(__FreeBSD__) && defined (__x86_64__) && defined (__GNUC__)
238#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_FRI6GC) 239#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_FRI6GC)
239#error "specified CONFIG_PF_... inconsistent with detected fri6gc" 240#error "specified CONFIG_PF_... inconsistent with detected fri6gc"
@@ -249,6 +250,7 @@
249#define MPS_WORD_SHIFT 6 250#define MPS_WORD_SHIFT 6
250#define MPS_PF_ALIGN 8 251#define MPS_PF_ALIGN 8
251 252
253
252#else 254#else
253#error "Unable to detect target platform" 255#error "Unable to detect target platform"
254#endif 256#endif
diff --git a/mps/code/pool.c b/mps/code/pool.c
index ad96054f7f0..1b90864cb31 100644
--- a/mps/code/pool.c
+++ b/mps/code/pool.c
@@ -515,7 +515,7 @@ Res PoolDescribe(Pool pool, mps_lib_FILE *stream)
515 Res res; 515 Res res;
516 Ring node, nextNode; 516 Ring node, nextNode;
517 517
518 if (!CHECKT(Pool, pool)) return ResFAIL; 518 if (!TESTT(Pool, pool)) return ResFAIL;
519 if (stream == NULL) return ResFAIL; 519 if (stream == NULL) return ResFAIL;
520 520
521 res = WriteF(stream, 521 res = WriteF(stream,
diff --git a/mps/code/poolamc.c b/mps/code/poolamc.c
index bea60caa03e..3698f328b90 100644
--- a/mps/code/poolamc.c
+++ b/mps/code/poolamc.c
@@ -258,12 +258,12 @@ static Res AMCSegDescribe(Seg seg, mps_lib_FILE *stream)
258 Size row; 258 Size row;
259 char abzSketch[5]; 259 char abzSketch[5];
260 260
261 if(!CHECKT(Seg, seg)) 261 if(!TESTT(Seg, seg))
262 return ResFAIL; 262 return ResFAIL;
263 if(stream == NULL) 263 if(stream == NULL)
264 return ResFAIL; 264 return ResFAIL;
265 amcseg = Seg2amcSeg(seg); 265 amcseg = Seg2amcSeg(seg);
266 if(!CHECKT(amcSeg, amcseg)) 266 if(!TESTT(amcSeg, amcseg))
267 return ResFAIL; 267 return ResFAIL;
268 268
269 /* Describe the superclass fields first via next-method call */ 269 /* Describe the superclass fields first via next-method call */
@@ -745,7 +745,7 @@ static Res amcGenDescribe(amcGen gen, mps_lib_FILE *stream)
745{ 745{
746 Res res; 746 Res res;
747 747
748 if(!CHECKT(amcGen, gen)) 748 if(!TESTT(amcGen, gen))
749 return ResFAIL; 749 return ResFAIL;
750 750
751 res = WriteF(stream, 751 res = WriteF(stream,
@@ -2330,10 +2330,10 @@ static Res AMCDescribe(Pool pool, mps_lib_FILE *stream)
2330 Ring node, nextNode; 2330 Ring node, nextNode;
2331 char *rampmode; 2331 char *rampmode;
2332 2332
2333 if(!CHECKT(Pool, pool)) 2333 if(!TESTT(Pool, pool))
2334 return ResFAIL; 2334 return ResFAIL;
2335 amc = Pool2AMC(pool); 2335 amc = Pool2AMC(pool);
2336 if(!CHECKT(AMC, amc)) 2336 if(!TESTT(AMC, amc))
2337 return ResFAIL; 2337 return ResFAIL;
2338 if(stream == NULL) 2338 if(stream == NULL)
2339 return ResFAIL; 2339 return ResFAIL;
@@ -2485,7 +2485,7 @@ void mps_amc_apply(mps_pool_t mps_pool,
2485 mps_amc_apply_closure_s closure_s; 2485 mps_amc_apply_closure_s closure_s;
2486 Arena arena; 2486 Arena arena;
2487 2487
2488 AVER(CHECKT(Pool, pool)); 2488 AVER(TESTT(Pool, pool));
2489 arena = PoolArena(pool); 2489 arena = PoolArena(pool);
2490 ArenaEnter(arena); 2490 ArenaEnter(arena);
2491 AVERT(Pool, pool); 2491 AVERT(Pool, pool);
diff --git a/mps/code/poolams.c b/mps/code/poolams.c
index 913195aab7c..f1ae7478bc3 100644
--- a/mps/code/poolams.c
+++ b/mps/code/poolams.c
@@ -524,10 +524,10 @@ static Res AMSSegDescribe(Seg seg, mps_lib_FILE *stream)
524 Buffer buffer; /* the segment's buffer, if it has one */ 524 Buffer buffer; /* the segment's buffer, if it has one */
525 Index i; 525 Index i;
526 526
527 if (!CHECKT(Seg, seg)) return ResFAIL; 527 if (!TESTT(Seg, seg)) return ResFAIL;
528 if (stream == NULL) return ResFAIL; 528 if (stream == NULL) return ResFAIL;
529 amsseg = Seg2AMSSeg(seg); 529 amsseg = Seg2AMSSeg(seg);
530 if (!CHECKT(AMSSeg, amsseg)) return ResFAIL; 530 if (!TESTT(AMSSeg, amsseg)) return ResFAIL;
531 531
532 /* Describe the superclass fields first via next-method call */ 532 /* Describe the superclass fields first via next-method call */
533 super = SEG_SUPERCLASS(AMSSegClass); 533 super = SEG_SUPERCLASS(AMSSegClass);
@@ -885,7 +885,7 @@ static Res AMSBufferFill(Addr *baseReturn, Addr *limitReturn,
885 AMS ams; 885 AMS ams;
886 Seg seg; 886 Seg seg;
887 Ring node, ring, nextNode; /* for iterating over the segments */ 887 Ring node, ring, nextNode; /* for iterating over the segments */
888 Index base, limit; 888 Index base = 0, limit = 0; /* suppress "may be used uninitialized" */
889 Addr baseAddr, limitAddr; 889 Addr baseAddr, limitAddr;
890 RankSet rankSet; 890 RankSet rankSet;
891 Bool b; /* the return value of amsSegAlloc */ 891 Bool b; /* the return value of amsSegAlloc */
@@ -1366,7 +1366,7 @@ static Res AMSFix(Pool pool, ScanState ss, Seg seg, Ref *refIO)
1366 Format format; 1366 Format format;
1367 1367
1368 AVERT_CRITICAL(Pool, pool); 1368 AVERT_CRITICAL(Pool, pool);
1369 AVER_CRITICAL(CHECKT(AMS, Pool2AMS(pool))); 1369 AVER_CRITICAL(TESTT(AMS, Pool2AMS(pool)));
1370 AVERT_CRITICAL(ScanState, ss); 1370 AVERT_CRITICAL(ScanState, ss);
1371 AVERT_CRITICAL(Seg, seg); 1371 AVERT_CRITICAL(Seg, seg);
1372 AVER_CRITICAL(refIO != NULL); 1372 AVER_CRITICAL(refIO != NULL);
@@ -1591,9 +1591,9 @@ static Res AMSDescribe(Pool pool, mps_lib_FILE *stream)
1591 Ring node, nextNode; 1591 Ring node, nextNode;
1592 Res res; 1592 Res res;
1593 1593
1594 if (!CHECKT(Pool, pool)) return ResFAIL; 1594 if (!TESTT(Pool, pool)) return ResFAIL;
1595 ams = Pool2AMS(pool); 1595 ams = Pool2AMS(pool);
1596 if (!CHECKT(AMS, ams)) return ResFAIL; 1596 if (!TESTT(AMS, ams)) return ResFAIL;
1597 if (stream == NULL) return ResFAIL; 1597 if (stream == NULL) return ResFAIL;
1598 1598
1599 res = WriteF(stream, 1599 res = WriteF(stream,
diff --git a/mps/code/poolmrg.c b/mps/code/poolmrg.c
index 73ec8ac81f1..397ba89b6db 100644
--- a/mps/code/poolmrg.c
+++ b/mps/code/poolmrg.c
@@ -332,7 +332,7 @@ static Count MRGGuardiansPerSeg(MRG mrg)
332 332
333static RefPart MRGRefPartOfLink(Link link, Arena arena) 333static RefPart MRGRefPartOfLink(Link link, Arena arena)
334{ 334{
335 Seg seg; 335 Seg seg = NULL; /* suppress "may be used uninitialized" */
336 Bool b; 336 Bool b;
337 Link linkBase; 337 Link linkBase;
338 Index index; 338 Index index;
@@ -407,7 +407,7 @@ static void MRGGuardianInit(MRG mrg, Link link, RefPart refPart)
407 407
408static void MRGMessageDelete(Message message) 408static void MRGMessageDelete(Message message)
409{ 409{
410 Pool pool; 410 Pool pool = NULL; /* suppress "may be used uninitialized" */
411 Arena arena; 411 Arena arena;
412 Link link; 412 Link link;
413 Bool b; 413 Bool b;
@@ -792,9 +792,9 @@ static Res MRGDescribe(Pool pool, mps_lib_FILE *stream)
792 RefPart refPart; 792 RefPart refPart;
793 Res res; 793 Res res;
794 794
795 if (!CHECKT(Pool, pool)) return ResFAIL; 795 if (!TESTT(Pool, pool)) return ResFAIL;
796 mrg = Pool2MRG(pool); 796 mrg = Pool2MRG(pool);
797 if (!CHECKT(MRG, mrg)) return ResFAIL; 797 if (!TESTT(MRG, mrg)) return ResFAIL;
798 if (stream == NULL) return ResFAIL; 798 if (stream == NULL) return ResFAIL;
799 799
800 arena = PoolArena(pool); 800 arena = PoolArena(pool);
diff --git a/mps/code/poolmv.c b/mps/code/poolmv.c
index ae71bb40804..6a682da6707 100644
--- a/mps/code/poolmv.c
+++ b/mps/code/poolmv.c
@@ -574,7 +574,7 @@ static void MVFree(Pool pool, Addr old, Size size)
574 MV mv; 574 MV mv;
575 Res res; 575 Res res;
576 Bool b; 576 Bool b;
577 Tract tract; 577 Tract tract = NULL; /* suppress "may be used uninitialized" */
578 578
579 AVERT(Pool, pool); 579 AVERT(Pool, pool);
580 mv = Pool2MV(pool); 580 mv = Pool2MV(pool);
@@ -646,9 +646,9 @@ static Res MVDescribe(Pool pool, mps_lib_FILE *stream)
646 char c; 646 char c;
647 Ring spans, node = NULL, nextNode; /* gcc whinge stop */ 647 Ring spans, node = NULL, nextNode; /* gcc whinge stop */
648 648
649 if(!CHECKT(Pool, pool)) return ResFAIL; 649 if(!TESTT(Pool, pool)) return ResFAIL;
650 mv = Pool2MV(pool); 650 mv = Pool2MV(pool);
651 if(!CHECKT(MV, mv)) return ResFAIL; 651 if(!TESTT(MV, mv)) return ResFAIL;
652 if(stream == NULL) return ResFAIL; 652 if(stream == NULL) return ResFAIL;
653 653
654 res = WriteF(stream, 654 res = WriteF(stream,
diff --git a/mps/code/poolmv2.c b/mps/code/poolmv2.c
index 974112b7abe..b67b236d1b4 100644
--- a/mps/code/poolmv2.c
+++ b/mps/code/poolmv2.c
@@ -685,9 +685,9 @@ static Res MVTDescribe(Pool pool, mps_lib_FILE *stream)
685 Res res; 685 Res res;
686 MVT mvt; 686 MVT mvt;
687 687
688 if (!CHECKT(Pool, pool)) return ResFAIL; 688 if (!TESTT(Pool, pool)) return ResFAIL;
689 mvt = Pool2MVT(pool); 689 mvt = Pool2MVT(pool);
690 if (!CHECKT(MVT, mvt)) return ResFAIL; 690 if (!TESTT(MVT, mvt)) return ResFAIL;
691 if (stream == NULL) return ResFAIL; 691 if (stream == NULL) return ResFAIL;
692 692
693 res = WriteF(stream, 693 res = WriteF(stream,
diff --git a/mps/code/poolmvff.c b/mps/code/poolmvff.c
index f13c94893aa..b83b58243bb 100644
--- a/mps/code/poolmvff.c
+++ b/mps/code/poolmvff.c
@@ -112,7 +112,7 @@ static void MVFFAddToFreeList(Addr *baseIO, Addr *limitIO, MVFF mvff) {
112 */ 112 */
113static void MVFFFreeSegs(MVFF mvff, Addr base, Addr limit) 113static void MVFFFreeSegs(MVFF mvff, Addr base, Addr limit)
114{ 114{
115 Seg seg; 115 Seg seg = NULL; /* suppress "may be used uninitialized" */
116 Arena arena; 116 Arena arena;
117 Bool b; 117 Bool b;
118 Addr segLimit; /* limit of the current segment when iterating */ 118 Addr segLimit; /* limit of the current segment when iterating */
@@ -537,9 +537,9 @@ static Res MVFFDescribe(Pool pool, mps_lib_FILE *stream)
537 Res res; 537 Res res;
538 MVFF mvff; 538 MVFF mvff;
539 539
540 if (!CHECKT(Pool, pool)) return ResFAIL; 540 if (!TESTT(Pool, pool)) return ResFAIL;
541 mvff = Pool2MVFF(pool); 541 mvff = Pool2MVFF(pool);
542 if (!CHECKT(MVFF, mvff)) return ResFAIL; 542 if (!TESTT(MVFF, mvff)) return ResFAIL;
543 if (stream == NULL) return ResFAIL; 543 if (stream == NULL) return ResFAIL;
544 544
545 res = WriteF(stream, 545 res = WriteF(stream,
diff --git a/mps/code/poolsnc.c b/mps/code/poolsnc.c
index c9b1c20098e..eda496d450f 100644
--- a/mps/code/poolsnc.c
+++ b/mps/code/poolsnc.c
@@ -590,7 +590,7 @@ static void SNCFramePopPending(Pool pool, Buffer buf, AllocFrame frame)
590 590
591 } else { 591 } else {
592 Arena arena; 592 Arena arena;
593 Seg seg; 593 Seg seg = NULL; /* suppress "may be used uninitialized" */
594 Bool foundSeg; 594 Bool foundSeg;
595 595
596 arena = PoolArena(pool); 596 arena = PoolArena(pool);
diff --git a/mps/code/protix.c b/mps/code/protix.c
index b121e2f48ae..31c272bc5b9 100644
--- a/mps/code/protix.c
+++ b/mps/code/protix.c
@@ -39,11 +39,6 @@
39 * is permitted when PROT_NONE alone is used. 39 * is permitted when PROT_NONE alone is used.
40 */ 40 */
41 41
42
43/* open sesame magic, see standards(5) */
44#define _POSIX_C_SOURCE 199309L
45#define _XOPEN_SOURCE_EXTENDED 1
46
47#include "mpm.h" 42#include "mpm.h"
48 43
49#if !defined(MPS_OS_LI) && !defined(MPS_OS_FR) && !defined(MPS_OS_XC) 44#if !defined(MPS_OS_LI) && !defined(MPS_OS_FR) && !defined(MPS_OS_XC)
diff --git a/mps/code/root.c b/mps/code/root.c
index bd2dd21f5ea..e746d3c1b61 100644
--- a/mps/code/root.c
+++ b/mps/code/root.c
@@ -380,7 +380,7 @@ void RootDestroy(Root root)
380 380
381Arena RootArena(Root root) 381Arena RootArena(Root root)
382{ 382{
383 AVER(CHECKT(Root, root)); 383 AVER(TESTT(Root, root));
384 return root->arena; 384 return root->arena;
385} 385}
386 386
@@ -584,7 +584,7 @@ Res RootDescribe(Root root, mps_lib_FILE *stream)
584{ 584{
585 Res res; 585 Res res;
586 586
587 if (!CHECKT(Root, root)) return ResFAIL; 587 if (!TESTT(Root, root)) return ResFAIL;
588 if (stream == NULL) return ResFAIL; 588 if (stream == NULL) return ResFAIL;
589 589
590 res = WriteF(stream, 590 res = WriteF(stream,
diff --git a/mps/code/seg.c b/mps/code/seg.c
index 3f95ba4ec88..6c194881bb8 100644
--- a/mps/code/seg.c
+++ b/mps/code/seg.c
@@ -353,7 +353,7 @@ Res SegDescribe(Seg seg, mps_lib_FILE *stream)
353 Res res; 353 Res res;
354 Pool pool; 354 Pool pool;
355 355
356 if (!CHECKT(Seg, seg)) return ResFAIL; 356 if (!TESTT(Seg, seg)) return ResFAIL;
357 if (stream == NULL) return ResFAIL; 357 if (stream == NULL) return ResFAIL;
358 358
359 pool = SegPool(seg); 359 pool = SegPool(seg);
@@ -964,7 +964,7 @@ static Res segTrivDescribe(Seg seg, mps_lib_FILE *stream)
964{ 964{
965 Res res; 965 Res res;
966 966
967 if (!CHECKT(Seg, seg)) return ResFAIL; 967 if (!TESTT(Seg, seg)) return ResFAIL;
968 if (stream == NULL) return ResFAIL; 968 if (stream == NULL) return ResFAIL;
969 969
970 res = WriteF(stream, 970 res = WriteF(stream,
@@ -1550,10 +1550,10 @@ static Res gcSegDescribe(Seg seg, mps_lib_FILE *stream)
1550 SegClass super; 1550 SegClass super;
1551 GCSeg gcseg; 1551 GCSeg gcseg;
1552 1552
1553 if (!CHECKT(Seg, seg)) return ResFAIL; 1553 if (!TESTT(Seg, seg)) return ResFAIL;
1554 if (stream == NULL) return ResFAIL; 1554 if (stream == NULL) return ResFAIL;
1555 gcseg = SegGCSeg(seg); 1555 gcseg = SegGCSeg(seg);
1556 if (!CHECKT(GCSeg, gcseg)) return ResFAIL; 1556 if (!TESTT(GCSeg, gcseg)) return ResFAIL;
1557 1557
1558 /* Describe the superclass fields first via next-method call */ 1558 /* Describe the superclass fields first via next-method call */
1559 super = SEG_SUPERCLASS(GCSegClass); 1559 super = SEG_SUPERCLASS(GCSegClass);
diff --git a/mps/code/vmw3.c b/mps/code/vmw3.c
index 554209687d3..e1e05b4ab2a 100644
--- a/mps/code/vmw3.c
+++ b/mps/code/vmw3.c
@@ -103,8 +103,8 @@ Res VMCreate(VM *vmReturn, Size size)
103 103
104 AVER(vmReturn != NULL); 104 AVER(vmReturn != NULL);
105 105
106 AVER(CHECKTYPE(LPVOID, Addr)); /* .assume.lpvoid-addr */ 106 AVER(COMPATTYPE(LPVOID, Addr)); /* .assume.lpvoid-addr */
107 AVER(CHECKTYPE(SIZE_T, Size)); 107 AVER(COMPATTYPE(SIZE_T, Size));
108 108
109 GetSystemInfo(&si); 109 GetSystemInfo(&si);
110 align = (Align)si.dwPageSize; 110 align = (Align)si.dwPageSize;
diff --git a/mps/code/w3gen.def b/mps/code/w3gen.def
deleted file mode 100644
index 03ebba93c95..00000000000
--- a/mps/code/w3gen.def
+++ /dev/null
@@ -1,158 +0,0 @@
1; $Header$
2; --- EXTERNAL MPS FUNCTIONS ---
3; This is a list of the external MPS functions (those a client
4; might wish to call) present in the accompanying mps.lib library.
5; This list is for the w3i3mv platform.
6;
7; If you wish to link with the MPS library AND re-export these
8; functions from it (for example: so that other DLLs linked with
9; your binary will also be able to make direct MPS calls), then
10; you can specify:
11; /def:<this file>
12; to the MSVC LINK.EXE when you link your binary.
13;
14; This file was initially generated by !Header: //info.ravenbrook.com/project/mps/branch/2004-12-15/dll/code/expgen.sh#4 !
15; And since then has been hand-edited. (But the result should be
16; identical (apart from ordering) to what expgen.sh would produce,
17; were it run on these sources. See MPS job001935.)
18EXPORTS
19; mps.h
20mps_ap_fill_with_reservoir_permit
21mps_ap_fill
22mps_commit
23mps_reserve
24mps_ap_destroy
25mps_ap_create_v
26mps_ap_create
27mps_free
28mps_alloc_v
29mps_alloc
30mps_chain_destroy
31mps_chain_create
32mps_pool_destroy
33mps_pool_create_v
34mps_pool_create
35mps_fmt_destroy
36mps_fmt_create_fixed
37mps_fmt_create_auto_header
38mps_fmt_create_B
39mps_fmt_create_A
40mps_arena_extend
41mps_arena_has_addr
42mps_addr_pool
43mps_addr_fmt
44mps_space_committed
45mps_space_reserved
46mps_arena_formatted_objects_walk
47mps_arena_spare_commit_limit
48mps_arena_spare_commit_limit_set
49mps_arena_commit_limit_set
50mps_arena_commit_limit
51mps_arena_spare_committed
52mps_arena_committed
53mps_arena_reserved
54mps_space_destroy
55mps_space_create
56mps_arena_destroy
57mps_arena_create_v
58mps_arena_create
59mps_space_collect
60mps_space_park
61mps_space_release
62mps_space_clamp
63mps_arena_step
64mps_arena_collect
65mps_arena_start_collect
66mps_arena_unsafe_restore_protection
67mps_arena_unsafe_expose_remember_protection
68mps_arena_expose
69mps_arena_park
70mps_arena_release
71mps_arena_clamp
72mps_telemetry_flush
73mps_fix
74mps_pool_check_fenceposts
75mps_telemetry_label
76mps_telemetry_intern
77mps_telemetry_control
78mps_alert_collection_set
79mps_definalize
80mps_finalize
81mps_message_gc_not_condemned_size
82mps_message_gc_condemned_size
83mps_message_gc_live_size
84mps_message_finalization_ref
85mps_message_type
86mps_message_queue_type
87mps_message_discard
88mps_message_get
89mps_message_type_disable
90mps_message_type_enable
91mps_message_poll
92mps_collections
93mps_ld_isstale
94mps_ld_merge
95mps_ld_add
96mps_ld_reset
97mps_thread_dereg
98mps_thread_reg
99mps_tramp
100mps_stack_scan_ambig
101mps_root_destroy
102mps_root_create_reg
103mps_root_create_fmt
104mps_root_create_table_masked
105mps_root_create_table
106mps_root_create
107mps_reserve_with_reservoir_permit
108mps_reservoir_available
109mps_reservoir_limit
110mps_arena_roots_walk
111mps_reservoir_limit_set
112mps_sac_empty
113mps_pool_check_free_space
114mps_sac_fill
115mps_sac_flush
116mps_sac_free
117mps_sac_alloc
118mps_sac_destroy
119mps_sac_create
120mps_rank_weak
121mps_ap_alloc_pattern_reset
122mps_rank_exact
123mps_ap_alloc_pattern_end
124mps_rank_ambig
125mps_ap_alloc_pattern_begin
126mps_alloc_pattern_ramp_collect_all
127mps_alloc_pattern_ramp
128mps_ap_trip
129mps_ap_frame_pop
130mps_ap_frame_push
131; mpsavm.h
132mps_arena_class_vmnz
133mps_arena_class_vm
134mps_arena_vm_growth
135; mpsacl.h
136mps_arena_class_cl
137; mpscamc.h
138mps_class_amc
139mps_amc_apply
140mps_class_amcz
141; mpscams.h
142mps_class_ams_debug
143mps_class_ams
144; mpscawl.h
145mps_class_awl
146; mpsclo.h
147mps_class_lo
148; mpscmv.h
149mps_mv_size
150mps_class_mv_debug
151mps_mv_free_size
152mps_class_mv
153; mpscsnc.h
154mps_class_snc
155; mpstd.h
156; mpsw3.h - by hand
157mps_SEH_filter
158mps_SEH_handler
diff --git a/mps/code/w3i3mv.nmk b/mps/code/w3i3mv.nmk
index 9feffc642d6..521fe3a95f7 100644
--- a/mps/code/w3i3mv.nmk
+++ b/mps/code/w3i3mv.nmk
@@ -5,9 +5,6 @@
5 5
6PFM = w3i3mv 6PFM = w3i3mv
7 7
8RAINBOWPATH = MSVISUAL\WIN32\I386
9DONGLELIB = $(RAINBOWPATH)\spromeps.lib
10
11# /Gs appears to be necessary to suppress stack checks. Stack checks 8# /Gs appears to be necessary to suppress stack checks. Stack checks
12# (if not suppressed) generate a dependency on the C library, __chkesp, 9# (if not suppressed) generate a dependency on the C library, __chkesp,
13# which causes the linker step to fail when building the DLL, mpsdy.dll. 10# which causes the linker step to fail when building the DLL, mpsdy.dll.
@@ -22,23 +19,15 @@ MPM = <ring> <mpm> <bt> <protocol> <boot> \
22 <shield> <vmw3> \ 19 <shield> <vmw3> \
23 <thw3> <thw3i3> <ssw3mv> <mpsi> <mpsiw3> <ld> <spi3> \ 20 <thw3> <thw3i3> <ssw3mv> <mpsi> <mpsiw3> <ld> <spi3> \
24 <event> <seg> <sac> <poolmrg> <message> <dbgpool> <dbgpooli> \ 21 <event> <seg> <sac> <poolmrg> <message> <dbgpool> <dbgpooli> \
25 <abq> <meter> <cbs> <poolmv2> <splay> <diag> <version> 22 <abq> <meter> <cbs> <poolmv2> <splay> <diag>
26SW = <ring> <mpm> <bt> <protocol> <boot> \
27 <arenavm> <arenacl> <locus> <arena> <global> <tract> <reserv> \
28 <pool> <poolabs> <poolmfs> <poolmv> \
29 <root> <format> <buffer> <walk> \
30 <ref> <trace> <traceanc> <protsw> <prmcan> \
31 <shield> <vmw3> \
32 <thw3> <thw3i3> <ssan> <mpsi> <ld> \
33 <event> <seg> <sac> <poolmrg> <message> <mpsioan> \
34 <poolams> <poolamsi> <dbgpool> <dbgpooli> \
35 <abq> <meter> <cbs> <poolmv2> <splay> <diag> <version> <poolmvff>
36PLINTH = <mpsliban> <mpsioan> 23PLINTH = <mpsliban> <mpsioan>
37AMC = <poolamc> 24AMC = <poolamc>
38AMS = <poolams> <poolamsi> 25AMS = <poolams> <poolamsi>
39AWL = <poolawl> 26AWL = <poolawl>
40LO = <poollo> 27LO = <poollo>
41SNC = <poolsnc> 28SNC = <poolsnc>
29MVFF = <poolmvff>
30N = <pooln>
42DW = <fmtdy> <fmtno> 31DW = <fmtdy> <fmtno>
43FMTTEST = <fmthe> <fmtdy> <fmtno> <fmtdytst> 32FMTTEST = <fmthe> <fmtdy> <fmtno> <fmtdytst>
44POOLN = <pooln> 33POOLN = <pooln>
@@ -57,237 +46,90 @@ TESTLIB = <testlib>
57# macro which expands to the flags that the variety should use when building 46# macro which expands to the flags that the variety should use when building
58# libraries 47# libraries
59 48
60!IF "$(VARIETY)" == "he" 49!IF "$(VARIETY)" == "hot"
61CFLAGS=$(CFLAGSCOMMONPRE) $(CFHE) $(CFLAGSCOMMONPOST) 50CFLAGS=$(CFLAGSCOMMONPRE) $(CFHOT) $(CFLAGSCOMMONPOST)
62LINKFLAGS=$(LINKFLAGSCOMMON) $(LFHE) 51LINKFLAGS=$(LINKFLAGSCOMMON) $(LFHOT)
63LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSHE) 52LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSHOT)
64MPMOBJ0 = $(MPM:<=w3i3mv\he\) 53MPMOBJ0 = $(MPM:<=w3i3mv\hot\)
65MPMOBJ = $(MPMOBJ0:>=.obj) 54PLINTHOBJ0 = $(PLINTH:<=w3i3mv\hot\)
66PLINTHOBJ0 = $(PLINTH:<=w3i3mv\he\) 55AMSOBJ0 = $(AMS:<=w3i3mv\hot\)
67PLINTHOBJ = $(PLINTHOBJ0:>=.obj) 56AMCOBJ0 = $(AMC:<=w3i3mv\hot\)
68SWOBJ0 = $(SW:<=w3i3mv\he\) 57AWLOBJ0 = $(AWL:<=w3i3mv\hot\)
69SWOBJ = $(SWOBJ0:>=.obj) 58LOOBJ0 = $(LO:<=w3i3mv\hot\)
70AMSOBJ0 = $(AMS:<=w3i3mv\he\) 59SNCOBJ0 = $(SNC:<=w3i3mv\hot\)
71AMSOBJ = $(AMSOBJ0:>=.obj) 60MVFFOBJ0 = $(MVFF:<=w3i3mv\hot\)
72AMCOBJ0 = $(AMC:<=w3i3mv\he\) 61DWOBJ0 = $(DW:<=w3i3mv\hot\)
73AMCOBJ = $(AMCOBJ0:>=.obj) 62FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\hot\)
74AWLOBJ0 = $(AWL:<=w3i3mv\he\) 63POOLNOBJ0 = $(POOLN:<=w3i3mv\hot\)
75AWLOBJ = $(AWLOBJ0:>=.obj) 64TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\hot\)
76LOOBJ0 = $(LO:<=w3i3mv\he\)
77LOOBJ = $(LOOBJ0:>=.obj)
78SNCOBJ0 = $(SNC:<=w3i3mv\he\)
79SNCOBJ = $(SNCOBJ0:>=.obj)
80DWOBJ0 = $(DW:<=w3i3mv\he\)
81DWOBJ = $(DWOBJ0:>=.obj)
82FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\he\)
83FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
84POOLNOBJ0 = $(POOLN:<=w3i3mv\he\)
85POOLNOBJ = $(POOLNOBJ0:>=.obj)
86TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\he\)
87TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
88
89!ELSEIF "$(VARIETY)" == "ce"
90CFLAGS=$(CFLAGSCOMMONPRE) $(CFCE) $(CFLAGSCOMMONPOST)
91LINKFLAGS=$(LINKFLAGSCOMMON) $(LFCE)
92LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSCE)
93MPMOBJ0 = $(MPM:<=w3i3mv\ce\)
94MPMOBJ = $(MPMOBJ0:>=.obj)
95PLINTHOBJ0 = $(PLINTH:<=w3i3mv\ce\)
96PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
97SWOBJ0 = $(SW:<=w3i3mv\ce\)
98SWOBJ = $(SWOBJ0:>=.obj)
99AMSOBJ0 = $(AMS:<=w3i3mv\ce\)
100AMSOBJ = $(AMSOBJ0:>=.obj)
101AMCOBJ0 = $(AMC:<=w3i3mv\ce\)
102AMCOBJ = $(AMCOBJ0:>=.obj)
103AWLOBJ0 = $(AWL:<=w3i3mv\ce\)
104AWLOBJ = $(AWLOBJ0:>=.obj)
105LOOBJ0 = $(LO:<=w3i3mv\ce\)
106LOOBJ = $(LOOBJ0:>=.obj)
107SNCOBJ0 = $(SNC:<=w3i3mv\ce\)
108SNCOBJ = $(SNCOBJ0:>=.obj)
109DWOBJ0 = $(DW:<=w3i3mv\ce\)
110DWOBJ = $(DWOBJ0:>=.obj)
111FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\ce\)
112FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
113POOLNOBJ0 = $(POOLN:<=w3i3mv\ce\)
114POOLNOBJ = $(POOLNOBJ0:>=.obj)
115TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\ce\)
116TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
117
118!ELSEIF "$(VARIETY)" == "hi"
119CFLAGS=$(CFLAGSCOMMONPRE) $(CFHI) $(CFLAGSCOMMONPOST)
120LINKFLAGS=$(LINKFLAGSCOMMON) $(LFHI)
121LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSHI)
122MPMOBJ0 = $(MPM:<=w3i3mv\hi\)
123MPMOBJ = $(MPMOBJ0:>=.obj)
124PLINTHOBJ0 = $(PLINTH:<=w3i3mv\hi\)
125PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
126SWOBJ0 = $(SW:<=w3i3mv\hi\)
127SWOBJ = $(SWOBJ0:>=.obj)
128AMSOBJ0 = $(AMS:<=w3i3mv\hi\)
129AMSOBJ = $(AMSOBJ0:>=.obj)
130AMCOBJ0 = $(AMC:<=w3i3mv\hi\)
131AMCOBJ = $(AMCOBJ0:>=.obj)
132AWLOBJ0 = $(AWL:<=w3i3mv\hi\)
133AWLOBJ = $(AWLOBJ0:>=.obj)
134LOOBJ0 = $(LO:<=w3i3mv\hi\)
135LOOBJ = $(LOOBJ0:>=.obj)
136SNCOBJ0 = $(SNC:<=w3i3mv\hi\)
137SNCOBJ = $(SNCOBJ0:>=.obj)
138DWOBJ0 = $(DW:<=w3i3mv\hi\)
139DWOBJ = $(DWOBJ0:>=.obj)
140FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\hi\)
141FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
142POOLNOBJ0 = $(POOLN:<=w3i3mv\hi\)
143POOLNOBJ = $(POOLNOBJ0:>=.obj)
144TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\hi\)
145TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
146 65
147!ELSEIF "$(VARIETY)" == "di" 66!ELSEIF "$(VARIETY)" == "di"
148CFLAGS=$(CFLAGSCOMMONPRE) $(CFDI) $(CFLAGSCOMMONPOST) 67CFLAGS=$(CFLAGSCOMMONPRE) $(CFDI) $(CFLAGSCOMMONPOST)
149LINKFLAGS=$(LINKFLAGSCOMMON) $(LFDI) 68LINKFLAGS=$(LINKFLAGSCOMMON) $(LFDI)
150LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSDI) 69LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSDI)
151MPMOBJ0 = $(MPM:<=w3i3mv\di\) 70MPMOBJ0 = $(MPM:<=w3i3mv\di\)
152MPMOBJ = $(MPMOBJ0:>=.obj)
153PLINTHOBJ0 = $(PLINTH:<=w3i3mv\di\) 71PLINTHOBJ0 = $(PLINTH:<=w3i3mv\di\)
154PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
155SWOBJ0 = $(SW:<=w3i3mv\di\)
156SWOBJ = $(SWOBJ0:>=.obj)
157AMSOBJ0 = $(AMS:<=w3i3mv\di\) 72AMSOBJ0 = $(AMS:<=w3i3mv\di\)
158AMSOBJ = $(AMSOBJ0:>=.obj)
159AMCOBJ0 = $(AMC:<=w3i3mv\di\) 73AMCOBJ0 = $(AMC:<=w3i3mv\di\)
160AMCOBJ = $(AMCOBJ0:>=.obj)
161AWLOBJ0 = $(AWL:<=w3i3mv\di\) 74AWLOBJ0 = $(AWL:<=w3i3mv\di\)
162AWLOBJ = $(AWLOBJ0:>=.obj)
163LOOBJ0 = $(LO:<=w3i3mv\di\) 75LOOBJ0 = $(LO:<=w3i3mv\di\)
164LOOBJ = $(LOOBJ0:>=.obj)
165SNCOBJ0 = $(SNC:<=w3i3mv\di\) 76SNCOBJ0 = $(SNC:<=w3i3mv\di\)
166SNCOBJ = $(SNCOBJ0:>=.obj) 77MVFFOBJ0 = $(MVFF:<=w3i3mv\di\)
167DWOBJ0 = $(DW:<=w3i3mv\di\) 78DWOBJ0 = $(DW:<=w3i3mv\di\)
168DWOBJ = $(DWOBJ0:>=.obj)
169FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\di\) 79FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\di\)
170FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
171POOLNOBJ0 = $(POOLN:<=w3i3mv\di\) 80POOLNOBJ0 = $(POOLN:<=w3i3mv\di\)
172POOLNOBJ = $(POOLNOBJ0:>=.obj)
173TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\di\) 81TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\di\)
174TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
175 82
176!ELSEIF "$(VARIETY)" == "ci" 83!ELSEIF "$(VARIETY)" == "cool"
177CFLAGS=$(CFLAGSCOMMONPRE) $(CFCI) $(CFLAGSCOMMONPOST) 84CFLAGS=$(CFLAGSCOMMONPRE) $(CFCOOL) $(CFLAGSCOMMONPOST)
178LINKFLAGS=$(LINKFLAGSCOMMON) $(LFCI) 85LINKFLAGS=$(LINKFLAGSCOMMON) $(LFCOOL)
179LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSCI) 86LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSCOOL)
180MPMOBJ0 = $(MPM:<=w3i3mv\ci\) 87MPMOBJ0 = $(MPM:<=w3i3mv\cool\)
181MPMOBJ = $(MPMOBJ0:>=.obj) 88PLINTHOBJ0 = $(PLINTH:<=w3i3mv\cool\)
182PLINTHOBJ0 = $(PLINTH:<=w3i3mv\ci\) 89AMSOBJ0 = $(AMS:<=w3i3mv\cool\)
183PLINTHOBJ = $(PLINTHOBJ0:>=.obj) 90AMCOBJ0 = $(AMC:<=w3i3mv\cool\)
184SWOBJ0 = $(SW:<=w3i3mv\ci\) 91AWLOBJ0 = $(AWL:<=w3i3mv\cool\)
185SWOBJ = $(SWOBJ0:>=.obj) 92LOOBJ0 = $(LO:<=w3i3mv\cool\)
186AMSOBJ0 = $(AMS:<=w3i3mv\ci\) 93SNCOBJ0 = $(SNC:<=w3i3mv\cool\)
187AMSOBJ = $(AMSOBJ0:>=.obj) 94MVFFOBJ0 = $(MVFF:<=w3i3mv\cool\)
188AMCOBJ0 = $(AMC:<=w3i3mv\ci\) 95DWOBJ0 = $(DW:<=w3i3mv\cool\)
189AMCOBJ = $(AMCOBJ0:>=.obj) 96FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\cool\)
190AWLOBJ0 = $(AWL:<=w3i3mv\ci\) 97POOLNOBJ0 = $(POOLN:<=w3i3mv\cool\)
191AWLOBJ = $(AWLOBJ0:>=.obj) 98TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\cool\)
192LOOBJ0 = $(LO:<=w3i3mv\ci\)
193LOOBJ = $(LOOBJ0:>=.obj)
194SNCOBJ0 = $(SNC:<=w3i3mv\ci\)
195SNCOBJ = $(SNCOBJ0:>=.obj)
196DWOBJ0 = $(DW:<=w3i3mv\ci\)
197DWOBJ = $(DWOBJ0:>=.obj)
198FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\ci\)
199FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
200POOLNOBJ0 = $(POOLN:<=w3i3mv\ci\)
201POOLNOBJ = $(POOLNOBJ0:>=.obj)
202TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\ci\)
203TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
204 99
205!ELSEIF "$(VARIETY)" == "ti" 100!ELSEIF "$(VARIETY)" == "ti"
206CFLAGS=$(CFLAGSCOMMONPRE) $(CFTI) $(CFLAGSCOMMONPOST) 101CFLAGS=$(CFLAGSCOMMONPRE) $(CFTI) $(CFLAGSCOMMONPOST)
207LINKFLAGS=$(LINKFLAGSCOMMON) $(LFTI) 102LINKFLAGS=$(LINKFLAGSCOMMON) $(LFTI)
208LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSTI) 103LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSTI)
209MPMOBJ0 = $(MPM:<=w3i3mv\ti\) 104MPMOBJ0 = $(MPM:<=w3i3mv\ti\)
210MPMOBJ = $(MPMOBJ0:>=.obj)
211PLINTHOBJ0 = $(PLINTH:<=w3i3mv\ti\) 105PLINTHOBJ0 = $(PLINTH:<=w3i3mv\ti\)
212PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
213SWOBJ0 = $(SW:<=w3i3mv\ti\)
214SWOBJ = $(SWOBJ0:>=.obj)
215AMSOBJ0 = $(AMS:<=w3i3mv\ti\) 106AMSOBJ0 = $(AMS:<=w3i3mv\ti\)
216AMSOBJ = $(AMSOBJ0:>=.obj)
217AMCOBJ0 = $(AMC:<=w3i3mv\ti\) 107AMCOBJ0 = $(AMC:<=w3i3mv\ti\)
218AMCOBJ = $(AMCOBJ0:>=.obj)
219AWLOBJ0 = $(AWL:<=w3i3mv\ti\) 108AWLOBJ0 = $(AWL:<=w3i3mv\ti\)
220AWLOBJ = $(AWLOBJ0:>=.obj)
221LOOBJ0 = $(LO:<=w3i3mv\ti\) 109LOOBJ0 = $(LO:<=w3i3mv\ti\)
222LOOBJ = $(LOOBJ0:>=.obj)
223SNCOBJ0 = $(SNC:<=w3i3mv\ti\) 110SNCOBJ0 = $(SNC:<=w3i3mv\ti\)
224SNCOBJ = $(SNCOBJ0:>=.obj) 111MVFFOBJ0 = $(MVFF:<=w3i3mv\ti\)
225DWOBJ0 = $(DW:<=w3i3mv\ti\) 112DWOBJ0 = $(DW:<=w3i3mv\ti\)
226DWOBJ = $(DWOBJ0:>=.obj)
227FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\ti\) 113FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\ti\)
228FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
229POOLNOBJ0 = $(POOLN:<=w3i3mv\ti\) 114POOLNOBJ0 = $(POOLN:<=w3i3mv\ti\)
230POOLNOBJ = $(POOLNOBJ0:>=.obj)
231TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\ti\) 115TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\ti\)
232TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
233
234!ELSEIF "$(VARIETY)" == "wi"
235CFLAGS=$(CFLAGSCOMMONPRE) $(CFWI) $(CFLAGSCOMMONPOST)
236LINKFLAGS=$(LINKFLAGSCOMMON) $(LFWI)
237LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSWI)
238MPMOBJ0 = $(MPM:<=w3i3mv\wi\)
239MPMOBJ = $(MPMOBJ0:>=.obj)
240PLINTHOBJ0 = $(PLINTH:<=w3i3mv\wi\)
241PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
242SWOBJ0 = $(SW:<=w3i3mv\wi\)
243SWOBJ = $(SWOBJ0:>=.obj)
244AMSOBJ0 = $(AMS:<=w3i3mv\wi\)
245AMSOBJ = $(AMSOBJ0:>=.obj)
246AMCOBJ0 = $(AMC:<=w3i3mv\wi\)
247AMCOBJ = $(AMCOBJ0:>=.obj)
248AWLOBJ0 = $(AWL:<=w3i3mv\wi\)
249AWLOBJ = $(AWLOBJ0:>=.obj)
250LOOBJ0 = $(LO:<=w3i3mv\wi\)
251LOOBJ = $(LOOBJ0:>=.obj)
252SNCOBJ0 = $(SNC:<=w3i3mv\wi\)
253SNCOBJ = $(SNCOBJ0:>=.obj)
254DWOBJ0 = $(DW:<=w3i3mv\wi\)
255DWOBJ = $(DWOBJ0:>=.obj)
256FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\wi\)
257FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
258POOLNOBJ0 = $(POOLN:<=w3i3mv\wi\)
259POOLNOBJ = $(POOLNOBJ0:>=.obj)
260TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\wi\)
261TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
262 116
263!ELSEIF "$(VARIETY)" == "we" 117!ELSEIF "$(VARIETY)" == "we"
264CFLAGS=$(CFLAGSCOMMONPRE) $(CFWE) $(CFLAGSCOMMONPOST) 118CFLAGS=$(CFLAGSCOMMONPRE) $(CFWE) $(CFLAGSCOMMONPOST)
265LINKFLAGS=$(LINKFLAGSCOMMON) $(LFWE) 119LINKFLAGS=$(LINKFLAGSCOMMON) $(LFWE)
266LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSWE) 120LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSWE)
267MPMOBJ0 = $(MPM:<=w3i3mv\we\) 121MPMOBJ0 = $(MPM:<=w3i3mv\we\)
268MPMOBJ = $(MPMOBJ0:>=.obj)
269PLINTHOBJ0 = $(PLINTH:<=w3i3mv\we\) 122PLINTHOBJ0 = $(PLINTH:<=w3i3mv\we\)
270PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
271SWOBJ0 = $(SW:<=w3i3mv\we\)
272SWOBJ = $(SWOBJ0:>=.obj)
273AMSOBJ0 = $(AMS:<=w3i3mv\we\) 123AMSOBJ0 = $(AMS:<=w3i3mv\we\)
274AMSOBJ = $(AMSOBJ0:>=.obj)
275AMCOBJ0 = $(AMC:<=w3i3mv\we\) 124AMCOBJ0 = $(AMC:<=w3i3mv\we\)
276AMCOBJ = $(AMCOBJ0:>=.obj)
277AWLOBJ0 = $(AWL:<=w3i3mv\we\) 125AWLOBJ0 = $(AWL:<=w3i3mv\we\)
278AWLOBJ = $(AWLOBJ0:>=.obj)
279LOOBJ0 = $(LO:<=w3i3mv\we\) 126LOOBJ0 = $(LO:<=w3i3mv\we\)
280LOOBJ = $(LOOBJ0:>=.obj)
281SNCOBJ0 = $(SNC:<=w3i3mv\we\) 127SNCOBJ0 = $(SNC:<=w3i3mv\we\)
282SNCOBJ = $(SNCOBJ0:>=.obj) 128MVFFOBJ0 = $(MVFF:<=w3i3mv\we\)
283DWOBJ0 = $(DW:<=w3i3mv\we\) 129DWOBJ0 = $(DW:<=w3i3mv\we\)
284DWOBJ = $(DWOBJ0:>=.obj)
285FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\we\) 130FMTTESTOBJ0 = $(FMTTEST:<=w3i3mv\we\)
286FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
287POOLNOBJ0 = $(POOLN:<=w3i3mv\we\) 131POOLNOBJ0 = $(POOLN:<=w3i3mv\we\)
288POOLNOBJ = $(POOLNOBJ0:>=.obj)
289TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\we\) 132TESTLIBOBJ0 = $(TESTLIB:<=w3i3mv\we\)
290TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
291 133
292#!ELSEIF "$(VARIETY)" == "cv" 134#!ELSEIF "$(VARIETY)" == "cv"
293#CFLAGS=$(CFLAGSCOMMON) $(CFCV) 135#CFLAGS=$(CFLAGSCOMMON) $(CFCV)
@@ -316,6 +158,19 @@ TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
316 158
317!ENDIF 159!ENDIF
318 160
161MPMOBJ = $(MPMOBJ0:>=.obj)
162PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
163AMSOBJ = $(AMSOBJ0:>=.obj)
164AMCOBJ = $(AMCOBJ0:>=.obj)
165AWLOBJ = $(AWLOBJ0:>=.obj)
166LOOBJ = $(LOOBJ0:>=.obj)
167SNCOBJ = $(SNCOBJ0:>=.obj)
168MVFFOBJ = $(MVFFOBJ0:>=.obj)
169DWOBJ = $(DWOBJ0:>=.obj)
170FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
171POOLNOBJ = $(POOLNOBJ0:>=.obj)
172TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
173
319 174
320!INCLUDE commpost.nmk 175!INCLUDE commpost.nmk
321 176
diff --git a/mps/code/w3i6mv.nmk b/mps/code/w3i6mv.nmk
index 8ac1c1e3cc2..d339d1534a8 100644
--- a/mps/code/w3i6mv.nmk
+++ b/mps/code/w3i6mv.nmk
@@ -5,10 +5,6 @@
5 5
6PFM = w3i6mv 6PFM = w3i6mv
7 7
8# @@@@ Can we remove this? RB 2012-03-26
9RAINBOWPATH = MSVISUAL\WIN32\I386
10DONGLELIB = $(RAINBOWPATH)\spromeps.lib
11
12# /Gs appears to be necessary to suppress stack checks. Stack checks 8# /Gs appears to be necessary to suppress stack checks. Stack checks
13# (if not suppressed) generate a dependency on the C library, __chkesp, 9# (if not suppressed) generate a dependency on the C library, __chkesp,
14# which causes the linker step to fail when building the DLL, mpsdy.dll. 10# which causes the linker step to fail when building the DLL, mpsdy.dll.
@@ -25,22 +21,13 @@ MPM = <ring> <mpm> <bt> <protocol> <boot> \
25 <thw3> <thw3i6> <ssw3mv> <mpsi> <mpsiw3> <ld> <span> \ 21 <thw3> <thw3i6> <ssw3mv> <mpsi> <mpsiw3> <ld> <span> \
26 <event> <seg> <sac> <poolmrg> <message> <dbgpool> <dbgpooli> \ 22 <event> <seg> <sac> <poolmrg> <message> <dbgpool> <dbgpooli> \
27 <abq> <meter> <cbs> <poolmv2> <splay> <diag> <version> 23 <abq> <meter> <cbs> <poolmv2> <splay> <diag> <version>
28SW = <ring> <mpm> <bt> <protocol> <boot> \
29 <arenavm> <arenacl> <locus> <arena> <global> <tract> <reserv> \
30 <pool> <poolabs> <poolmfs> <poolmv> \
31 <root> <format> <buffer> <walk> \
32 <ref> <trace> <traceanc> <protsw> <prmcan> \
33 <shield> <vmw3> \
34 <thw3> <thw3i6> <ssan> <mpsi> <ld> \
35 <event> <seg> <sac> <poolmrg> <message> <mpsioan> \
36 <poolams> <poolamsi> <dbgpool> <dbgpooli> \
37 <abq> <meter> <cbs> <poolmv2> <splay> <diag> <version> <poolmvff>
38PLINTH = <mpsliban> <mpsioan> 24PLINTH = <mpsliban> <mpsioan>
39AMC = <poolamc> 25AMC = <poolamc>
40AMS = <poolams> <poolamsi> 26AMS = <poolams> <poolamsi>
41AWL = <poolawl> 27AWL = <poolawl>
42LO = <poollo> 28LO = <poollo>
43SNC = <poolsnc> 29SNC = <poolsnc>
30MVFF = <poolmvff>
44DW = <fmtdy> <fmtno> 31DW = <fmtdy> <fmtno>
45FMTTEST = <fmthe> <fmtdy> <fmtno> <fmtdytst> 32FMTTEST = <fmthe> <fmtdy> <fmtno> <fmtdytst>
46POOLN = <pooln> 33POOLN = <pooln>
@@ -59,237 +46,90 @@ TESTLIB = <testlib>
59# macro which expands to the flags that the variety should use when building 46# macro which expands to the flags that the variety should use when building
60# libraries 47# libraries
61 48
62!IF "$(VARIETY)" == "he" 49!IF "$(VARIETY)" == "hot"
63CFLAGS=$(CFLAGSCOMMONPRE) $(CFHE) $(CFLAGSCOMMONPOST) 50CFLAGS=$(CFLAGSCOMMONPRE) $(CFHOT) $(CFLAGSCOMMONPOST)
64LINKFLAGS=$(LINKFLAGSCOMMON) $(LFHE) 51LINKFLAGS=$(LINKFLAGSCOMMON) $(LFHOT)
65LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSHE) 52LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSHOT)
66MPMOBJ0 = $(MPM:<=w3i6mv\he\) 53MPMOBJ0 = $(MPM:<=w3i6mv\hot\)
67MPMOBJ = $(MPMOBJ0:>=.obj) 54PLINTHOBJ0 = $(PLINTH:<=w3i6mv\hot\)
68PLINTHOBJ0 = $(PLINTH:<=w3i6mv\he\) 55AMSOBJ0 = $(AMS:<=w3i6mv\hot\)
69PLINTHOBJ = $(PLINTHOBJ0:>=.obj) 56AMCOBJ0 = $(AMC:<=w3i6mv\hot\)
70SWOBJ0 = $(SW:<=w3i6mv\he\) 57AWLOBJ0 = $(AWL:<=w3i6mv\hot\)
71SWOBJ = $(SWOBJ0:>=.obj) 58LOOBJ0 = $(LO:<=w3i6mv\hot\)
72AMSOBJ0 = $(AMS:<=w3i6mv\he\) 59SNCOBJ0 = $(SNC:<=w3i6mv\hot\)
73AMSOBJ = $(AMSOBJ0:>=.obj) 60MVFFOBJ0 = $(MVFF:<=w3i6mv\hot\)
74AMCOBJ0 = $(AMC:<=w3i6mv\he\) 61DWOBJ0 = $(DW:<=w3i6mv\hot\)
75AMCOBJ = $(AMCOBJ0:>=.obj) 62FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\hot\)
76AWLOBJ0 = $(AWL:<=w3i6mv\he\) 63POOLNOBJ0 = $(POOLN:<=w3i6mv\hot\)
77AWLOBJ = $(AWLOBJ0:>=.obj) 64TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\hot\)
78LOOBJ0 = $(LO:<=w3i6mv\he\)
79LOOBJ = $(LOOBJ0:>=.obj)
80SNCOBJ0 = $(SNC:<=w3i6mv\he\)
81SNCOBJ = $(SNCOBJ0:>=.obj)
82DWOBJ0 = $(DW:<=w3i6mv\he\)
83DWOBJ = $(DWOBJ0:>=.obj)
84FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\he\)
85FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
86POOLNOBJ0 = $(POOLN:<=w3i6mv\he\)
87POOLNOBJ = $(POOLNOBJ0:>=.obj)
88TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\he\)
89TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
90
91!ELSEIF "$(VARIETY)" == "ce"
92CFLAGS=$(CFLAGSCOMMONPRE) $(CFCE) $(CFLAGSCOMMONPOST)
93LINKFLAGS=$(LINKFLAGSCOMMON) $(LFCE)
94LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSCE)
95MPMOBJ0 = $(MPM:<=w3i6mv\ce\)
96MPMOBJ = $(MPMOBJ0:>=.obj)
97PLINTHOBJ0 = $(PLINTH:<=w3i6mv\ce\)
98PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
99SWOBJ0 = $(SW:<=w3i6mv\ce\)
100SWOBJ = $(SWOBJ0:>=.obj)
101AMSOBJ0 = $(AMS:<=w3i6mv\ce\)
102AMSOBJ = $(AMSOBJ0:>=.obj)
103AMCOBJ0 = $(AMC:<=w3i6mv\ce\)
104AMCOBJ = $(AMCOBJ0:>=.obj)
105AWLOBJ0 = $(AWL:<=w3i6mv\ce\)
106AWLOBJ = $(AWLOBJ0:>=.obj)
107LOOBJ0 = $(LO:<=w3i6mv\ce\)
108LOOBJ = $(LOOBJ0:>=.obj)
109SNCOBJ0 = $(SNC:<=w3i6mv\ce\)
110SNCOBJ = $(SNCOBJ0:>=.obj)
111DWOBJ0 = $(DW:<=w3i6mv\ce\)
112DWOBJ = $(DWOBJ0:>=.obj)
113FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\ce\)
114FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
115POOLNOBJ0 = $(POOLN:<=w3i6mv\ce\)
116POOLNOBJ = $(POOLNOBJ0:>=.obj)
117TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\ce\)
118TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
119
120!ELSEIF "$(VARIETY)" == "hi"
121CFLAGS=$(CFLAGSCOMMONPRE) $(CFHI) $(CFLAGSCOMMONPOST)
122LINKFLAGS=$(LINKFLAGSCOMMON) $(LFHI)
123LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSHI)
124MPMOBJ0 = $(MPM:<=w3i6mv\hi\)
125MPMOBJ = $(MPMOBJ0:>=.obj)
126PLINTHOBJ0 = $(PLINTH:<=w3i6mv\hi\)
127PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
128SWOBJ0 = $(SW:<=w3i6mv\hi\)
129SWOBJ = $(SWOBJ0:>=.obj)
130AMSOBJ0 = $(AMS:<=w3i6mv\hi\)
131AMSOBJ = $(AMSOBJ0:>=.obj)
132AMCOBJ0 = $(AMC:<=w3i6mv\hi\)
133AMCOBJ = $(AMCOBJ0:>=.obj)
134AWLOBJ0 = $(AWL:<=w3i6mv\hi\)
135AWLOBJ = $(AWLOBJ0:>=.obj)
136LOOBJ0 = $(LO:<=w3i6mv\hi\)
137LOOBJ = $(LOOBJ0:>=.obj)
138SNCOBJ0 = $(SNC:<=w3i6mv\hi\)
139SNCOBJ = $(SNCOBJ0:>=.obj)
140DWOBJ0 = $(DW:<=w3i6mv\hi\)
141DWOBJ = $(DWOBJ0:>=.obj)
142FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\hi\)
143FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
144POOLNOBJ0 = $(POOLN:<=w3i6mv\hi\)
145POOLNOBJ = $(POOLNOBJ0:>=.obj)
146TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\hi\)
147TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
148 65
149!ELSEIF "$(VARIETY)" == "di" 66!ELSEIF "$(VARIETY)" == "di"
150CFLAGS=$(CFLAGSCOMMONPRE) $(CFDI) $(CFLAGSCOMMONPOST) 67CFLAGS=$(CFLAGSCOMMONPRE) $(CFDI) $(CFLAGSCOMMONPOST)
151LINKFLAGS=$(LINKFLAGSCOMMON) $(LFDI) 68LINKFLAGS=$(LINKFLAGSCOMMON) $(LFDI)
152LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSDI) 69LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSDI)
153MPMOBJ0 = $(MPM:<=w3i6mv\di\) 70MPMOBJ0 = $(MPM:<=w3i6mv\di\)
154MPMOBJ = $(MPMOBJ0:>=.obj)
155PLINTHOBJ0 = $(PLINTH:<=w3i6mv\di\) 71PLINTHOBJ0 = $(PLINTH:<=w3i6mv\di\)
156PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
157SWOBJ0 = $(SW:<=w3i6mv\di\)
158SWOBJ = $(SWOBJ0:>=.obj)
159AMSOBJ0 = $(AMS:<=w3i6mv\di\) 72AMSOBJ0 = $(AMS:<=w3i6mv\di\)
160AMSOBJ = $(AMSOBJ0:>=.obj)
161AMCOBJ0 = $(AMC:<=w3i6mv\di\) 73AMCOBJ0 = $(AMC:<=w3i6mv\di\)
162AMCOBJ = $(AMCOBJ0:>=.obj)
163AWLOBJ0 = $(AWL:<=w3i6mv\di\) 74AWLOBJ0 = $(AWL:<=w3i6mv\di\)
164AWLOBJ = $(AWLOBJ0:>=.obj)
165LOOBJ0 = $(LO:<=w3i6mv\di\) 75LOOBJ0 = $(LO:<=w3i6mv\di\)
166LOOBJ = $(LOOBJ0:>=.obj)
167SNCOBJ0 = $(SNC:<=w3i6mv\di\) 76SNCOBJ0 = $(SNC:<=w3i6mv\di\)
168SNCOBJ = $(SNCOBJ0:>=.obj) 77MVFFOBJ0 = $(MVFF:<=w3i6mv\di\)
169DWOBJ0 = $(DW:<=w3i6mv\di\) 78DWOBJ0 = $(DW:<=w3i6mv\di\)
170DWOBJ = $(DWOBJ0:>=.obj)
171FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\di\) 79FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\di\)
172FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
173POOLNOBJ0 = $(POOLN:<=w3i6mv\di\) 80POOLNOBJ0 = $(POOLN:<=w3i6mv\di\)
174POOLNOBJ = $(POOLNOBJ0:>=.obj)
175TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\di\) 81TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\di\)
176TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
177 82
178!ELSEIF "$(VARIETY)" == "ci" 83!ELSEIF "$(VARIETY)" == "cool"
179CFLAGS=$(CFLAGSCOMMONPRE) $(CFCI) $(CFLAGSCOMMONPOST) 84CFLAGS=$(CFLAGSCOMMONPRE) $(CFCOOL) $(CFLAGSCOMMONPOST)
180LINKFLAGS=$(LINKFLAGSCOMMON) $(LFCI) 85LINKFLAGS=$(LINKFLAGSCOMMON) $(LFCOOL)
181LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSCI) 86LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSCOOL)
182MPMOBJ0 = $(MPM:<=w3i6mv\ci\) 87MPMOBJ0 = $(MPM:<=w3i6mv\cool\)
183MPMOBJ = $(MPMOBJ0:>=.obj) 88PLINTHOBJ0 = $(PLINTH:<=w3i6mv\cool\)
184PLINTHOBJ0 = $(PLINTH:<=w3i6mv\ci\) 89AMSOBJ0 = $(AMS:<=w3i6mv\cool\)
185PLINTHOBJ = $(PLINTHOBJ0:>=.obj) 90AMCOBJ0 = $(AMC:<=w3i6mv\cool\)
186SWOBJ0 = $(SW:<=w3i6mv\ci\) 91AWLOBJ0 = $(AWL:<=w3i6mv\cool\)
187SWOBJ = $(SWOBJ0:>=.obj) 92LOOBJ0 = $(LO:<=w3i6mv\cool\)
188AMSOBJ0 = $(AMS:<=w3i6mv\ci\) 93SNCOBJ0 = $(SNC:<=w3i6mv\cool\)
189AMSOBJ = $(AMSOBJ0:>=.obj) 94MVFFOBJ0 = $(MVFF:<=w3i6mv\cool\)
190AMCOBJ0 = $(AMC:<=w3i6mv\ci\) 95DWOBJ0 = $(DW:<=w3i6mv\cool\)
191AMCOBJ = $(AMCOBJ0:>=.obj) 96FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\cool\)
192AWLOBJ0 = $(AWL:<=w3i6mv\ci\) 97POOLNOBJ0 = $(POOLN:<=w3i6mv\cool\)
193AWLOBJ = $(AWLOBJ0:>=.obj) 98TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\cool\)
194LOOBJ0 = $(LO:<=w3i6mv\ci\)
195LOOBJ = $(LOOBJ0:>=.obj)
196SNCOBJ0 = $(SNC:<=w3i6mv\ci\)
197SNCOBJ = $(SNCOBJ0:>=.obj)
198DWOBJ0 = $(DW:<=w3i6mv\ci\)
199DWOBJ = $(DWOBJ0:>=.obj)
200FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\ci\)
201FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
202POOLNOBJ0 = $(POOLN:<=w3i6mv\ci\)
203POOLNOBJ = $(POOLNOBJ0:>=.obj)
204TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\ci\)
205TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
206 99
207!ELSEIF "$(VARIETY)" == "ti" 100!ELSEIF "$(VARIETY)" == "ti"
208CFLAGS=$(CFLAGSCOMMONPRE) $(CFTI) $(CFLAGSCOMMONPOST) 101CFLAGS=$(CFLAGSCOMMONPRE) $(CFTI) $(CFLAGSCOMMONPOST)
209LINKFLAGS=$(LINKFLAGSCOMMON) $(LFTI) 102LINKFLAGS=$(LINKFLAGSCOMMON) $(LFTI)
210LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSTI) 103LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSTI)
211MPMOBJ0 = $(MPM:<=w3i6mv\ti\) 104MPMOBJ0 = $(MPM:<=w3i6mv\ti\)
212MPMOBJ = $(MPMOBJ0:>=.obj)
213PLINTHOBJ0 = $(PLINTH:<=w3i6mv\ti\) 105PLINTHOBJ0 = $(PLINTH:<=w3i6mv\ti\)
214PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
215SWOBJ0 = $(SW:<=w3i6mv\ti\)
216SWOBJ = $(SWOBJ0:>=.obj)
217AMSOBJ0 = $(AMS:<=w3i6mv\ti\) 106AMSOBJ0 = $(AMS:<=w3i6mv\ti\)
218AMSOBJ = $(AMSOBJ0:>=.obj)
219AMCOBJ0 = $(AMC:<=w3i6mv\ti\) 107AMCOBJ0 = $(AMC:<=w3i6mv\ti\)
220AMCOBJ = $(AMCOBJ0:>=.obj)
221AWLOBJ0 = $(AWL:<=w3i6mv\ti\) 108AWLOBJ0 = $(AWL:<=w3i6mv\ti\)
222AWLOBJ = $(AWLOBJ0:>=.obj)
223LOOBJ0 = $(LO:<=w3i6mv\ti\) 109LOOBJ0 = $(LO:<=w3i6mv\ti\)
224LOOBJ = $(LOOBJ0:>=.obj)
225SNCOBJ0 = $(SNC:<=w3i6mv\ti\) 110SNCOBJ0 = $(SNC:<=w3i6mv\ti\)
226SNCOBJ = $(SNCOBJ0:>=.obj) 111MVFFOBJ0 = $(MVFF:<=w3i6mv\ti\)
227DWOBJ0 = $(DW:<=w3i6mv\ti\) 112DWOBJ0 = $(DW:<=w3i6mv\ti\)
228DWOBJ = $(DWOBJ0:>=.obj)
229FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\ti\) 113FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\ti\)
230FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
231POOLNOBJ0 = $(POOLN:<=w3i6mv\ti\) 114POOLNOBJ0 = $(POOLN:<=w3i6mv\ti\)
232POOLNOBJ = $(POOLNOBJ0:>=.obj)
233TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\ti\) 115TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\ti\)
234TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
235
236!ELSEIF "$(VARIETY)" == "wi"
237CFLAGS=$(CFLAGSCOMMONPRE) $(CFWI) $(CFLAGSCOMMONPOST)
238LINKFLAGS=$(LINKFLAGSCOMMON) $(LFWI)
239LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSWI)
240MPMOBJ0 = $(MPM:<=w3i6mv\wi\)
241MPMOBJ = $(MPMOBJ0:>=.obj)
242PLINTHOBJ0 = $(PLINTH:<=w3i6mv\wi\)
243PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
244SWOBJ0 = $(SW:<=w3i6mv\wi\)
245SWOBJ = $(SWOBJ0:>=.obj)
246AMSOBJ0 = $(AMS:<=w3i6mv\wi\)
247AMSOBJ = $(AMSOBJ0:>=.obj)
248AMCOBJ0 = $(AMC:<=w3i6mv\wi\)
249AMCOBJ = $(AMCOBJ0:>=.obj)
250AWLOBJ0 = $(AWL:<=w3i6mv\wi\)
251AWLOBJ = $(AWLOBJ0:>=.obj)
252LOOBJ0 = $(LO:<=w3i6mv\wi\)
253LOOBJ = $(LOOBJ0:>=.obj)
254SNCOBJ0 = $(SNC:<=w3i6mv\wi\)
255SNCOBJ = $(SNCOBJ0:>=.obj)
256DWOBJ0 = $(DW:<=w3i6mv\wi\)
257DWOBJ = $(DWOBJ0:>=.obj)
258FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\wi\)
259FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
260POOLNOBJ0 = $(POOLN:<=w3i6mv\wi\)
261POOLNOBJ = $(POOLNOBJ0:>=.obj)
262TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\wi\)
263TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
264 116
265!ELSEIF "$(VARIETY)" == "we" 117!ELSEIF "$(VARIETY)" == "we"
266CFLAGS=$(CFLAGSCOMMONPRE) $(CFWE) $(CFLAGSCOMMONPOST) 118CFLAGS=$(CFLAGSCOMMONPRE) $(CFWE) $(CFLAGSCOMMONPOST)
267LINKFLAGS=$(LINKFLAGSCOMMON) $(LFWE) 119LINKFLAGS=$(LINKFLAGSCOMMON) $(LFWE)
268LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSWE) 120LIBFLAGS=$(LIBFLAGSCOMMON) $(LIBFLAGSWE)
269MPMOBJ0 = $(MPM:<=w3i6mv\we\) 121MPMOBJ0 = $(MPM:<=w3i6mv\we\)
270MPMOBJ = $(MPMOBJ0:>=.obj)
271PLINTHOBJ0 = $(PLINTH:<=w3i6mv\we\) 122PLINTHOBJ0 = $(PLINTH:<=w3i6mv\we\)
272PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
273SWOBJ0 = $(SW:<=w3i6mv\we\)
274SWOBJ = $(SWOBJ0:>=.obj)
275AMSOBJ0 = $(AMS:<=w3i6mv\we\) 123AMSOBJ0 = $(AMS:<=w3i6mv\we\)
276AMSOBJ = $(AMSOBJ0:>=.obj)
277AMCOBJ0 = $(AMC:<=w3i6mv\we\) 124AMCOBJ0 = $(AMC:<=w3i6mv\we\)
278AMCOBJ = $(AMCOBJ0:>=.obj)
279AWLOBJ0 = $(AWL:<=w3i6mv\we\) 125AWLOBJ0 = $(AWL:<=w3i6mv\we\)
280AWLOBJ = $(AWLOBJ0:>=.obj)
281LOOBJ0 = $(LO:<=w3i6mv\we\) 126LOOBJ0 = $(LO:<=w3i6mv\we\)
282LOOBJ = $(LOOBJ0:>=.obj)
283SNCOBJ0 = $(SNC:<=w3i6mv\we\) 127SNCOBJ0 = $(SNC:<=w3i6mv\we\)
284SNCOBJ = $(SNCOBJ0:>=.obj) 128MVFFOBJ0 = $(MVFF:<=w3i6mv\we\)
285DWOBJ0 = $(DW:<=w3i6mv\we\) 129DWOBJ0 = $(DW:<=w3i6mv\we\)
286DWOBJ = $(DWOBJ0:>=.obj)
287FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\we\) 130FMTTESTOBJ0 = $(FMTTEST:<=w3i6mv\we\)
288FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
289POOLNOBJ0 = $(POOLN:<=w3i6mv\we\) 131POOLNOBJ0 = $(POOLN:<=w3i6mv\we\)
290POOLNOBJ = $(POOLNOBJ0:>=.obj)
291TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\we\) 132TESTLIBOBJ0 = $(TESTLIB:<=w3i6mv\we\)
292TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
293 133
294#!ELSEIF "$(VARIETY)" == "cv" 134#!ELSEIF "$(VARIETY)" == "cv"
295#CFLAGS=$(CFLAGSCOMMON) $(CFCV) 135#CFLAGS=$(CFLAGSCOMMON) $(CFCV)
@@ -318,6 +158,19 @@ TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
318 158
319!ENDIF 159!ENDIF
320 160
161MPMOBJ = $(MPMOBJ0:>=.obj)
162PLINTHOBJ = $(PLINTHOBJ0:>=.obj)
163AMSOBJ = $(AMSOBJ0:>=.obj)
164AMCOBJ = $(AMCOBJ0:>=.obj)
165AWLOBJ = $(AWLOBJ0:>=.obj)
166LOOBJ = $(LOOBJ0:>=.obj)
167SNCOBJ = $(SNCOBJ0:>=.obj)
168MVFFOBJ = $(MVFFOBJ0:>=.obj)
169DWOBJ = $(DWOBJ0:>=.obj)
170FMTTESTOBJ = $(FMTTESTOBJ0:>=.obj)
171POOLNOBJ = $(POOLNOBJ0:>=.obj)
172TESTLIBOBJ = $(TESTLIBOBJ0:>=.obj)
173
321 174
322!INCLUDE commpost.nmk 175!INCLUDE commpost.nmk
323 176
diff --git a/mps/code/xci3gc.gmk b/mps/code/xci3gc.gmk
index a8bed82a7f1..1aea3bc22d5 100644
--- a/mps/code/xci3gc.gmk
+++ b/mps/code/xci3gc.gmk
@@ -9,7 +9,6 @@ PFM = xci3gc
9 9
10MPMPF = lockix.c than.c vmix.c \ 10MPMPF = lockix.c than.c vmix.c \
11 protix.c protsgix.c prmcan.c span.c ssixi3.c 11 protix.c protsgix.c prmcan.c span.c ssixi3.c
12SWPF = than.c vmxc.c protsw.c prmcan.c ssan.c
13 12
14LIBS = 13LIBS =
15 14