diff options
| author | Richard Brooksby | 2013-05-08 16:21:12 +0100 |
|---|---|---|
| committer | Richard Brooksby | 2013-05-08 16:21:12 +0100 |
| commit | 07f446a4502af8891d4e074328bba74134f5487c (patch) | |
| tree | 4006e8cc1c0ff6328fc09fa2939244853bcfba64 /mps/code | |
| parent | f774413584de082d8cc8adc899c6ad9376138702 (diff) | |
| download | emacs-07f446a4502af8891d4e074328bba74134f5487c.tar.gz emacs-07f446a4502af8891d4e074328bba74134f5487c.zip | |
Converting pools to use keyword arguments, mostly, and so far inconsistently, but at least it compiles.
Copied from Perforce
Change: 181635
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
35 files changed, 491 insertions, 132 deletions
diff --git a/mps/code/arena.c b/mps/code/arena.c index e36aa03cea4..b8397c4dfc3 100644 --- a/mps/code/arena.c +++ b/mps/code/arena.c | |||
| @@ -301,10 +301,8 @@ Res ControlInit(Arena arena) | |||
| 301 | Res res; | 301 | Res res; |
| 302 | 302 | ||
| 303 | AVERT(Arena, arena); | 303 | AVERT(Arena, arena); |
| 304 | res = PoolInit(&arena->controlPoolStruct.poolStruct, | 304 | res = PoolInit(&arena->controlPoolStruct.poolStruct, arena, |
| 305 | arena, PoolClassMV(), | 305 | PoolClassMV(), argsNone); |
| 306 | ARENA_CONTROL_EXTENDBY, ARENA_CONTROL_AVGSIZE, | ||
| 307 | ARENA_CONTROL_MAXSIZE); | ||
| 308 | if (res != ResOK) | 306 | if (res != ResOK) |
| 309 | return res; | 307 | return res; |
| 310 | arena->poolReady = TRUE; /* <design/arena/#pool.ready> */ | 308 | arena->poolReady = TRUE; /* <design/arena/#pool.ready> */ |
diff --git a/mps/code/arenacv.c b/mps/code/arenacv.c index 60f482b2a93..18b5ba3418f 100644 --- a/mps/code/arenacv.c +++ b/mps/code/arenacv.c | |||
| @@ -337,7 +337,7 @@ static void testPageTable(ArenaClass class, Size size, Addr addr) | |||
| 337 | Arena arena; Pool pool; | 337 | Arena arena; Pool pool; |
| 338 | Size pageSize; | 338 | Size pageSize; |
| 339 | Count tractsPerPage; | 339 | Count tractsPerPage; |
| 340 | ArgStruct args[3]; | 340 | ArgStruct args[4]; |
| 341 | 341 | ||
| 342 | args[0].key = MPS_KEY_ARENA_SIZE; | 342 | args[0].key = MPS_KEY_ARENA_SIZE; |
| 343 | args[0].val.size = size; | 343 | args[0].val.size = size; |
| @@ -346,9 +346,7 @@ static void testPageTable(ArenaClass class, Size size, Addr addr) | |||
| 346 | args[2].key = MPS_KEY_ARGS_END; | 346 | args[2].key = MPS_KEY_ARGS_END; |
| 347 | die(ArenaCreate(&arena, class, args), "ArenaCreate"); | 347 | die(ArenaCreate(&arena, class, args), "ArenaCreate"); |
| 348 | 348 | ||
| 349 | die(PoolCreate(&pool, arena, PoolClassMV(), | 349 | die(PoolCreate(&pool, arena, PoolClassMV(), argsNone), "PoolCreate"); |
| 350 | (Size)65536, (Size)32, (Size)65536), | ||
| 351 | "PoolCreate"); | ||
| 352 | 350 | ||
| 353 | pageSize = ArenaAlign(arena); | 351 | pageSize = ArenaAlign(arena); |
| 354 | tractsPerPage = pageSize / sizeof(TractStruct); | 352 | tractsPerPage = pageSize / sizeof(TractStruct); |
diff --git a/mps/code/arg.c b/mps/code/arg.c index 3528dcce136..b74b9d6886b 100644 --- a/mps/code/arg.c +++ b/mps/code/arg.c | |||
| @@ -25,6 +25,8 @@ Bool ArgCheckCant(Arg arg) { | |||
| 25 | 25 | ||
| 26 | const KeyStruct _mps_key_varargs = {KeySig, "VARARGS", ArgCheckCant}; | 26 | const KeyStruct _mps_key_varargs = {KeySig, "VARARGS", ArgCheckCant}; |
| 27 | 27 | ||
| 28 | ArgStruct mps_args_none[] = {{MPS_KEY_ARGS_END}}; | ||
| 29 | |||
| 28 | 30 | ||
| 29 | /* KeyCheck -- check the validity of an argument key */ | 31 | /* KeyCheck -- check the validity of an argument key */ |
| 30 | 32 | ||
diff --git a/mps/code/cbs.c b/mps/code/cbs.c index a9cb0d0b087..4c48c690cc3 100644 --- a/mps/code/cbs.c +++ b/mps/code/cbs.c | |||
| @@ -273,6 +273,7 @@ Res CBSInit(Arena arena, CBS cbs, void *owner, | |||
| 273 | Bool mayUseInline, Bool fastFind) | 273 | Bool mayUseInline, Bool fastFind) |
| 274 | { | 274 | { |
| 275 | Res res; | 275 | Res res; |
| 276 | ArgStruct args[3]; | ||
| 276 | 277 | ||
| 277 | AVERT(Arena, arena); | 278 | AVERT(Arena, arena); |
| 278 | AVER(new == NULL || FUNCHECK(new)); | 279 | AVER(new == NULL || FUNCHECK(new)); |
| @@ -286,8 +287,12 @@ Res CBSInit(Arena arena, CBS cbs, void *owner, | |||
| 286 | 287 | ||
| 287 | SplayTreeInit(splayTreeOfCBS(cbs), &cbsSplayCompare, | 288 | SplayTreeInit(splayTreeOfCBS(cbs), &cbsSplayCompare, |
| 288 | fastFind ? &cbsUpdateNode : NULL); | 289 | fastFind ? &cbsUpdateNode : NULL); |
| 289 | res = PoolCreate(&(cbs->blockPool), arena, PoolClassMFS(), | 290 | args[0].key = MPS_KEY_MFS_UNIT_SIZE; |
| 290 | sizeof(CBSBlockStruct) * 64, sizeof(CBSBlockStruct)); | 291 | args[0].val.size = sizeof(CBSBlockStruct); |
| 292 | args[1].key = MPS_KEY_MFS_EXTEND_BY; | ||
| 293 | args[1].val.size = sizeof(CBSBlockStruct) * 64; | ||
| 294 | args[2].key = MPS_KEY_ARGS_END; | ||
| 295 | res = PoolCreate(&(cbs->blockPool), arena, PoolClassMFS(), args); | ||
| 291 | if (res != ResOK) | 296 | if (res != ResOK) |
| 292 | return res; | 297 | return res; |
| 293 | cbs->splayTreeSize = 0; | 298 | cbs->splayTreeSize = 0; |
diff --git a/mps/code/config.h b/mps/code/config.h index 33ce96951ec..9fc57096bc7 100644 --- a/mps/code/config.h +++ b/mps/code/config.h | |||
| @@ -238,6 +238,18 @@ | |||
| 238 | #define EPVMDefaultSubsequentSegSIZE ((Size)64 * 1024) | 238 | #define EPVMDefaultSubsequentSegSIZE ((Size)64 * 1024) |
| 239 | 239 | ||
| 240 | 240 | ||
| 241 | /* Pool MV Configuration -- see <code/poolmv.c> */ | ||
| 242 | |||
| 243 | #define MV_EXTEND_BY_DEFAULT ((Size)4096) | ||
| 244 | #define MV_AVG_SIZE_DEFAULT ((Size)32) | ||
| 245 | #define MV_MAX_SIZE_DEFAULT ((Size)65536) | ||
| 246 | |||
| 247 | |||
| 248 | /* Pool MFS Configuration -- see <code/poolmfs.c> */ | ||
| 249 | |||
| 250 | #define MFS_EXTEND_BY_DEFAULT ((Size)65536) | ||
| 251 | |||
| 252 | |||
| 241 | /* Arena Configuration -- see <code/arena.c> | 253 | /* Arena Configuration -- see <code/arena.c> |
| 242 | * | 254 | * |
| 243 | * .client.seg-size: ARENA_CLIENT_PAGE_SIZE is the size in bytes of a | 255 | * .client.seg-size: ARENA_CLIENT_PAGE_SIZE is the size in bytes of a |
| @@ -245,10 +257,6 @@ | |||
| 245 | * with no particular justification. | 257 | * with no particular justification. |
| 246 | */ | 258 | */ |
| 247 | 259 | ||
| 248 | #define ARENA_CONTROL_EXTENDBY ((Size)4096) | ||
| 249 | #define ARENA_CONTROL_AVGSIZE ((Size)32) | ||
| 250 | #define ARENA_CONTROL_MAXSIZE ((Size)65536) | ||
| 251 | |||
| 252 | #define ArenaPollALLOCTIME (65536.0) | 260 | #define ArenaPollALLOCTIME (65536.0) |
| 253 | 261 | ||
| 254 | #define ARENA_ZONESHIFT ((Shift)20) | 262 | #define ARENA_ZONESHIFT ((Shift)20) |
diff --git a/mps/code/dbgpool.c b/mps/code/dbgpool.c index 8a3bc7e3034..447ed1672d8 100644 --- a/mps/code/dbgpool.c +++ b/mps/code/dbgpool.c | |||
| @@ -117,17 +117,32 @@ static Bool PoolDebugOptionsCheck(PoolDebugOptions opt) | |||
| 117 | * Someday, this could be split into fence and tag init methods. | 117 | * Someday, this could be split into fence and tag init methods. |
| 118 | */ | 118 | */ |
| 119 | 119 | ||
| 120 | static Res DebugPoolInit(Pool pool, va_list args) | 120 | const KeyStruct _mps_key_pool_debug_option = { |
| 121 | KeySig, "POOL_DEBUG_OPTION", ArgCheckCant /* FIXME: ArgCheckPoolDebugOption */ | ||
| 122 | }; | ||
| 123 | |||
| 124 | static Res DebugPoolInit(Pool pool, ArgList args) | ||
| 121 | { | 125 | { |
| 122 | Res res; | 126 | Res res; |
| 123 | PoolDebugOptions options; | 127 | PoolDebugOptions options; |
| 124 | PoolDebugMixin debug; | 128 | PoolDebugMixin debug; |
| 125 | TagInitMethod tagInit; | 129 | TagInitMethod tagInit; |
| 126 | Size tagSize; | 130 | Size tagSize; |
| 131 | ArgStruct arg; | ||
| 127 | 132 | ||
| 128 | AVERT(Pool, pool); | 133 | AVERT(Pool, pool); |
| 129 | options = va_arg(args, PoolDebugOptions); | 134 | |
| 135 | /* FIXME: Split this structure into separate keys */ | ||
| 136 | /* FIXME: Can't use varargs -- update docs. */ | ||
| 137 | if (ArgPick(&arg, args, MPS_KEY_POOL_DEBUG_OPTION)) | ||
| 138 | options = (PoolDebugOptions)arg.val.pool_debug_option; | ||
| 139 | else { | ||
| 140 | res = ResPARAM; | ||
| 141 | goto failParam; | ||
| 142 | } | ||
| 143 | |||
| 130 | AVERT(PoolDebugOptions, options); | 144 | AVERT(PoolDebugOptions, options); |
| 145 | |||
| 131 | /* @@@@ Tag parameters should be taken from options, but tags have */ | 146 | /* @@@@ Tag parameters should be taken from options, but tags have */ |
| 132 | /* not been published yet. */ | 147 | /* not been published yet. */ |
| 133 | tagInit = NULL; tagSize = 0; | 148 | tagInit = NULL; tagSize = 0; |
| @@ -173,11 +188,16 @@ static Res DebugPoolInit(Pool pool, va_list args) | |||
| 173 | /* tag init */ | 188 | /* tag init */ |
| 174 | debug->tagInit = tagInit; | 189 | debug->tagInit = tagInit; |
| 175 | if (debug->tagInit != NULL) { | 190 | if (debug->tagInit != NULL) { |
| 191 | ArgStruct pcArgs[3]; | ||
| 176 | debug->tagSize = tagSize + sizeof(tagStruct) - 1; | 192 | debug->tagSize = tagSize + sizeof(tagStruct) - 1; |
| 177 | /* This pool has to be like the arena control pool: the blocks */ | 193 | /* This pool has to be like the arena control pool: the blocks */ |
| 178 | /* allocated must be accessible using void*. */ | 194 | /* allocated must be accessible using void*. */ |
| 179 | res = PoolCreate(&debug->tagPool, PoolArena(pool), PoolClassMFS(), | 195 | pcArgs[0].key = MPS_KEY_MFS_EXTEND_BY; |
| 180 | debug->tagSize, debug->tagSize); | 196 | pcArgs[0].val.size = debug->tagSize; /* FIXME: Really? */ |
| 197 | pcArgs[1].key = MPS_KEY_MFS_UNIT_SIZE; | ||
| 198 | pcArgs[1].val.size = debug->tagSize; | ||
| 199 | pcArgs[2].key = MPS_KEY_ARGS_END; | ||
| 200 | res = PoolCreate(&debug->tagPool, PoolArena(pool), PoolClassMFS(), pcArgs); | ||
| 181 | if (res != ResOK) | 201 | if (res != ResOK) |
| 182 | goto tagFail; | 202 | goto tagFail; |
| 183 | debug->missingTags = 0; | 203 | debug->missingTags = 0; |
| @@ -191,6 +211,7 @@ static Res DebugPoolInit(Pool pool, va_list args) | |||
| 191 | tagFail: | 211 | tagFail: |
| 192 | alignFail: | 212 | alignFail: |
| 193 | SuperclassOfPool(pool)->finish(pool); | 213 | SuperclassOfPool(pool)->finish(pool); |
| 214 | failParam: | ||
| 194 | return res; | 215 | return res; |
| 195 | } | 216 | } |
| 196 | 217 | ||
diff --git a/mps/code/global.c b/mps/code/global.c index 2071918ad0e..a1204332d9c 100644 --- a/mps/code/global.c +++ b/mps/code/global.c | |||
| @@ -834,7 +834,7 @@ Res ArenaFinalize(Arena arena, Ref obj) | |||
| 834 | if (!arena->isFinalPool) { | 834 | if (!arena->isFinalPool) { |
| 835 | Pool pool; | 835 | Pool pool; |
| 836 | 836 | ||
| 837 | res = PoolCreate(&pool, arena, PoolClassMRG()); | 837 | res = PoolCreate(&pool, arena, PoolClassMRG(), argsNone); |
| 838 | if (res != ResOK) | 838 | if (res != ResOK) |
| 839 | return res; | 839 | return res; |
| 840 | arena->finalPool = pool; | 840 | arena->finalPool = pool; |
diff --git a/mps/code/mpm.h b/mps/code/mpm.h index db4e2415045..bd3752460f7 100644 --- a/mps/code/mpm.h +++ b/mps/code/mpm.h | |||
| @@ -132,6 +132,7 @@ extern Bool ResIsAllocFailure(Res res); | |||
| 132 | 132 | ||
| 133 | /* Argument Lists */ | 133 | /* Argument Lists */ |
| 134 | 134 | ||
| 135 | #define argsNone mps_args_none | ||
| 135 | extern Bool KeyCheck(Key key); | 136 | extern Bool KeyCheck(Key key); |
| 136 | extern Bool ArgCheck(Arg arg); | 137 | extern Bool ArgCheck(Arg arg); |
| 137 | extern Bool ArgListCheck(ArgList args); | 138 | extern Bool ArgListCheck(ArgList args); |
| @@ -187,8 +188,7 @@ extern char *MPSVersion(void); | |||
| 187 | 188 | ||
| 188 | /* Pool Interface -- see impl.c.pool */ | 189 | /* Pool Interface -- see impl.c.pool */ |
| 189 | 190 | ||
| 190 | extern Res PoolInit(Pool pool, Arena arena, PoolClass class, ...); | 191 | extern Res PoolInit(Pool pool, Arena arena, PoolClass class, ArgList args); |
| 191 | extern Res PoolInitV(Pool pool, Arena arena, PoolClass class, va_list args); | ||
| 192 | extern void PoolFinish(Pool pool); | 192 | extern void PoolFinish(Pool pool); |
| 193 | extern Bool PoolClassCheck(PoolClass class); | 193 | extern Bool PoolClassCheck(PoolClass class); |
| 194 | extern Bool PoolCheck(Pool pool); | 194 | extern Bool PoolCheck(Pool pool); |
| @@ -205,9 +205,8 @@ extern double PoolMutatorAllocSize(Pool pool); | |||
| 205 | extern Bool PoolOfAddr(Pool *poolReturn, Arena arena, Addr addr); | 205 | extern Bool PoolOfAddr(Pool *poolReturn, Arena arena, Addr addr); |
| 206 | extern Bool PoolHasAddr(Pool pool, Addr addr); | 206 | extern Bool PoolHasAddr(Pool pool, Addr addr); |
| 207 | 207 | ||
| 208 | extern Res PoolCreate(Pool *poolReturn, Arena arena, PoolClass class, ...); | 208 | extern Res PoolCreate(Pool *poolReturn, Arena arena, PoolClass class, |
| 209 | extern Res PoolCreateV(Pool *poolReturn, Arena arena, PoolClass class, | 209 | ArgList args); |
| 210 | va_list arg); | ||
| 211 | extern void PoolDestroy(Pool pool); | 210 | extern void PoolDestroy(Pool pool); |
| 212 | extern BufferClass PoolDefaultBufferClass(Pool pool); | 211 | extern BufferClass PoolDefaultBufferClass(Pool pool); |
| 213 | extern Res PoolAlloc(Addr *pReturn, Pool pool, Size size, | 212 | extern Res PoolAlloc(Addr *pReturn, Pool pool, Size size, |
| @@ -229,7 +228,7 @@ extern void PoolTraceEnd(Pool pool, Trace trace); | |||
| 229 | extern void PoolWalk(Pool pool, Seg seg, FormattedObjectsStepMethod f, | 228 | extern void PoolWalk(Pool pool, Seg seg, FormattedObjectsStepMethod f, |
| 230 | void *v, size_t s); | 229 | void *v, size_t s); |
| 231 | extern void PoolFreeWalk(Pool pool, FreeBlockStepMethod f, void *p); | 230 | extern void PoolFreeWalk(Pool pool, FreeBlockStepMethod f, void *p); |
| 232 | extern Res PoolTrivInit(Pool pool, va_list arg); | 231 | extern Res PoolTrivInit(Pool pool, ArgList arg); |
| 233 | extern void PoolTrivFinish(Pool pool); | 232 | extern void PoolTrivFinish(Pool pool); |
| 234 | extern Res PoolNoAlloc(Addr *pReturn, Pool pool, Size size, | 233 | extern Res PoolNoAlloc(Addr *pReturn, Pool pool, Size size, |
| 235 | Bool withReservoirPermit); | 234 | Bool withReservoirPermit); |
diff --git a/mps/code/mpmtypes.h b/mps/code/mpmtypes.h index 8df2e91dbb0..cadb8f2bff1 100644 --- a/mps/code/mpmtypes.h +++ b/mps/code/mpmtypes.h | |||
| @@ -182,7 +182,7 @@ typedef Res (*BufferDescribeMethod)(Buffer buffer, mps_lib_FILE *stream); | |||
| 182 | 182 | ||
| 183 | /* Order of types corresponds to PoolClassStruct in <code/mpmst.h> */ | 183 | /* Order of types corresponds to PoolClassStruct in <code/mpmst.h> */ |
| 184 | 184 | ||
| 185 | typedef Res (*PoolInitMethod)(Pool pool, va_list args); | 185 | typedef Res (*PoolInitMethod)(Pool pool, ArgList args); |
| 186 | typedef void (*PoolFinishMethod)(Pool pool); | 186 | typedef void (*PoolFinishMethod)(Pool pool); |
| 187 | typedef Res (*PoolAllocMethod)(Addr *pReturn, Pool pool, Size size, | 187 | typedef Res (*PoolAllocMethod)(Addr *pReturn, Pool pool, Size size, |
| 188 | Bool withReservoirPermit); | 188 | Bool withReservoirPermit); |
diff --git a/mps/code/mps.h b/mps/code/mps.h index 0b450da9f5b..4b30f133187 100644 --- a/mps/code/mps.h +++ b/mps/code/mps.h | |||
| @@ -107,6 +107,10 @@ typedef struct mps_arg_s { | |||
| 107 | size_t size; | 107 | size_t size; |
| 108 | va_list varargs; | 108 | va_list varargs; |
| 109 | mps_addr_t addr; | 109 | mps_addr_t addr; |
| 110 | mps_fmt_t format; | ||
| 111 | mps_chain_t chain; | ||
| 112 | struct mps_pool_debug_option_s *pool_debug_option; | ||
| 113 | mps_addr_t (*addr_method)(mps_addr_t); | ||
| 110 | } val; | 114 | } val; |
| 111 | } mps_arg_s; | 115 | } mps_arg_s; |
| 112 | 116 | ||
| @@ -120,6 +124,12 @@ extern const struct mps_key_s _mps_key_varargs; | |||
| 120 | #define MPS_KEY_VARARGS (&_mps_key_varargs) | 124 | #define MPS_KEY_VARARGS (&_mps_key_varargs) |
| 121 | extern const struct mps_key_s _mps_key_arena_size; | 125 | extern const struct mps_key_s _mps_key_arena_size; |
| 122 | #define MPS_KEY_ARENA_SIZE (&_mps_key_arena_size) | 126 | #define MPS_KEY_ARENA_SIZE (&_mps_key_arena_size) |
| 127 | extern const struct mps_key_s _mps_key_format; | ||
| 128 | #define MPS_KEY_FORMAT (&_mps_key_format) | ||
| 129 | extern const struct mps_key_s _mps_key_chain; | ||
| 130 | #define MPS_KEY_CHAIN (&_mps_key_chain) | ||
| 131 | |||
| 132 | extern mps_arg_s mps_args_none[]; | ||
| 123 | 133 | ||
| 124 | 134 | ||
| 125 | /* <a id="message.types"> Keep in sync with | 135 | /* <a id="message.types"> Keep in sync with |
| @@ -347,6 +357,8 @@ extern mps_res_t mps_pool_create(mps_pool_t *, mps_arena_t, | |||
| 347 | mps_class_t, ...); | 357 | mps_class_t, ...); |
| 348 | extern mps_res_t mps_pool_create_v(mps_pool_t *, mps_arena_t, | 358 | extern mps_res_t mps_pool_create_v(mps_pool_t *, mps_arena_t, |
| 349 | mps_class_t, va_list); | 359 | mps_class_t, va_list); |
| 360 | extern mps_res_t mps_pool_create_k(mps_pool_t *, mps_arena_t, | ||
| 361 | mps_class_t, mps_arg_s []); | ||
| 350 | extern void mps_pool_destroy(mps_pool_t); | 362 | extern void mps_pool_destroy(mps_pool_t); |
| 351 | 363 | ||
| 352 | /* .gen-param: This structure must match <code/chain.h#gen-param>. */ | 364 | /* .gen-param: This structure must match <code/chain.h#gen-param>. */ |
| @@ -634,6 +646,9 @@ typedef struct mps_pool_debug_option_s { | |||
| 634 | size_t free_size; | 646 | size_t free_size; |
| 635 | } mps_pool_debug_option_s; | 647 | } mps_pool_debug_option_s; |
| 636 | 648 | ||
| 649 | extern const struct mps_key_s _mps_key_pool_debug_option; | ||
| 650 | #define MPS_KEY_POOL_DEBUG_OPTION (&_mps_key_pool_debug_option) | ||
| 651 | |||
| 637 | extern void mps_pool_check_fenceposts(mps_pool_t); | 652 | extern void mps_pool_check_fenceposts(mps_pool_t); |
| 638 | extern void mps_pool_check_free_space(mps_pool_t); | 653 | extern void mps_pool_check_free_space(mps_pool_t); |
| 639 | 654 | ||
diff --git a/mps/code/mps.xcodeproj/project.pbxproj b/mps/code/mps.xcodeproj/project.pbxproj index 134e873becc..20510f2cf75 100644 --- a/mps/code/mps.xcodeproj/project.pbxproj +++ b/mps/code/mps.xcodeproj/project.pbxproj | |||
| @@ -1038,6 +1038,51 @@ | |||
| 1038 | 3114A6C6156E9815001E0AA3 /* mpseventcnv */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mpseventcnv; sourceTree = BUILT_PRODUCTS_DIR; }; | 1038 | 3114A6C6156E9815001E0AA3 /* mpseventcnv */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mpseventcnv; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 1039 | 3114A6D0156E9829001E0AA3 /* eventcnv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = eventcnv.c; sourceTree = "<group>"; }; | 1039 | 3114A6D0156E9829001E0AA3 /* eventcnv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = eventcnv.c; sourceTree = "<group>"; }; |
| 1040 | 3114A6D9156E9950001E0AA3 /* eventpro.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = eventpro.c; sourceTree = "<group>"; }; | 1040 | 3114A6D9156E9950001E0AA3 /* eventpro.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = eventpro.c; sourceTree = "<group>"; }; |
| 1041 | 311F2F5017398AD500C15B6A /* boot.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = boot.h; sourceTree = "<group>"; }; | ||
| 1042 | 311F2F5117398AE900C15B6A /* bt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bt.h; sourceTree = "<group>"; }; | ||
| 1043 | 311F2F5217398AE900C15B6A /* cbs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cbs.h; sourceTree = "<group>"; }; | ||
| 1044 | 311F2F5317398AE900C15B6A /* chain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = chain.h; sourceTree = "<group>"; }; | ||
| 1045 | 311F2F5417398AE900C15B6A /* check.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = check.h; sourceTree = "<group>"; }; | ||
| 1046 | 311F2F5517398AE900C15B6A /* clock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = clock.h; sourceTree = "<group>"; }; | ||
| 1047 | 311F2F5617398AE900C15B6A /* config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; }; | ||
| 1048 | 311F2F5717398AE900C15B6A /* dbgpool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = dbgpool.h; sourceTree = "<group>"; }; | ||
| 1049 | 311F2F5817398AE900C15B6A /* event.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = event.h; sourceTree = "<group>"; }; | ||
| 1050 | 311F2F5917398AE900C15B6A /* eventcom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = eventcom.h; sourceTree = "<group>"; }; | ||
| 1051 | 311F2F5A17398AE900C15B6A /* eventdef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = eventdef.h; sourceTree = "<group>"; }; | ||
| 1052 | 311F2F5B17398AE900C15B6A /* eventpro.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = eventpro.h; sourceTree = "<group>"; }; | ||
| 1053 | 311F2F5C17398AE900C15B6A /* eventrep.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = eventrep.h; sourceTree = "<group>"; }; | ||
| 1054 | 311F2F5D17398B0400C15B6A /* lo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = lo.h; sourceTree = "<group>"; }; | ||
| 1055 | 311F2F5E17398B0E00C15B6A /* lock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = lock.h; sourceTree = "<group>"; }; | ||
| 1056 | 311F2F5F17398B0E00C15B6A /* meter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = meter.h; sourceTree = "<group>"; }; | ||
| 1057 | 311F2F6017398B0E00C15B6A /* misc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = misc.h; sourceTree = "<group>"; }; | ||
| 1058 | 311F2F6117398B0E00C15B6A /* mpm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpm.h; sourceTree = "<group>"; }; | ||
| 1059 | 311F2F6217398B1A00C15B6A /* mpmst.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpmst.h; sourceTree = "<group>"; }; | ||
| 1060 | 311F2F6317398B1A00C15B6A /* mpmtypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpmtypes.h; sourceTree = "<group>"; }; | ||
| 1061 | 311F2F6417398B1A00C15B6A /* mps.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mps.h; sourceTree = "<group>"; }; | ||
| 1062 | 311F2F6517398B3B00C15B6A /* mpsacl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpsacl.h; sourceTree = "<group>"; }; | ||
| 1063 | 311F2F6617398B3B00C15B6A /* mpsavm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpsavm.h; sourceTree = "<group>"; }; | ||
| 1064 | 311F2F6717398B3B00C15B6A /* mpsio.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpsio.h; sourceTree = "<group>"; }; | ||
| 1065 | 311F2F6817398B3B00C15B6A /* mpslib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpslib.h; sourceTree = "<group>"; }; | ||
| 1066 | 311F2F6917398B3B00C15B6A /* mpstd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpstd.h; sourceTree = "<group>"; }; | ||
| 1067 | 311F2F6A17398B4C00C15B6A /* mpsw3.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpsw3.h; sourceTree = "<group>"; }; | ||
| 1068 | 311F2F6B17398B4C00C15B6A /* mpswin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpswin.h; sourceTree = "<group>"; }; | ||
| 1069 | 311F2F6C17398B5800C15B6A /* osxc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = osxc.h; sourceTree = "<group>"; }; | ||
| 1070 | 311F2F6D17398B6300C15B6A /* prmci3.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = prmci3.h; sourceTree = "<group>"; }; | ||
| 1071 | 311F2F6E17398B6300C15B6A /* prmci6.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = prmci6.h; sourceTree = "<group>"; }; | ||
| 1072 | 311F2F6F17398B6300C15B6A /* prmcix.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = prmcix.h; sourceTree = "<group>"; }; | ||
| 1073 | 311F2F7017398B6300C15B6A /* prmcw3.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = prmcw3.h; sourceTree = "<group>"; }; | ||
| 1074 | 311F2F7117398B7100C15B6A /* protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = protocol.h; sourceTree = "<group>"; }; | ||
| 1075 | 311F2F7217398B7100C15B6A /* pthrdext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = pthrdext.h; sourceTree = "<group>"; }; | ||
| 1076 | 311F2F7317398B7100C15B6A /* ring.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ring.h; sourceTree = "<group>"; }; | ||
| 1077 | 311F2F7417398B7100C15B6A /* sac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = sac.h; sourceTree = "<group>"; }; | ||
| 1078 | 311F2F7517398B8E00C15B6A /* sc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = sc.h; sourceTree = "<group>"; }; | ||
| 1079 | 311F2F7617398B8E00C15B6A /* splay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = splay.h; sourceTree = "<group>"; }; | ||
| 1080 | 311F2F7717398B8E00C15B6A /* ss.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ss.h; sourceTree = "<group>"; }; | ||
| 1081 | 311F2F7817398B8E00C15B6A /* th.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = th.h; sourceTree = "<group>"; }; | ||
| 1082 | 311F2F7917398B8E00C15B6A /* thw3.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = thw3.h; sourceTree = "<group>"; }; | ||
| 1083 | 311F2F7A17398B8E00C15B6A /* tract.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tract.h; sourceTree = "<group>"; }; | ||
| 1084 | 311F2F7B17398E7600C15B6A /* poolmv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = poolmv.h; sourceTree = "<group>"; }; | ||
| 1085 | 311F2F7C17398E9A00C15B6A /* mpscmv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpscmv.h; sourceTree = "<group>"; }; | ||
| 1041 | 3124CAB8156BE3EC00753214 /* awlut */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = awlut; sourceTree = BUILT_PRODUCTS_DIR; }; | 1086 | 3124CAB8156BE3EC00753214 /* awlut */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = awlut; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 1042 | 3124CAC2156BE40100753214 /* awlut.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = awlut.c; sourceTree = "<group>"; }; | 1087 | 3124CAC2156BE40100753214 /* awlut.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = awlut.c; sourceTree = "<group>"; }; |
| 1043 | 3124CAC6156BE48D00753214 /* fmtdy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fmtdy.c; sourceTree = "<group>"; }; | 1088 | 3124CAC6156BE48D00753214 /* fmtdy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fmtdy.c; sourceTree = "<group>"; }; |
| @@ -1053,6 +1098,9 @@ | |||
| 1053 | 317B3C2A1731830100F9A469 /* arg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = arg.c; sourceTree = "<group>"; }; | 1098 | 317B3C2A1731830100F9A469 /* arg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = arg.c; sourceTree = "<group>"; }; |
| 1054 | 31A47BA3156C1E130039B1C2 /* mps.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mps.c; sourceTree = "<group>"; }; | 1099 | 31A47BA3156C1E130039B1C2 /* mps.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mps.c; sourceTree = "<group>"; }; |
| 1055 | 31A47BA5156C1E5E0039B1C2 /* ssixi3.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ssixi3.c; sourceTree = "<group>"; }; | 1100 | 31A47BA5156C1E5E0039B1C2 /* ssixi3.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ssixi3.c; sourceTree = "<group>"; }; |
| 1101 | 31CD33BB173A9F1500524741 /* mpscams.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpscams.h; sourceTree = "<group>"; }; | ||
| 1102 | 31CD33BC173A9F1500524741 /* poolams.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = poolams.c; sourceTree = "<group>"; }; | ||
| 1103 | 31CD33BD173A9F1500524741 /* poolams.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = poolams.h; sourceTree = "<group>"; }; | ||
| 1056 | 31D60006156D3C5F00337B26 /* segsmss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = segsmss.c; sourceTree = "<group>"; }; | 1104 | 31D60006156D3C5F00337B26 /* segsmss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = segsmss.c; sourceTree = "<group>"; }; |
| 1057 | 31D6000D156D3CB200337B26 /* awluthe */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = awluthe; sourceTree = BUILT_PRODUCTS_DIR; }; | 1105 | 31D6000D156D3CB200337B26 /* awluthe */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = awluthe; sourceTree = BUILT_PRODUCTS_DIR; }; |
| 1058 | 31D60017156D3CC300337B26 /* awluthe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = awluthe.c; sourceTree = "<group>"; }; | 1106 | 31D60017156D3CC300337B26 /* awluthe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = awluthe.c; sourceTree = "<group>"; }; |
| @@ -1120,6 +1168,11 @@ | |||
| 1120 | 31EEAC74156AB58E00714D05 /* mpmss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mpmss.c; sourceTree = SOURCE_ROOT; }; | 1168 | 31EEAC74156AB58E00714D05 /* mpmss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mpmss.c; sourceTree = SOURCE_ROOT; }; |
| 1121 | 31EEAC9E156AB73400714D05 /* testlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testlib.c; sourceTree = "<group>"; }; | 1169 | 31EEAC9E156AB73400714D05 /* testlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testlib.c; sourceTree = "<group>"; }; |
| 1122 | 31EEACA7156AB79800714D05 /* span.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = span.c; sourceTree = "<group>"; }; | 1170 | 31EEACA7156AB79800714D05 /* span.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = span.c; sourceTree = "<group>"; }; |
| 1171 | 31F6CCA91739B0CF00C48748 /* mpscamc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpscamc.h; sourceTree = "<group>"; }; | ||
| 1172 | 31F6CCAA1739B0CF00C48748 /* mpscawl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpscawl.h; sourceTree = "<group>"; }; | ||
| 1173 | 31F6CCAB1739B0CF00C48748 /* mpsclo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpsclo.h; sourceTree = "<group>"; }; | ||
| 1174 | 31F6CCAC1739B0CF00C48748 /* mpscmvff.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpscmvff.h; sourceTree = "<group>"; }; | ||
| 1175 | 31F6CCAD1739B0CF00C48748 /* mpscsnc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = mpscsnc.h; sourceTree = "<group>"; }; | ||
| 1123 | /* End PBXFileReference section */ | 1176 | /* End PBXFileReference section */ |
| 1124 | 1177 | ||
| 1125 | /* Begin PBXFrameworksBuildPhase section */ | 1178 | /* Begin PBXFrameworksBuildPhase section */ |
| @@ -1572,38 +1625,82 @@ | |||
| 1572 | 31EEAC03156AB23A00714D05 /* arenavm.c */, | 1625 | 31EEAC03156AB23A00714D05 /* arenavm.c */, |
| 1573 | 317B3C2A1731830100F9A469 /* arg.c */, | 1626 | 317B3C2A1731830100F9A469 /* arg.c */, |
| 1574 | 31EEAC3F156AB32500714D05 /* boot.c */, | 1627 | 31EEAC3F156AB32500714D05 /* boot.c */, |
| 1628 | 311F2F5017398AD500C15B6A /* boot.h */, | ||
| 1575 | 31EEAC27156AB2F200714D05 /* bt.c */, | 1629 | 31EEAC27156AB2F200714D05 /* bt.c */, |
| 1630 | 311F2F5117398AE900C15B6A /* bt.h */, | ||
| 1576 | 31EEAC19156AB2B200714D05 /* buffer.c */, | 1631 | 31EEAC19156AB2B200714D05 /* buffer.c */, |
| 1577 | 31EEAC40156AB32500714D05 /* cbs.c */, | 1632 | 31EEAC40156AB32500714D05 /* cbs.c */, |
| 1633 | 311F2F5217398AE900C15B6A /* cbs.h */, | ||
| 1634 | 311F2F5317398AE900C15B6A /* chain.h */, | ||
| 1635 | 311F2F5417398AE900C15B6A /* check.h */, | ||
| 1636 | 311F2F5517398AE900C15B6A /* clock.h */, | ||
| 1637 | 311F2F5617398AE900C15B6A /* config.h */, | ||
| 1578 | 31EEAC28156AB2F200714D05 /* dbgpool.c */, | 1638 | 31EEAC28156AB2F200714D05 /* dbgpool.c */, |
| 1639 | 311F2F5717398AE900C15B6A /* dbgpool.h */, | ||
| 1579 | 31EEAC29156AB2F200714D05 /* dbgpooli.c */, | 1640 | 31EEAC29156AB2F200714D05 /* dbgpooli.c */, |
| 1580 | 31EEAC41156AB32500714D05 /* diag.c */, | 1641 | 31EEAC41156AB32500714D05 /* diag.c */, |
| 1581 | 31EEAC2A156AB2F200714D05 /* event.c */, | 1642 | 31EEAC2A156AB2F200714D05 /* event.c */, |
| 1643 | 311F2F5817398AE900C15B6A /* event.h */, | ||
| 1644 | 311F2F5917398AE900C15B6A /* eventcom.h */, | ||
| 1645 | 311F2F5A17398AE900C15B6A /* eventdef.h */, | ||
| 1646 | 311F2F5B17398AE900C15B6A /* eventpro.h */, | ||
| 1647 | 311F2F5C17398AE900C15B6A /* eventrep.h */, | ||
| 1582 | 31EEAC1A156AB2B200714D05 /* format.c */, | 1648 | 31EEAC1A156AB2B200714D05 /* format.c */, |
| 1583 | 31EEAC07156AB27B00714D05 /* global.c */, | 1649 | 31EEAC07156AB27B00714D05 /* global.c */, |
| 1584 | 31EEAC2B156AB2F200714D05 /* ld.c */, | 1650 | 31EEAC2B156AB2F200714D05 /* ld.c */, |
| 1651 | 311F2F5E17398B0E00C15B6A /* lock.h */, | ||
| 1585 | 31EEAC08156AB27B00714D05 /* locus.c */, | 1652 | 31EEAC08156AB27B00714D05 /* locus.c */, |
| 1586 | 31EEAC2C156AB2F200714D05 /* message.c */, | 1653 | 31EEAC2C156AB2F200714D05 /* message.c */, |
| 1587 | 31EEAC42156AB32500714D05 /* meter.c */, | 1654 | 31EEAC42156AB32500714D05 /* meter.c */, |
| 1655 | 311F2F5F17398B0E00C15B6A /* meter.h */, | ||
| 1656 | 311F2F6017398B0E00C15B6A /* misc.h */, | ||
| 1588 | 31EEAC01156AB21B00714D05 /* mpm.c */, | 1657 | 31EEAC01156AB21B00714D05 /* mpm.c */, |
| 1658 | 311F2F6117398B0E00C15B6A /* mpm.h */, | ||
| 1659 | 311F2F6217398B1A00C15B6A /* mpmst.h */, | ||
| 1660 | 311F2F6317398B1A00C15B6A /* mpmtypes.h */, | ||
| 1661 | 311F2F6417398B1A00C15B6A /* mps.h */, | ||
| 1662 | 311F2F6517398B3B00C15B6A /* mpsacl.h */, | ||
| 1663 | 311F2F6617398B3B00C15B6A /* mpsavm.h */, | ||
| 1589 | 31EEABF5156AAF7C00714D05 /* mpsi.c */, | 1664 | 31EEABF5156AAF7C00714D05 /* mpsi.c */, |
| 1665 | 311F2F6717398B3B00C15B6A /* mpsio.h */, | ||
| 1666 | 311F2F6817398B3B00C15B6A /* mpslib.h */, | ||
| 1667 | 311F2F6917398B3B00C15B6A /* mpstd.h */, | ||
| 1668 | 311F2F6A17398B4C00C15B6A /* mpsw3.h */, | ||
| 1669 | 311F2F6B17398B4C00C15B6A /* mpswin.h */, | ||
| 1670 | 311F2F6C17398B5800C15B6A /* osxc.h */, | ||
| 1590 | 31EEAC09156AB27B00714D05 /* pool.c */, | 1671 | 31EEAC09156AB27B00714D05 /* pool.c */, |
| 1591 | 31EEAC0A156AB27B00714D05 /* poolabs.c */, | 1672 | 31EEAC0A156AB27B00714D05 /* poolabs.c */, |
| 1592 | 31EEAC2D156AB2F200714D05 /* poolmfs.c */, | 1673 | 31EEAC2D156AB2F200714D05 /* poolmfs.c */, |
| 1593 | 31EEAC2E156AB2F200714D05 /* poolmrg.c */, | 1674 | 31EEAC2E156AB2F200714D05 /* poolmrg.c */, |
| 1594 | 31EEAC2F156AB2F200714D05 /* poolmv.c */, | 1675 | 31EEAC2F156AB2F200714D05 /* poolmv.c */, |
| 1676 | 311F2F7B17398E7600C15B6A /* poolmv.h */, | ||
| 1677 | 311F2F7C17398E9A00C15B6A /* mpscmv.h */, | ||
| 1678 | 311F2F6D17398B6300C15B6A /* prmci3.h */, | ||
| 1679 | 311F2F6E17398B6300C15B6A /* prmci6.h */, | ||
| 1680 | 311F2F6F17398B6300C15B6A /* prmcix.h */, | ||
| 1681 | 311F2F7017398B6300C15B6A /* prmcw3.h */, | ||
| 1595 | 31EEAC0B156AB27B00714D05 /* protocol.c */, | 1682 | 31EEAC0B156AB27B00714D05 /* protocol.c */, |
| 1683 | 311F2F7117398B7100C15B6A /* protocol.h */, | ||
| 1684 | 311F2F7217398B7100C15B6A /* pthrdext.h */, | ||
| 1596 | 31EEAC1B156AB2B200714D05 /* ref.c */, | 1685 | 31EEAC1B156AB2B200714D05 /* ref.c */, |
| 1597 | 31EEAC0C156AB27B00714D05 /* reserv.c */, | 1686 | 31EEAC0C156AB27B00714D05 /* reserv.c */, |
| 1598 | 31EEAC30156AB2F200714D05 /* ring.c */, | 1687 | 31EEAC30156AB2F200714D05 /* ring.c */, |
| 1688 | 311F2F7317398B7100C15B6A /* ring.h */, | ||
| 1599 | 31EEAC1C156AB2B200714D05 /* root.c */, | 1689 | 31EEAC1C156AB2B200714D05 /* root.c */, |
| 1600 | 31EEAC31156AB2F200714D05 /* sac.c */, | 1690 | 31EEAC31156AB2F200714D05 /* sac.c */, |
| 1691 | 311F2F7417398B7100C15B6A /* sac.h */, | ||
| 1692 | 311F2F7517398B8E00C15B6A /* sc.h */, | ||
| 1601 | 31EEAC1D156AB2B200714D05 /* seg.c */, | 1693 | 31EEAC1D156AB2B200714D05 /* seg.c */, |
| 1602 | 31EEAC32156AB2F200714D05 /* shield.c */, | 1694 | 31EEAC32156AB2F200714D05 /* shield.c */, |
| 1603 | 31EEAC43156AB32500714D05 /* splay.c */, | 1695 | 31EEAC43156AB32500714D05 /* splay.c */, |
| 1696 | 311F2F7617398B8E00C15B6A /* splay.h */, | ||
| 1697 | 311F2F7717398B8E00C15B6A /* ss.h */, | ||
| 1698 | 311F2F7817398B8E00C15B6A /* th.h */, | ||
| 1699 | 311F2F7917398B8E00C15B6A /* thw3.h */, | ||
| 1604 | 31EEAC1E156AB2B200714D05 /* trace.c */, | 1700 | 31EEAC1E156AB2B200714D05 /* trace.c */, |
| 1605 | 31EEAC1F156AB2B200714D05 /* traceanc.c */, | 1701 | 31EEAC1F156AB2B200714D05 /* traceanc.c */, |
| 1606 | 31EEAC0D156AB27B00714D05 /* tract.c */, | 1702 | 31EEAC0D156AB27B00714D05 /* tract.c */, |
| 1703 | 311F2F7A17398B8E00C15B6A /* tract.h */, | ||
| 1607 | 31EEAC44156AB32500714D05 /* version.c */, | 1704 | 31EEAC44156AB32500714D05 /* version.c */, |
| 1608 | 31EEAC0E156AB27B00714D05 /* walk.c */, | 1705 | 31EEAC0E156AB27B00714D05 /* walk.c */, |
| 1609 | ); | 1706 | ); |
| @@ -1629,7 +1726,16 @@ | |||
| 1629 | 31EEAC5A156AB40800714D05 /* Extra pools */ = { | 1726 | 31EEAC5A156AB40800714D05 /* Extra pools */ = { |
| 1630 | isa = PBXGroup; | 1727 | isa = PBXGroup; |
| 1631 | children = ( | 1728 | children = ( |
| 1729 | 311F2F5D17398B0400C15B6A /* lo.h */, | ||
| 1730 | 31F6CCA91739B0CF00C48748 /* mpscamc.h */, | ||
| 1731 | 31CD33BB173A9F1500524741 /* mpscams.h */, | ||
| 1732 | 31F6CCAA1739B0CF00C48748 /* mpscawl.h */, | ||
| 1733 | 31F6CCAB1739B0CF00C48748 /* mpsclo.h */, | ||
| 1734 | 31F6CCAC1739B0CF00C48748 /* mpscmvff.h */, | ||
| 1735 | 31F6CCAD1739B0CF00C48748 /* mpscsnc.h */, | ||
| 1632 | 31EEAC5B156AB41900714D05 /* poolamc.c */, | 1736 | 31EEAC5B156AB41900714D05 /* poolamc.c */, |
| 1737 | 31CD33BC173A9F1500524741 /* poolams.c */, | ||
| 1738 | 31CD33BD173A9F1500524741 /* poolams.h */, | ||
| 1633 | 3124CACE156BE4CF00753214 /* poolawl.c */, | 1739 | 3124CACE156BE4CF00753214 /* poolawl.c */, |
| 1634 | 3124CACA156BE4A300753214 /* poollo.c */, | 1740 | 3124CACA156BE4A300753214 /* poollo.c */, |
| 1635 | 31EEAC5F156AB44D00714D05 /* poolmvff.c */, | 1741 | 31EEAC5F156AB44D00714D05 /* poolmvff.c */, |
diff --git a/mps/code/mpscams.h b/mps/code/mpscams.h index 22fc9185157..f8013467a5d 100644 --- a/mps/code/mpscams.h +++ b/mps/code/mpscams.h | |||
| @@ -10,6 +10,9 @@ | |||
| 10 | 10 | ||
| 11 | #include "mps.h" | 11 | #include "mps.h" |
| 12 | 12 | ||
| 13 | extern const struct mps_key_s _mps_key_ams_support_ambiguous; | ||
| 14 | #define MPS_KEY_AMS_SUPPORT_AMBIGUOUS (&_mps_key_ams_support_ambiguous) | ||
| 15 | |||
| 13 | extern mps_class_t mps_class_ams(void); | 16 | extern mps_class_t mps_class_ams(void); |
| 14 | extern mps_class_t mps_class_ams_debug(void); | 17 | extern mps_class_t mps_class_ams_debug(void); |
| 15 | 18 | ||
diff --git a/mps/code/mpscawl.h b/mps/code/mpscawl.h index 0b5bc790acf..a332c5057f1 100644 --- a/mps/code/mpscawl.h +++ b/mps/code/mpscawl.h | |||
| @@ -9,8 +9,13 @@ | |||
| 9 | 9 | ||
| 10 | #include "mps.h" | 10 | #include "mps.h" |
| 11 | 11 | ||
| 12 | extern const struct mps_key_s _mps_key_awl_find_dependent; | ||
| 13 | #define MPS_KEY_AWL_FIND_DEPENDENT (&_mps_key_awl_find_dependent) | ||
| 14 | |||
| 12 | extern mps_class_t mps_class_awl(void); | 15 | extern mps_class_t mps_class_awl(void); |
| 13 | 16 | ||
| 17 | typedef mps_addr_t (*mps_awl_find_dependent_t)(mps_addr_t addr); | ||
| 18 | |||
| 14 | #endif /* mpscawl_h */ | 19 | #endif /* mpscawl_h */ |
| 15 | 20 | ||
| 16 | 21 | ||
diff --git a/mps/code/mpscmfs.h b/mps/code/mpscmfs.h index 4a46e10a84b..056576ec17f 100644 --- a/mps/code/mpscmfs.h +++ b/mps/code/mpscmfs.h | |||
| @@ -9,6 +9,11 @@ | |||
| 9 | 9 | ||
| 10 | #include "mps.h" | 10 | #include "mps.h" |
| 11 | 11 | ||
| 12 | extern const struct mps_key_s _mps_mfs_extend_by; | ||
| 13 | #define MPS_KEY_MFS_EXTEND_BY (&_mps_mfs_extend_by) | ||
| 14 | extern const struct mps_key_s _mps_mfs_unit_size; | ||
| 15 | #define MPS_KEY_MFS_UNIT_SIZE (&_mps_mfs_unit_size) | ||
| 16 | |||
| 12 | extern mps_class_t mps_class_mfs(void); | 17 | extern mps_class_t mps_class_mfs(void); |
| 13 | 18 | ||
| 14 | #endif /* mpscmfs_h */ | 19 | #endif /* mpscmfs_h */ |
diff --git a/mps/code/mpscmv.h b/mps/code/mpscmv.h index 805db19b8af..779c8b6d8e7 100644 --- a/mps/code/mpscmv.h +++ b/mps/code/mpscmv.h | |||
| @@ -9,6 +9,13 @@ | |||
| 9 | 9 | ||
| 10 | #include "mps.h" | 10 | #include "mps.h" |
| 11 | 11 | ||
| 12 | extern const struct mps_key_s _mps_key_mv_extend_by; | ||
| 13 | #define MPS_KEY_MV_EXTEND_BY (&_mps_key_mv_extend_by) | ||
| 14 | extern const struct mps_key_s _mps_key_mv_avg_size; | ||
| 15 | #define MPS_KEY_MV_AVG_SIZE (&_mps_key_mv_avg_size) | ||
| 16 | extern const struct mps_key_s _mps_key_mv_max_size; | ||
| 17 | #define MPS_KEY_MV_MAX_SIZE (&_mps_key_mv_max_size) | ||
| 18 | |||
| 12 | extern size_t mps_mv_free_size(mps_pool_t mps_pool); | 19 | extern size_t mps_mv_free_size(mps_pool_t mps_pool); |
| 13 | extern size_t mps_mv_size(mps_pool_t mps_pool); | 20 | extern size_t mps_mv_size(mps_pool_t mps_pool); |
| 14 | extern mps_class_t mps_class_mv(void); | 21 | extern mps_class_t mps_class_mv(void); |
diff --git a/mps/code/mpsi.c b/mps/code/mpsi.c index 15f44a24ff1..94034a0c71f 100644 --- a/mps/code/mpsi.c +++ b/mps/code/mpsi.c | |||
| @@ -321,7 +321,7 @@ mps_res_t mps_arena_create(mps_arena_t *mps_arena_o, | |||
| 321 | va_start(args[0].val.varargs, mps_arena_class); | 321 | va_start(args[0].val.varargs, mps_arena_class); |
| 322 | args[1].key = MPS_KEY_ARGS_END; | 322 | args[1].key = MPS_KEY_ARGS_END; |
| 323 | res = mps_arena_create_args(mps_arena_o, mps_arena_class, args); | 323 | res = mps_arena_create_args(mps_arena_o, mps_arena_class, args); |
| 324 | va_end(args[0].val.varargs); | 324 | /* FIXME: Can't va_end? */ |
| 325 | 325 | ||
| 326 | return res; | 326 | return res; |
| 327 | } | 327 | } |
| @@ -633,15 +633,31 @@ mps_res_t mps_pool_create(mps_pool_t *mps_pool_o, mps_arena_t arena, | |||
| 633 | mps_class_t mps_class, ...) | 633 | mps_class_t mps_class, ...) |
| 634 | { | 634 | { |
| 635 | mps_res_t res; | 635 | mps_res_t res; |
| 636 | va_list args; | 636 | mps_arg_s args[2]; |
| 637 | va_start(args, mps_class); | 637 | args[0].key = MPS_KEY_VARARGS; |
| 638 | res = mps_pool_create_v(mps_pool_o, arena, mps_class, args); | 638 | va_start(args[0].val.varargs, mps_class); |
| 639 | va_end(args); | 639 | args[1].key = MPS_KEY_ARGS_END; |
| 640 | res = mps_pool_create_k(mps_pool_o, arena, mps_class, args); | ||
| 641 | /* FIXME: Can't va_end? */ | ||
| 640 | return res; | 642 | return res; |
| 641 | } | 643 | } |
| 642 | 644 | ||
| 643 | mps_res_t mps_pool_create_v(mps_pool_t *mps_pool_o, mps_arena_t arena, | 645 | mps_res_t mps_pool_create_v(mps_pool_t *mps_pool_o, mps_arena_t arena, |
| 644 | mps_class_t class, va_list args) | 646 | mps_class_t class, va_list varargs) |
| 647 | { | ||
| 648 | mps_arg_s args[2]; | ||
| 649 | |||
| 650 | args[0].key = MPS_KEY_VARARGS; | ||
| 651 | /* FIXME: va_copy not available in C89 */ | ||
| 652 | memcpy(&args[0].val.varargs, &varargs, sizeof(va_list)); | ||
| 653 | args[1].key = MPS_KEY_ARGS_END; | ||
| 654 | |||
| 655 | return mps_pool_create_k(mps_pool_o, arena, class, args); | ||
| 656 | } | ||
| 657 | |||
| 658 | |||
| 659 | mps_res_t mps_pool_create_k(mps_pool_t *mps_pool_o, mps_arena_t arena, | ||
| 660 | mps_class_t class, mps_arg_s args[]) | ||
| 645 | { | 661 | { |
| 646 | Pool pool; | 662 | Pool pool; |
| 647 | Res res; | 663 | Res res; |
| @@ -651,8 +667,9 @@ mps_res_t mps_pool_create_v(mps_pool_t *mps_pool_o, mps_arena_t arena, | |||
| 651 | AVER(mps_pool_o != NULL); | 667 | AVER(mps_pool_o != NULL); |
| 652 | AVERT(Arena, arena); | 668 | AVERT(Arena, arena); |
| 653 | AVERT(PoolClass, class); | 669 | AVERT(PoolClass, class); |
| 670 | AVER(ArgListCheck(args)); | ||
| 654 | 671 | ||
| 655 | res = PoolCreateV(&pool, arena, class, args); | 672 | res = PoolCreate(&pool, arena, class, args); |
| 656 | 673 | ||
| 657 | ArenaLeave(arena); | 674 | ArenaLeave(arena); |
| 658 | 675 | ||
diff --git a/mps/code/pool.c b/mps/code/pool.c index 315bbac4fb2..09a10f13d62 100644 --- a/mps/code/pool.c +++ b/mps/code/pool.c | |||
| @@ -105,22 +105,18 @@ Bool PoolCheck(Pool pool) | |||
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | 107 | ||
| 108 | /* PoolInit, PoolInitV -- initialize a pool | 108 | /* Common keywords to PoolInit */ |
| 109 | |||
| 110 | const KeyStruct _mps_key_format = {KeySig, "AMS_FORMAT", ArgCheckCant}; /* FIXME: ArgCheckFormat */ | ||
| 111 | const KeyStruct _mps_key_chain = {KeySig, "AMS_CHAIN", ArgCheckCant}; /* FIXME: ArgCheckChain */ | ||
| 112 | |||
| 113 | |||
| 114 | /* PoolInit -- initialize a pool | ||
| 109 | * | 115 | * |
| 110 | * Initialize the generic fields of the pool and calls class-specific | 116 | * Initialize the generic fields of the pool and calls class-specific |
| 111 | * init. See <design/pool/#align>. */ | 117 | * init. See <design/pool/#align>. */ |
| 112 | 118 | ||
| 113 | Res PoolInit(Pool pool, Arena arena, PoolClass class, ...) | 119 | Res PoolInit(Pool pool, Arena arena, PoolClass class, ArgList args) |
| 114 | { | ||
| 115 | Res res; | ||
| 116 | va_list args; | ||
| 117 | va_start(args, class); | ||
| 118 | res = PoolInitV(pool, arena, class, args); | ||
| 119 | va_end(args); | ||
| 120 | return res; | ||
| 121 | } | ||
| 122 | |||
| 123 | Res PoolInitV(Pool pool, Arena arena, PoolClass class, va_list args) | ||
| 124 | { | 120 | { |
| 125 | Res res; | 121 | Res res; |
| 126 | Word classId; | 122 | Word classId; |
| @@ -185,18 +181,7 @@ failInit: | |||
| 185 | /* PoolCreate, PoolCreateV: Allocate and initialise pool */ | 181 | /* PoolCreate, PoolCreateV: Allocate and initialise pool */ |
| 186 | 182 | ||
| 187 | Res PoolCreate(Pool *poolReturn, Arena arena, | 183 | Res PoolCreate(Pool *poolReturn, Arena arena, |
| 188 | PoolClass class, ...) | 184 | PoolClass class, ArgList args) |
| 189 | { | ||
| 190 | Res res; | ||
| 191 | va_list args; | ||
| 192 | va_start(args, class); | ||
| 193 | res = PoolCreateV(poolReturn, arena, class, args); | ||
| 194 | va_end(args); | ||
| 195 | return res; | ||
| 196 | } | ||
| 197 | |||
| 198 | Res PoolCreateV(Pool *poolReturn, Arena arena, | ||
| 199 | PoolClass class, va_list args) | ||
| 200 | { | 185 | { |
| 201 | Res res; | 186 | Res res; |
| 202 | Pool pool; | 187 | Pool pool; |
| @@ -219,7 +204,7 @@ Res PoolCreateV(Pool *poolReturn, Arena arena, | |||
| 219 | pool = (Pool)PointerAdd(base, class->offset); | 204 | pool = (Pool)PointerAdd(base, class->offset); |
| 220 | 205 | ||
| 221 | /* Initialize the pool. */ | 206 | /* Initialize the pool. */ |
| 222 | res = PoolInitV(pool, arena, class, args); | 207 | res = PoolInit(pool, arena, class, args); |
| 223 | if (res != ResOK) | 208 | if (res != ResOK) |
| 224 | goto failPoolInit; | 209 | goto failPoolInit; |
| 225 | 210 | ||
diff --git a/mps/code/poolabs.c b/mps/code/poolabs.c index e3e45b7480c..1456ec66143 100644 --- a/mps/code/poolabs.c +++ b/mps/code/poolabs.c | |||
| @@ -194,9 +194,10 @@ void PoolTrivFinish(Pool pool) | |||
| 194 | NOOP; | 194 | NOOP; |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | Res PoolTrivInit(Pool pool, va_list args) | 197 | Res PoolTrivInit(Pool pool, ArgList args) |
| 198 | { | 198 | { |
| 199 | AVERT(Pool, pool); | 199 | AVERT(Pool, pool); |
| 200 | AVER(ArgListCheck(args)); | ||
| 200 | UNUSED(args); | 201 | UNUSED(args); |
| 201 | return ResOK; | 202 | return ResOK; |
| 202 | } | 203 | } |
diff --git a/mps/code/poolamc.c b/mps/code/poolamc.c index e96acb0f977..30ee17cc656 100644 --- a/mps/code/poolamc.c +++ b/mps/code/poolamc.c | |||
| @@ -933,7 +933,7 @@ static Bool amcNailRangeIsMarked(Seg seg, Addr base, Addr limit) | |||
| 933 | * See <design/poolamc/#init>. | 933 | * See <design/poolamc/#init>. |
| 934 | * Shared by AMCInit and AMCZinit. | 934 | * Shared by AMCInit and AMCZinit. |
| 935 | */ | 935 | */ |
| 936 | static Res amcInitComm(Pool pool, RankSet rankSet, va_list arg) | 936 | static Res amcInitComm(Pool pool, RankSet rankSet, ArgList args) |
| 937 | { | 937 | { |
| 938 | AMC amc; | 938 | AMC amc; |
| 939 | Res res; | 939 | Res res; |
| @@ -943,6 +943,7 @@ static Res amcInitComm(Pool pool, RankSet rankSet, va_list arg) | |||
| 943 | Index i; | 943 | Index i; |
| 944 | size_t genArraySize; | 944 | size_t genArraySize; |
| 945 | size_t genCount; | 945 | size_t genCount; |
| 946 | ArgStruct arg; | ||
| 946 | 947 | ||
| 947 | /* Suppress a warning about this structure not being used when there | 948 | /* Suppress a warning about this structure not being used when there |
| 948 | are no statistics. Note that simply making the declaration conditional | 949 | are no statistics. Note that simply making the declaration conditional |
| @@ -959,11 +960,27 @@ static Res amcInitComm(Pool pool, RankSet rankSet, va_list arg) | |||
| 959 | amc = Pool2AMC(pool); | 960 | amc = Pool2AMC(pool); |
| 960 | arena = PoolArena(pool); | 961 | arena = PoolArena(pool); |
| 961 | 962 | ||
| 962 | pool->format = va_arg(arg, Format); | 963 | if (ArgPick(&arg, args, MPS_KEY_VARARGS)) { |
| 964 | pool->format = va_arg(arg.val.varargs, Format); | ||
| 965 | amc->chain = va_arg(arg.val.varargs, Chain); | ||
| 966 | } else { | ||
| 967 | if (ArgPick(&arg, args, MPS_KEY_FORMAT)) | ||
| 968 | pool->format = arg.val.format; | ||
| 969 | else { | ||
| 970 | res = ResPARAM; | ||
| 971 | goto failParam; | ||
| 972 | } | ||
| 973 | if (ArgPick(&arg, args, MPS_KEY_CHAIN)) | ||
| 974 | amc->chain = arg.val.chain; | ||
| 975 | else { | ||
| 976 | res = ResPARAM; | ||
| 977 | goto failParam; | ||
| 978 | } | ||
| 979 | } | ||
| 980 | |||
| 963 | AVERT(Format, pool->format); | 981 | AVERT(Format, pool->format); |
| 964 | pool->alignment = pool->format->alignment; | ||
| 965 | amc->chain = va_arg(arg, Chain); | ||
| 966 | AVERT(Chain, amc->chain); | 982 | AVERT(Chain, amc->chain); |
| 983 | pool->alignment = pool->format->alignment; | ||
| 967 | amc->rankSet = rankSet; | 984 | amc->rankSet = rankSet; |
| 968 | 985 | ||
| 969 | RingInit(&amc->genRing); | 986 | RingInit(&amc->genRing); |
| @@ -1035,17 +1052,18 @@ failGenAlloc: | |||
| 1035 | } | 1052 | } |
| 1036 | ControlFree(arena, amc->gen, genArraySize); | 1053 | ControlFree(arena, amc->gen, genArraySize); |
| 1037 | failGensAlloc: | 1054 | failGensAlloc: |
| 1055 | failParam: | ||
| 1038 | return res; | 1056 | return res; |
| 1039 | } | 1057 | } |
| 1040 | 1058 | ||
| 1041 | static Res AMCInit(Pool pool, va_list arg) | 1059 | static Res AMCInit(Pool pool, ArgList args) |
| 1042 | { | 1060 | { |
| 1043 | return amcInitComm(pool, RankSetSingle(RankEXACT), arg); | 1061 | return amcInitComm(pool, RankSetSingle(RankEXACT), args); |
| 1044 | } | 1062 | } |
| 1045 | 1063 | ||
| 1046 | static Res AMCZInit(Pool pool, va_list arg) | 1064 | static Res AMCZInit(Pool pool, ArgList args) |
| 1047 | { | 1065 | { |
| 1048 | return amcInitComm(pool, RankSetEMPTY, arg); | 1066 | return amcInitComm(pool, RankSetEMPTY, args); |
| 1049 | } | 1067 | } |
| 1050 | 1068 | ||
| 1051 | 1069 | ||
diff --git a/mps/code/poolams.c b/mps/code/poolams.c index 34e07fceccc..d922e36a2a0 100644 --- a/mps/code/poolams.c +++ b/mps/code/poolams.c | |||
| @@ -733,18 +733,47 @@ static void AMSSegsDestroy(AMS ams) | |||
| 733 | * Takes one additional argument: the format of the objects | 733 | * Takes one additional argument: the format of the objects |
| 734 | * allocated in the pool. See <design/poolams/#init>. | 734 | * allocated in the pool. See <design/poolams/#init>. |
| 735 | */ | 735 | */ |
| 736 | static Res AMSInit(Pool pool, va_list args) | 736 | |
| 737 | const KeyStruct _mps_key_ams_support_ambiguous = { | ||
| 738 | KeySig, "AMS_SUPPORT_AMBIGUOUS", ArgCheckCant /* FIXME: ArgCheckBool */ | ||
| 739 | }; | ||
| 740 | |||
| 741 | static Res AMSInit(Pool pool, ArgList args) | ||
| 737 | { | 742 | { |
| 738 | Res res; | 743 | Res res; |
| 739 | Format format; | 744 | Format format; |
| 740 | Chain chain; | 745 | Chain chain; |
| 741 | Bool supportAmbiguous; | 746 | Bool supportAmbiguous; |
| 747 | ArgStruct arg; | ||
| 742 | 748 | ||
| 743 | AVERT(Pool, pool); | 749 | AVERT(Pool, pool); |
| 750 | AVER(ArgListCheck(args)); | ||
| 751 | |||
| 752 | if (ArgPick(&arg, args, MPS_KEY_VARARGS)) { | ||
| 753 | format = va_arg(arg.val.varargs, Format); | ||
| 754 | chain = va_arg(arg.val.varargs, Chain); | ||
| 755 | supportAmbiguous = va_arg(arg.val.varargs, Bool); | ||
| 756 | } else { | ||
| 757 | if (ArgPick(&arg, args, MPS_KEY_CHAIN)) | ||
| 758 | chain = arg.val.chain; | ||
| 759 | else { | ||
| 760 | res = ResPARAM; | ||
| 761 | goto failParam; | ||
| 762 | } | ||
| 763 | if (ArgPick(&arg, args, MPS_KEY_FORMAT)) | ||
| 764 | format = arg.val.format; | ||
| 765 | else { | ||
| 766 | res = ResPARAM; | ||
| 767 | goto failParam; | ||
| 768 | } | ||
| 769 | if (ArgPick(&arg, args, MPS_KEY_AMS_SUPPORT_AMBIGUOUS)) | ||
| 770 | supportAmbiguous = arg.val.b; | ||
| 771 | else { | ||
| 772 | res = ResPARAM; | ||
| 773 | goto failParam; | ||
| 774 | } | ||
| 775 | } | ||
| 744 | 776 | ||
| 745 | format = va_arg(args, Format); | ||
| 746 | chain = va_arg(args, Chain); | ||
| 747 | supportAmbiguous = va_arg(args, Bool); | ||
| 748 | /* .ambiguous.noshare: If the pool is required to support ambiguous */ | 777 | /* .ambiguous.noshare: If the pool is required to support ambiguous */ |
| 749 | /* references, the alloc and white tables cannot be shared. */ | 778 | /* references, the alloc and white tables cannot be shared. */ |
| 750 | res = AMSInitInternal(Pool2AMS(pool), format, chain, !supportAmbiguous); | 779 | res = AMSInitInternal(Pool2AMS(pool), format, chain, !supportAmbiguous); |
| @@ -752,6 +781,9 @@ static Res AMSInit(Pool pool, va_list args) | |||
| 752 | EVENT3(PoolInitAMS, pool, PoolArena(pool), format); | 781 | EVENT3(PoolInitAMS, pool, PoolArena(pool), format); |
| 753 | } | 782 | } |
| 754 | return res; | 783 | return res; |
| 784 | |||
| 785 | failParam: | ||
| 786 | return res; | ||
| 755 | } | 787 | } |
| 756 | 788 | ||
| 757 | 789 | ||
diff --git a/mps/code/poolams.h b/mps/code/poolams.h index 292085fbf10..f05f72085ca 100644 --- a/mps/code/poolams.h +++ b/mps/code/poolams.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include "mpmst.h" | 13 | #include "mpmst.h" |
| 14 | #include "ring.h" | 14 | #include "ring.h" |
| 15 | #include "bt.h" | 15 | #include "bt.h" |
| 16 | #include "mpscams.h" | ||
| 16 | #include <stdarg.h> | 17 | #include <stdarg.h> |
| 17 | 18 | ||
| 18 | 19 | ||
diff --git a/mps/code/poolawl.c b/mps/code/poolawl.c index e775517a7b2..b96d29500cb 100644 --- a/mps/code/poolawl.c +++ b/mps/code/poolawl.c | |||
| @@ -511,7 +511,11 @@ static Bool AWLSegAlloc(Addr *baseReturn, Addr *limitReturn, | |||
| 511 | 511 | ||
| 512 | /* AWLInit -- initialize an AWL pool */ | 512 | /* AWLInit -- initialize an AWL pool */ |
| 513 | 513 | ||
| 514 | static Res AWLInit(Pool pool, va_list arg) | 514 | const KeyStruct _mps_key_awl_find_dependent = { |
| 515 | KeySig, "AWL_FIND_DEPENDENT", ArgCheckCant /* FIXME: ArgCheckFun */ | ||
| 516 | }; | ||
| 517 | |||
| 518 | static Res AWLInit(Pool pool, ArgList args) | ||
| 515 | { | 519 | { |
| 516 | AWL awl; | 520 | AWL awl; |
| 517 | Format format; | 521 | Format format; |
| @@ -519,17 +523,34 @@ static Res AWLInit(Pool pool, va_list arg) | |||
| 519 | Chain chain; | 523 | Chain chain; |
| 520 | Res res; | 524 | Res res; |
| 521 | static GenParamStruct genParam = { SizeMAX, 0.5 /* dummy */ }; | 525 | static GenParamStruct genParam = { SizeMAX, 0.5 /* dummy */ }; |
| 526 | ArgStruct arg; | ||
| 522 | 527 | ||
| 523 | /* Weak check, as half-way through initialization. */ | 528 | /* Weak check, as half-way through initialization. */ |
| 524 | AVER(pool != NULL); | 529 | AVER(pool != NULL); |
| 525 | 530 | ||
| 526 | awl = Pool2AWL(pool); | 531 | awl = Pool2AWL(pool); |
| 532 | |||
| 533 | if (ArgPick(&arg, args, MPS_KEY_VARARGS)) { | ||
| 534 | format = va_arg(arg.val.varargs, Format); | ||
| 535 | findDependent = va_arg(arg.val.varargs, FindDependentMethod); | ||
| 536 | } else { | ||
| 537 | if (ArgPick(&arg, args, MPS_KEY_FORMAT)) | ||
| 538 | format = arg.val.format; | ||
| 539 | else { | ||
| 540 | res = ResPARAM; | ||
| 541 | goto failParam; | ||
| 542 | } | ||
| 543 | if (ArgPick(&arg, args, MPS_KEY_AWL_FIND_DEPENDENT)) | ||
| 544 | findDependent = (FindDependentMethod)arg.val.addr_method; | ||
| 545 | else { | ||
| 546 | res = ResPARAM; | ||
| 547 | goto failParam; | ||
| 548 | } | ||
| 549 | } | ||
| 527 | 550 | ||
| 528 | format = va_arg(arg, Format); | ||
| 529 | AVERT(Format, format); | 551 | AVERT(Format, format); |
| 530 | pool->format = format; | 552 | pool->format = format; |
| 531 | 553 | ||
| 532 | findDependent = va_arg(arg, FindDependentMethod); | ||
| 533 | AVER(FUNCHECK(findDependent)); | 554 | AVER(FUNCHECK(findDependent)); |
| 534 | awl->findDependent = findDependent; | 555 | awl->findDependent = findDependent; |
| 535 | 556 | ||
| @@ -557,6 +578,7 @@ static Res AWLInit(Pool pool, va_list arg) | |||
| 557 | 578 | ||
| 558 | failGenInit: | 579 | failGenInit: |
| 559 | ChainDestroy(chain); | 580 | ChainDestroy(chain); |
| 581 | failParam: | ||
| 560 | return res; | 582 | return res; |
| 561 | } | 583 | } |
| 562 | 584 | ||
diff --git a/mps/code/poollo.c b/mps/code/poollo.c index 3ad825905a2..5879a246cf9 100644 --- a/mps/code/poollo.c +++ b/mps/code/poollo.c | |||
| @@ -469,19 +469,30 @@ static void LOWalk(Pool pool, Seg seg, | |||
| 469 | 469 | ||
| 470 | /* LOInit -- initialize an LO pool */ | 470 | /* LOInit -- initialize an LO pool */ |
| 471 | 471 | ||
| 472 | static Res LOInit(Pool pool, va_list arg) | 472 | static Res LOInit(Pool pool, ArgList args) |
| 473 | { | 473 | { |
| 474 | Format format; | 474 | Format format; |
| 475 | LO lo; | 475 | LO lo; |
| 476 | Arena arena; | 476 | Arena arena; |
| 477 | Res res; | 477 | Res res; |
| 478 | static GenParamStruct loGenParam = { 1024, 0.2 }; | 478 | static GenParamStruct loGenParam = { 1024, 0.2 }; |
| 479 | ArgStruct arg; | ||
| 479 | 480 | ||
| 480 | AVERT(Pool, pool); | 481 | AVERT(Pool, pool); |
| 481 | 482 | ||
| 482 | arena = PoolArena(pool); | 483 | arena = PoolArena(pool); |
| 483 | 484 | ||
| 484 | format = va_arg(arg, Format); | 485 | if (ArgPick(&arg, args, MPS_KEY_VARARGS)) { |
| 486 | format = va_arg(arg.val.varargs, Format); | ||
| 487 | } else { | ||
| 488 | if (ArgPick(&arg, args, MPS_KEY_FORMAT)) | ||
| 489 | format = arg.val.format; | ||
| 490 | else { | ||
| 491 | res = ResPARAM; | ||
| 492 | goto failParam; | ||
| 493 | } | ||
| 494 | } | ||
| 495 | |||
| 485 | AVERT(Format, format); | 496 | AVERT(Format, format); |
| 486 | 497 | ||
| 487 | lo = PoolPoolLO(pool); | 498 | lo = PoolPoolLO(pool); |
| @@ -507,6 +518,7 @@ static Res LOInit(Pool pool, va_list arg) | |||
| 507 | 518 | ||
| 508 | failGenInit: | 519 | failGenInit: |
| 509 | ChainDestroy(lo->chain); | 520 | ChainDestroy(lo->chain); |
| 521 | failParam: | ||
| 510 | return res; | 522 | return res; |
| 511 | } | 523 | } |
| 512 | 524 | ||
diff --git a/mps/code/poolmfs.c b/mps/code/poolmfs.c index b39b283fbe9..184f41c956b 100644 --- a/mps/code/poolmfs.c +++ b/mps/code/poolmfs.c | |||
| @@ -77,16 +77,38 @@ Pool (MFSPool)(MFS mfs) | |||
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | 79 | ||
| 80 | static Res MFSInit(Pool pool, va_list arg) | 80 | const KeyStruct _mps_mfs_extend_by = {KeySig, "MFS_EXTEND_BY", ArgCheckCant}; |
| 81 | const KeyStruct _mps_mfs_unit_size = {KeySig, "MFS_UNIT_SIZE", ArgCheckCant}; | ||
| 82 | |||
| 83 | static Res MFSInit(Pool pool, ArgList args) | ||
| 81 | { | 84 | { |
| 85 | Res res; | ||
| 82 | Size extendBy, unitSize; | 86 | Size extendBy, unitSize; |
| 83 | MFS mfs; | 87 | MFS mfs; |
| 84 | Arena arena; | 88 | Arena arena; |
| 89 | ArgStruct arg; | ||
| 85 | 90 | ||
| 86 | AVER(pool != NULL); | 91 | AVER(pool != NULL); |
| 87 | 92 | AVER(ArgListCheck(args)); | |
| 88 | extendBy = va_arg(arg, Size); | 93 | |
| 89 | unitSize = va_arg(arg, Size); | 94 | if (ArgPick(&arg, args, MPS_KEY_VARARGS)) { |
| 95 | extendBy = va_arg(arg.val.varargs, Size); | ||
| 96 | unitSize = va_arg(arg.val.varargs, Size); | ||
| 97 | } else { | ||
| 98 | if (ArgPick(&arg, args, MPS_KEY_MFS_UNIT_SIZE)) | ||
| 99 | unitSize = arg.val.size; | ||
| 100 | else { | ||
| 101 | res = ResPARAM; | ||
| 102 | goto failParam; | ||
| 103 | } | ||
| 104 | if (ArgPick(&arg, args, MPS_KEY_MFS_EXTEND_BY)) | ||
| 105 | extendBy = arg.val.size; | ||
| 106 | else { | ||
| 107 | extendBy = MFS_EXTEND_BY_DEFAULT; | ||
| 108 | if (extendBy < unitSize) | ||
| 109 | extendBy = unitSize; | ||
| 110 | } | ||
| 111 | } | ||
| 90 | 112 | ||
| 91 | AVER(unitSize >= UNIT_MIN); | 113 | AVER(unitSize >= UNIT_MIN); |
| 92 | AVER(extendBy >= unitSize); | 114 | AVER(extendBy >= unitSize); |
| @@ -109,6 +131,9 @@ static Res MFSInit(Pool pool, va_list arg) | |||
| 109 | AVERT(MFS, mfs); | 131 | AVERT(MFS, mfs); |
| 110 | EVENT4(PoolInitMFS, pool, arena, extendBy, unitSize); | 132 | EVENT4(PoolInitMFS, pool, arena, extendBy, unitSize); |
| 111 | return ResOK; | 133 | return ResOK; |
| 134 | |||
| 135 | failParam: | ||
| 136 | return res; | ||
| 112 | } | 137 | } |
| 113 | 138 | ||
| 114 | 139 | ||
diff --git a/mps/code/poolmfs.h b/mps/code/poolmfs.h index f77f7ef0e14..467743ce8e2 100644 --- a/mps/code/poolmfs.h +++ b/mps/code/poolmfs.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #define poolmfs_h | 29 | #define poolmfs_h |
| 30 | 30 | ||
| 31 | #include "mpm.h" | 31 | #include "mpm.h" |
| 32 | #include "mpscmfs.h" | ||
| 32 | 33 | ||
| 33 | typedef struct MFSStruct *MFS; | 34 | typedef struct MFSStruct *MFS; |
| 34 | 35 | ||
diff --git a/mps/code/poolmrg.c b/mps/code/poolmrg.c index 298e5f7788f..5e25c039b42 100644 --- a/mps/code/poolmrg.c +++ b/mps/code/poolmrg.c | |||
| @@ -616,11 +616,12 @@ static Res MRGRefSegScan(ScanState ss, MRGRefSeg refseg, MRG mrg) | |||
| 616 | 616 | ||
| 617 | /* MRGInit -- init method for MRG */ | 617 | /* MRGInit -- init method for MRG */ |
| 618 | 618 | ||
| 619 | static Res MRGInit(Pool pool, va_list args) | 619 | static Res MRGInit(Pool pool, ArgList args) |
| 620 | { | 620 | { |
| 621 | MRG mrg; | 621 | MRG mrg; |
| 622 | 622 | ||
| 623 | AVER(pool != NULL); /* Can't check more; see pool contract @@@@ */ | 623 | AVER(pool != NULL); /* Can't check more; see pool contract @@@@ */ |
| 624 | AVER(ArgListCheck(args)); | ||
| 624 | UNUSED(args); | 625 | UNUSED(args); |
| 625 | 626 | ||
| 626 | mrg = Pool2MRG(pool); | 627 | mrg = Pool2MRG(pool); |
diff --git a/mps/code/poolmv.c b/mps/code/poolmv.c index a645eb4d235..6df455b497a 100644 --- a/mps/code/poolmv.c +++ b/mps/code/poolmv.c | |||
| @@ -184,16 +184,33 @@ static Bool MVSpanCheck(MVSpan span) | |||
| 184 | 184 | ||
| 185 | /* MVInit -- init method for class MV */ | 185 | /* MVInit -- init method for class MV */ |
| 186 | 186 | ||
| 187 | static Res MVInit(Pool pool, va_list arg) | 187 | const KeyStruct _mps_key_mv_extend_by = {KeySig, "MV_EXTEND_BY", ArgCheckCant}; |
| 188 | const KeyStruct _mps_key_mv_avg_size = {KeySig, "MV_AVG_SIZE", ArgCheckCant}; | ||
| 189 | const KeyStruct _mps_key_mv_max_size = {KeySig, "MV_MAX_SIZE", ArgCheckCant}; | ||
| 190 | |||
| 191 | static Res MVInit(Pool pool, ArgList args) | ||
| 188 | { | 192 | { |
| 189 | Size extendBy, avgSize, maxSize, blockExtendBy, spanExtendBy; | 193 | Size extendBy = MV_EXTEND_BY_DEFAULT; |
| 194 | Size avgSize = MV_AVG_SIZE_DEFAULT; | ||
| 195 | Size maxSize = MV_MAX_SIZE_DEFAULT; | ||
| 196 | Size blockExtendBy, spanExtendBy; | ||
| 190 | MV mv; | 197 | MV mv; |
| 191 | Arena arena; | 198 | Arena arena; |
| 192 | Res res; | 199 | Res res; |
| 193 | 200 | ArgStruct arg; | |
| 194 | extendBy = va_arg(arg, Size); | 201 | ArgStruct piArgs[3]; |
| 195 | avgSize = va_arg(arg, Size); | 202 | |
| 196 | maxSize = va_arg(arg, Size); | 203 | if (ArgPick(&arg, args, MPS_KEY_VARARGS)) { |
| 204 | extendBy = va_arg(arg.val.varargs, Size); | ||
| 205 | avgSize = va_arg(arg.val.varargs, Size); | ||
| 206 | maxSize = va_arg(arg.val.varargs, Size); | ||
| 207 | } | ||
| 208 | if (ArgPick(&arg, args, MPS_KEY_MV_EXTEND_BY)) | ||
| 209 | extendBy = arg.val.size; | ||
| 210 | if (ArgPick(&arg, args, MPS_KEY_MV_AVG_SIZE)) | ||
| 211 | avgSize = arg.val.size; | ||
| 212 | if (ArgPick(&arg, args, MPS_KEY_MV_MAX_SIZE)) | ||
| 213 | maxSize = arg.val.size; | ||
| 197 | 214 | ||
| 198 | AVER(extendBy > 0); | 215 | AVER(extendBy > 0); |
| 199 | AVER(avgSize > 0); | 216 | AVER(avgSize > 0); |
| @@ -211,17 +228,23 @@ static Res MVInit(Pool pool, va_list arg) | |||
| 211 | blockExtendBy = sizeof(MVBlockStruct); | 228 | blockExtendBy = sizeof(MVBlockStruct); |
| 212 | } | 229 | } |
| 213 | 230 | ||
| 214 | res = PoolInit(&mv->blockPoolStruct.poolStruct, | 231 | piArgs[0].key = MPS_KEY_MFS_EXTEND_BY; |
| 215 | arena, PoolClassMFS(), | 232 | piArgs[0].val.size = blockExtendBy; |
| 216 | blockExtendBy, sizeof(MVBlockStruct)); | 233 | piArgs[1].key = MPS_KEY_MFS_UNIT_SIZE; |
| 234 | piArgs[1].val.size = sizeof(MVBlockStruct); | ||
| 235 | piArgs[2].key = MPS_KEY_ARGS_END; | ||
| 236 | res = PoolInit(&mv->blockPoolStruct.poolStruct, arena, PoolClassMFS(), piArgs); | ||
| 217 | if(res != ResOK) | 237 | if(res != ResOK) |
| 218 | return res; | 238 | return res; |
| 219 | 239 | ||
| 220 | spanExtendBy = sizeof(MVSpanStruct) * (maxSize/extendBy); | 240 | spanExtendBy = sizeof(MVSpanStruct) * (maxSize/extendBy); |
| 221 | 241 | ||
| 222 | res = PoolInit(&mv->spanPoolStruct.poolStruct, | 242 | piArgs[0].key = MPS_KEY_MFS_EXTEND_BY; |
| 223 | arena, PoolClassMFS(), | 243 | piArgs[0].val.size = spanExtendBy; |
| 224 | spanExtendBy, sizeof(MVSpanStruct)); | 244 | piArgs[1].key = MPS_KEY_MFS_UNIT_SIZE; |
| 245 | piArgs[1].val.size = sizeof(MVSpanStruct); | ||
| 246 | piArgs[2].key = MPS_KEY_ARGS_END; | ||
| 247 | res = PoolInit(&mv->spanPoolStruct.poolStruct, arena, PoolClassMFS(), piArgs); | ||
| 225 | if(res != ResOK) | 248 | if(res != ResOK) |
| 226 | return res; | 249 | return res; |
| 227 | 250 | ||
diff --git a/mps/code/poolmv.h b/mps/code/poolmv.h index 1eba70cafa5..098cd3eaa2e 100644 --- a/mps/code/poolmv.h +++ b/mps/code/poolmv.h | |||
| @@ -43,6 +43,7 @@ | |||
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | #include "mpmtypes.h" | 45 | #include "mpmtypes.h" |
| 46 | #include "mpscmv.h" | ||
| 46 | 47 | ||
| 47 | typedef struct MVStruct *MV; | 48 | typedef struct MVStruct *MV; |
| 48 | 49 | ||
diff --git a/mps/code/poolmv2.c b/mps/code/poolmv2.c index dc10ce990a8..9c537171ff0 100644 --- a/mps/code/poolmv2.c +++ b/mps/code/poolmv2.c | |||
| @@ -27,7 +27,7 @@ SRCID(poolmv2, "$Id$"); | |||
| 27 | /* Private prototypes */ | 27 | /* Private prototypes */ |
| 28 | 28 | ||
| 29 | typedef struct MVTStruct *MVT; | 29 | typedef struct MVTStruct *MVT; |
| 30 | static Res MVTInit(Pool pool, va_list arg); | 30 | static Res MVTInit(Pool pool, ArgList arg); |
| 31 | static Bool MVTCheck(MVT mvt); | 31 | static Bool MVTCheck(MVT mvt); |
| 32 | static void MVTFinish(Pool pool); | 32 | static void MVTFinish(Pool pool); |
| 33 | static Res MVTBufferFill(Addr *baseReturn, Addr *limitReturn, | 33 | static Res MVTBufferFill(Addr *baseReturn, Addr *limitReturn, |
| @@ -194,38 +194,46 @@ static SegPref MVTSegPref(MVT mvt) | |||
| 194 | * Parameters are: | 194 | * Parameters are: |
| 195 | * minSize, meanSize, maxSize, reserveDepth, fragLimit | 195 | * minSize, meanSize, maxSize, reserveDepth, fragLimit |
| 196 | */ | 196 | */ |
| 197 | static Res MVTInit(Pool pool, va_list arg) | 197 | static Res MVTInit(Pool pool, ArgList args) |
| 198 | { | 198 | { |
| 199 | Arena arena; | 199 | Arena arena; |
| 200 | Size minSize, meanSize, maxSize, reuseSize, fillSize; | 200 | Size minSize, meanSize, maxSize, reuseSize, fillSize; |
| 201 | Count reserveDepth, abqDepth, fragLimit; | 201 | Count reserveDepth, abqDepth, fragLimit; |
| 202 | MVT mvt; | 202 | MVT mvt; |
| 203 | Res res; | 203 | Res res; |
| 204 | ArgStruct arg; | ||
| 204 | 205 | ||
| 205 | AVERT(Pool, pool); | 206 | AVERT(Pool, pool); |
| 206 | mvt = Pool2MVT(pool); | 207 | mvt = Pool2MVT(pool); |
| 207 | /* can't AVERT mvt, yet */ | 208 | /* can't AVERT mvt, yet */ |
| 208 | arena = PoolArena(pool); | 209 | arena = PoolArena(pool); |
| 209 | AVERT(Arena, arena); | 210 | AVERT(Arena, arena); |
| 210 | 211 | ||
| 211 | /* --- Should there be a ResBADARG ? */ | 212 | if (ArgPick(&arg, args, MPS_KEY_VARARGS)) { |
| 212 | minSize = va_arg(arg, Size); | 213 | /* FIXME: Inconsistent reporting of bad arguments. Elsewhere we assert or return ResPARAM. */ |
| 213 | unless (minSize > 0) | 214 | /* --- Should there be a ResBADARG ? */ |
| 214 | return ResLIMIT; | 215 | minSize = va_arg(arg.val.varargs, Size); |
| 215 | meanSize = va_arg(arg, Size); | 216 | unless (minSize > 0) |
| 216 | unless (meanSize >= minSize) | 217 | return ResLIMIT; |
| 217 | return ResLIMIT; | 218 | meanSize = va_arg(arg.val.varargs, Size); |
| 218 | maxSize = va_arg(arg, Size); | 219 | unless (meanSize >= minSize) |
| 219 | unless (maxSize >= meanSize) | 220 | return ResLIMIT; |
| 220 | return ResLIMIT; | 221 | maxSize = va_arg(arg.val.varargs, Size); |
| 221 | /* --- check that maxSize is not too large */ | 222 | unless (maxSize >= meanSize) |
| 222 | reserveDepth = va_arg(arg, Count); | 223 | return ResLIMIT; |
| 223 | unless (reserveDepth > 0) | 224 | /* --- check that maxSize is not too large */ |
| 224 | return ResLIMIT; | 225 | reserveDepth = va_arg(arg.val.varargs, Count); |
| 225 | /* --- check that reserveDepth is not too large or small */ | 226 | unless (reserveDepth > 0) |
| 226 | fragLimit = va_arg(arg, Count); | 227 | return ResLIMIT; |
| 227 | unless (fragLimit <= 100) | 228 | /* --- check that reserveDepth is not too large or small */ |
| 228 | return ResLIMIT; | 229 | fragLimit = va_arg(arg.val.varargs, Count); |
| 230 | unless (fragLimit <= 100) | ||
| 231 | return ResLIMIT; | ||
| 232 | } else { | ||
| 233 | /* FIXME: Keywords not yet supported. */ | ||
| 234 | res = ResPARAM; | ||
| 235 | goto failParam; | ||
| 236 | } | ||
| 229 | 237 | ||
| 230 | /* see <design/poolmvt/#arch.parameters> */ | 238 | /* see <design/poolmvt/#arch.parameters> */ |
| 231 | fillSize = SizeAlignUp(maxSize, ArenaAlign(arena)); | 239 | fillSize = SizeAlignUp(maxSize, ArenaAlign(arena)); |
| @@ -319,6 +327,7 @@ static Res MVTInit(Pool pool, va_list arg) | |||
| 319 | failABQ: | 327 | failABQ: |
| 320 | CBSFinish(MVTCBS(mvt)); | 328 | CBSFinish(MVTCBS(mvt)); |
| 321 | failCBS: | 329 | failCBS: |
| 330 | failParam: | ||
| 322 | AVER(res != ResOK); | 331 | AVER(res != ResOK); |
| 323 | return res; | 332 | return res; |
| 324 | } | 333 | } |
diff --git a/mps/code/poolmvff.c b/mps/code/poolmvff.c index a2647608187..16e6fa8f731 100644 --- a/mps/code/poolmvff.c +++ b/mps/code/poolmvff.c | |||
| @@ -409,7 +409,7 @@ static void MVFFBufferEmpty(Pool pool, Buffer buffer, | |||
| 409 | 409 | ||
| 410 | /* MVFFInit -- initialize method for MVFF */ | 410 | /* MVFFInit -- initialize method for MVFF */ |
| 411 | 411 | ||
| 412 | static Res MVFFInit(Pool pool, va_list arg) | 412 | static Res MVFFInit(Pool pool, ArgList args) |
| 413 | { | 413 | { |
| 414 | Size extendBy, avgSize, align; | 414 | Size extendBy, avgSize, align; |
| 415 | Bool slotHigh, arenaHigh, firstFit; | 415 | Bool slotHigh, arenaHigh, firstFit; |
| @@ -418,6 +418,7 @@ static Res MVFFInit(Pool pool, va_list arg) | |||
| 418 | Res res; | 418 | Res res; |
| 419 | void *p; | 419 | void *p; |
| 420 | ZoneSet zones; | 420 | ZoneSet zones; |
| 421 | ArgStruct arg; | ||
| 421 | 422 | ||
| 422 | AVERT(Pool, pool); | 423 | AVERT(Pool, pool); |
| 423 | 424 | ||
| @@ -425,12 +426,20 @@ static Res MVFFInit(Pool pool, va_list arg) | |||
| 425 | /* <design/poolmvff/#method.init> */ | 426 | /* <design/poolmvff/#method.init> */ |
| 426 | /* .arg.check: we do the same checks here and in MVFFCheck */ | 427 | /* .arg.check: we do the same checks here and in MVFFCheck */ |
| 427 | /* except for arenaHigh, which is stored only in the segPref. */ | 428 | /* except for arenaHigh, which is stored only in the segPref. */ |
| 428 | extendBy = va_arg(arg, Size); | 429 | |
| 429 | avgSize = va_arg(arg, Size); | 430 | if (ArgPick(&arg, args, MPS_KEY_VARARGS)) { |
| 430 | align = va_arg(arg, Size); | 431 | extendBy = va_arg(arg.val.varargs, Size); |
| 431 | slotHigh = va_arg(arg, Bool); | 432 | avgSize = va_arg(arg.val.varargs, Size); |
| 432 | arenaHigh = va_arg(arg, Bool); | 433 | align = va_arg(arg.val.varargs, Size); |
| 433 | firstFit = va_arg(arg, Bool); | 434 | slotHigh = va_arg(arg.val.varargs, Bool); |
| 435 | arenaHigh = va_arg(arg.val.varargs, Bool); | ||
| 436 | firstFit = va_arg(arg.val.varargs, Bool); | ||
| 437 | } else { | ||
| 438 | /* FIXME: Accept keywords! */ | ||
| 439 | res = ResPARAM; | ||
| 440 | goto failParam; | ||
| 441 | } | ||
| 442 | |||
| 434 | AVER(extendBy > 0); /* .arg.check */ | 443 | AVER(extendBy > 0); /* .arg.check */ |
| 435 | AVER(avgSize > 0); /* .arg.check */ | 444 | AVER(avgSize > 0); /* .arg.check */ |
| 436 | AVER(avgSize <= extendBy); /* .arg.check */ | 445 | AVER(avgSize <= extendBy); /* .arg.check */ |
| @@ -479,6 +488,7 @@ static Res MVFFInit(Pool pool, va_list arg) | |||
| 479 | 488 | ||
| 480 | failInit: | 489 | failInit: |
| 481 | ControlFree(arena, p, sizeof(SegPrefStruct)); | 490 | ControlFree(arena, p, sizeof(SegPrefStruct)); |
| 491 | failParam: | ||
| 482 | return res; | 492 | return res; |
| 483 | } | 493 | } |
| 484 | 494 | ||
diff --git a/mps/code/pooln.c b/mps/code/pooln.c index dcd59f65df5..f0851f56fd5 100644 --- a/mps/code/pooln.c +++ b/mps/code/pooln.c | |||
| @@ -30,7 +30,7 @@ typedef struct PoolNStruct { | |||
| 30 | 30 | ||
| 31 | /* NInit -- init method for class N */ | 31 | /* NInit -- init method for class N */ |
| 32 | 32 | ||
| 33 | static Res NInit(Pool pool, va_list args) | 33 | static Res NInit(Pool pool, ArgList args) |
| 34 | { | 34 | { |
| 35 | PoolN poolN = PoolPoolN(pool); | 35 | PoolN poolN = PoolPoolN(pool); |
| 36 | 36 | ||
diff --git a/mps/code/poolncv.c b/mps/code/poolncv.c index cbbda34d78b..f7598c5539a 100644 --- a/mps/code/poolncv.c +++ b/mps/code/poolncv.c | |||
| @@ -19,7 +19,7 @@ static void testit(ArenaClass class, ArgList args) | |||
| 19 | 19 | ||
| 20 | die(ArenaCreate(&arena, class, args), "ArenaCreate"); | 20 | die(ArenaCreate(&arena, class, args), "ArenaCreate"); |
| 21 | 21 | ||
| 22 | die(PoolCreate(&pool, arena, PoolClassN()), "PoolNCreate"); | 22 | die(PoolCreate(&pool, arena, PoolClassN(), argsNone), "PoolNCreate"); |
| 23 | res = PoolAlloc(&p, pool, 1, /* withReservoirPermit */ FALSE); | 23 | res = PoolAlloc(&p, pool, 1, /* withReservoirPermit */ FALSE); |
| 24 | if (res == ResOK) { | 24 | if (res == ResOK) { |
| 25 | error("Error: Unexpectedly succeeded in" | 25 | error("Error: Unexpectedly succeeded in" |
diff --git a/mps/code/poolsnc.c b/mps/code/poolsnc.c index 4dcb7115902..608fb1eb735 100644 --- a/mps/code/poolsnc.c +++ b/mps/code/poolsnc.c | |||
| @@ -361,17 +361,28 @@ static Bool sncFindFreeSeg(Seg *segReturn, SNC snc, Size size) | |||
| 361 | 361 | ||
| 362 | /* SNCInit -- initialize an SNC pool */ | 362 | /* SNCInit -- initialize an SNC pool */ |
| 363 | 363 | ||
| 364 | static Res SNCInit(Pool pool, va_list arg) | 364 | static Res SNCInit(Pool pool, ArgList args) |
| 365 | { | 365 | { |
| 366 | Res res; | ||
| 366 | SNC snc; | 367 | SNC snc; |
| 367 | Format format; | 368 | Format format; |
| 369 | ArgStruct arg; | ||
| 368 | 370 | ||
| 369 | /* weak check, as half-way through initialization */ | 371 | /* weak check, as half-way through initialization */ |
| 370 | AVER(pool != NULL); | 372 | AVER(pool != NULL); |
| 371 | 373 | ||
| 372 | snc = Pool2SNC(pool); | 374 | snc = Pool2SNC(pool); |
| 373 | 375 | ||
| 374 | format = va_arg(arg, Format); | 376 | if (ArgPick(&arg, args, MPS_KEY_VARARGS)) |
| 377 | format = va_arg(arg.val.varargs, Format); | ||
| 378 | else { | ||
| 379 | if (ArgPick(&arg, args, MPS_KEY_FORMAT)) | ||
| 380 | format = arg.val.format; | ||
| 381 | else { | ||
| 382 | res = ResPARAM; | ||
| 383 | goto failParam; | ||
| 384 | } | ||
| 385 | } | ||
| 375 | 386 | ||
| 376 | AVERT(Format, format); | 387 | AVERT(Format, format); |
| 377 | pool->format = format; | 388 | pool->format = format; |
| @@ -384,6 +395,9 @@ static Res SNCInit(Pool pool, va_list arg) | |||
| 384 | AVERT(SNC, snc); | 395 | AVERT(SNC, snc); |
| 385 | EVENT2(PoolInitSNC, pool, format); | 396 | EVENT2(PoolInitSNC, pool, format); |
| 386 | return ResOK; | 397 | return ResOK; |
| 398 | |||
| 399 | failParam: | ||
| 400 | return res; | ||
| 387 | } | 401 | } |
| 388 | 402 | ||
| 389 | 403 | ||
diff --git a/mps/code/reserv.c b/mps/code/reserv.c index d50e02b931f..6dfcd8543ad 100644 --- a/mps/code/reserv.c +++ b/mps/code/reserv.c | |||
| @@ -35,7 +35,7 @@ SRCID(reserv, "$Id$"); | |||
| 35 | 35 | ||
| 36 | /* ResPoolInit -- Reservoir pool init method */ | 36 | /* ResPoolInit -- Reservoir pool init method */ |
| 37 | 37 | ||
| 38 | static Res ResPoolInit(Pool pool, va_list arg) | 38 | static Res ResPoolInit(Pool pool, ArgList arg) |
| 39 | { | 39 | { |
| 40 | AVER(pool != NULL); | 40 | AVER(pool != NULL); |
| 41 | 41 | ||
| @@ -388,7 +388,7 @@ Res ReservoirInit(Reservoir reservoir, Arena arena) | |||
| 388 | reservoir->sig = ReservoirSig; | 388 | reservoir->sig = ReservoirSig; |
| 389 | /* initialize the reservoir pool, <design/reservoir/> */ | 389 | /* initialize the reservoir pool, <design/reservoir/> */ |
| 390 | res = PoolInit(&reservoir->poolStruct, | 390 | res = PoolInit(&reservoir->poolStruct, |
| 391 | arena, EnsureReservoirPoolClass()); | 391 | arena, EnsureReservoirPoolClass(), argsNone); |
| 392 | if (res == ResOK) { | 392 | if (res == ResOK) { |
| 393 | AVERT(Reservoir, reservoir); | 393 | AVERT(Reservoir, reservoir); |
| 394 | } | 394 | } |
diff --git a/mps/code/segsmss.c b/mps/code/segsmss.c index 4741b33f89b..46b3e0288ee 100644 --- a/mps/code/segsmss.c +++ b/mps/code/segsmss.c | |||
| @@ -330,17 +330,24 @@ static Res AMSTSegSizePolicy(Size *sizeReturn, | |||
| 330 | 330 | ||
| 331 | /* AMSTInit -- the pool class initialization method */ | 331 | /* AMSTInit -- the pool class initialization method */ |
| 332 | 332 | ||
| 333 | static Res AMSTInit(Pool pool, va_list args) | 333 | static Res AMSTInit(Pool pool, ArgList args) |
| 334 | { | 334 | { |
| 335 | AMST amst; AMS ams; | 335 | AMST amst; AMS ams; |
| 336 | Format format; | 336 | Format format; |
| 337 | Chain chain; | 337 | Chain chain; |
| 338 | Res res; | 338 | Res res; |
| 339 | static GenParamStruct genParam = { 1024, 0.2 }; | 339 | static GenParamStruct genParam = { 1024, 0.2 }; |
| 340 | ArgStruct arg; | ||
| 340 | 341 | ||
| 341 | AVERT(Pool, pool); | 342 | AVERT(Pool, pool); |
| 342 | 343 | ||
| 343 | format = va_arg(args, Format); | 344 | if (ArgPick(&arg, args, MPS_KEY_FORMAT)) |
| 345 | format = arg.val.format; | ||
| 346 | else { | ||
| 347 | res = ResPARAM; | ||
| 348 | goto failParam; | ||
| 349 | } | ||
| 350 | |||
| 344 | res = ChainCreate(&chain, pool->arena, 1, &genParam); | 351 | res = ChainCreate(&chain, pool->arena, 1, &genParam); |
| 345 | if (res != ResOK) | 352 | if (res != ResOK) |
| 346 | return res; | 353 | return res; |
| @@ -362,6 +369,10 @@ static Res AMSTInit(Pool pool, va_list args) | |||
| 362 | amst->sig = AMSTSig; | 369 | amst->sig = AMSTSig; |
| 363 | AVERT(AMST, amst); | 370 | AVERT(AMST, amst); |
| 364 | return ResOK; | 371 | return ResOK; |
| 372 | |||
| 373 | failParam: | ||
| 374 | AVER(res != ResOK); | ||
| 375 | return res; | ||
| 365 | } | 376 | } |
| 366 | 377 | ||
| 367 | 378 | ||
| @@ -755,13 +766,17 @@ static void *test(void *arg, size_t s) | |||
| 755 | mps_ap_t busy_ap; | 766 | mps_ap_t busy_ap; |
| 756 | mps_addr_t busy_init; | 767 | mps_addr_t busy_init; |
| 757 | char *indent = " "; | 768 | char *indent = " "; |
| 769 | mps_arg_s args[2]; | ||
| 758 | 770 | ||
| 759 | arena = (mps_arena_t)arg; | 771 | arena = (mps_arena_t)arg; |
| 760 | (void)s; /* unused */ | 772 | (void)s; /* unused */ |
| 761 | 773 | ||
| 762 | die(mps_fmt_create_A(&format, arena, dylan_fmt_A()), "fmt_create"); | 774 | die(mps_fmt_create_A(&format, arena, dylan_fmt_A()), "fmt_create"); |
| 763 | 775 | ||
| 764 | die(mps_pool_create(&pool, arena, mps_class_amst(), format), | 776 | args[0].key = MPS_KEY_FORMAT; |
| 777 | args[0].val.format = format; | ||
| 778 | args[1].key = MPS_KEY_ARGS_END; | ||
| 779 | die(mps_pool_create_k(&pool, arena, mps_class_amst(), args), | ||
| 765 | "pool_create(amst)"); | 780 | "pool_create(amst)"); |
| 766 | 781 | ||
| 767 | die(mps_ap_create(&ap, pool, mps_rank_exact()), "BufferCreate"); | 782 | die(mps_ap_create(&ap, pool, mps_rank_exact()), "BufferCreate"); |