mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-26 08:41:47 -07:00
Make mps_args_done obsolete.
Copied from Perforce Change: 184543 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
07bac504f5
commit
32d10cd02a
37 changed files with 15 additions and 85 deletions
|
|
@ -226,7 +226,6 @@ int main(int argc, char *argv[])
|
|||
MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_AMS_SUPPORT_AMBIGUOUS, FALSE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_POOL_DEBUG_OPTIONS, &freecheckOptions);
|
||||
MPS_ARGS_DONE(args);
|
||||
die(mps_pool_create_k(&pool, arena, mps_class_ams_debug(), args),
|
||||
"pool_create(ams_debug,share)");
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
@ -239,7 +238,6 @@ int main(int argc, char *argv[])
|
|||
MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_AMS_SUPPORT_AMBIGUOUS, TRUE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_POOL_DEBUG_OPTIONS, &freecheckOptions);
|
||||
MPS_ARGS_DONE(args);
|
||||
die(mps_pool_create_k(&pool, arena, mps_class_ams_debug(), args),
|
||||
"pool_create(ams_debug,ambig)");
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
@ -252,7 +250,6 @@ int main(int argc, char *argv[])
|
|||
MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_AMS_SUPPORT_AMBIGUOUS, TRUE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_POOL_DEBUG_OPTIONS, &freecheckOptions);
|
||||
MPS_ARGS_DONE(args);
|
||||
die(mps_pool_create_k(&pool, arena, mps_class_ams(), args),
|
||||
"pool_create(ams,ambig)");
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
@ -265,7 +262,6 @@ int main(int argc, char *argv[])
|
|||
MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_AMS_SUPPORT_AMBIGUOUS, FALSE);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_POOL_DEBUG_OPTIONS, &freecheckOptions);
|
||||
MPS_ARGS_DONE(args);
|
||||
die(mps_pool_create_k(&pool, arena, mps_class_ams(), args),
|
||||
"pool_create(ams,share)");
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
|
|||
|
|
@ -314,7 +314,6 @@ Res ControlInit(Arena arena)
|
|||
AVERT(Arena, arena);
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_EXTEND_BY, CONTROL_EXTEND_BY);
|
||||
MPS_ARGS_DONE(args);
|
||||
res = PoolInit(&arena->controlPoolStruct.poolStruct, arena,
|
||||
PoolClassMV(), args);
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
|
|||
|
|
@ -344,7 +344,6 @@ static void testPageTable(ArenaClass class, Size size, Addr addr)
|
|||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, size);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_CL_BASE, addr);
|
||||
MPS_ARGS_DONE(args);
|
||||
die(ArenaCreate(&arena, class, args), "ArenaCreate");
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
|
|
@ -382,7 +381,6 @@ static void testSize(Size size)
|
|||
do {
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, size);
|
||||
MPS_ARGS_DONE(args);
|
||||
res = ArenaCreate(&arena, class, args);
|
||||
} MPS_ARGS_END(args);
|
||||
if (res == ResOK)
|
||||
|
|
|
|||
|
|
@ -278,7 +278,6 @@ static void *setup(void *v, size_t s)
|
|||
weaknesss and want things to die in it promptly. */
|
||||
MPS_ARGS_ADD(args, MPS_KEY_GEN, 0);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FORMAT, dylanfmt);
|
||||
MPS_ARGS_DONE(args);
|
||||
die(mps_pool_create_k(&leafpool, arena, mps_class_lo(), args),
|
||||
"Leaf Pool Create\n");
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
|
|||
|
|
@ -281,7 +281,6 @@ static void *setup(void *v, size_t s)
|
|||
weaknesss and want things to die in it promptly. */
|
||||
MPS_ARGS_ADD(args, MPS_KEY_GEN, 0);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FORMAT, dylanfmt);
|
||||
MPS_ARGS_DONE(args);
|
||||
die(mps_pool_create_k(&leafpool, arena, mps_class_lo(), args),
|
||||
"Leaf Pool Create\n");
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
|
|||
|
|
@ -223,7 +223,6 @@ Res CBSInit(Arena arena, CBS cbs, void *owner, Align alignment,
|
|||
MPS_ARGS_BEGIN(pcArgs) {
|
||||
MPS_ARGS_ADD(pcArgs, MPS_KEY_MFS_UNIT_SIZE, sizeof(CBSBlockStruct));
|
||||
MPS_ARGS_ADD(pcArgs, MPS_KEY_EXTEND_BY, extendBy);
|
||||
MPS_ARGS_DONE(pcArgs);
|
||||
res = PoolCreate(&(cbs->blockPool), arena, PoolClassMFS(), pcArgs);
|
||||
} MPS_ARGS_END(pcArgs);
|
||||
if (res != ResOK)
|
||||
|
|
|
|||
|
|
@ -188,7 +188,6 @@ static Res DebugPoolInit(Pool pool, ArgList args)
|
|||
MPS_ARGS_BEGIN(pcArgs) {
|
||||
MPS_ARGS_ADD(pcArgs, MPS_KEY_EXTEND_BY, debug->tagSize); /* FIXME: Check this */
|
||||
MPS_ARGS_ADD(pcArgs, MPS_KEY_MFS_UNIT_SIZE, debug->tagSize);
|
||||
MPS_ARGS_DONE(pcArgs);
|
||||
res = PoolCreate(&debug->tagPool, PoolArena(pool), PoolClassMFS(), pcArgs);
|
||||
} MPS_ARGS_END(pcArgs);
|
||||
if (res != ResOK)
|
||||
|
|
|
|||
|
|
@ -187,7 +187,6 @@ static void arena_wrap(dj_t dj, mps_class_t pool_class, const char *name)
|
|||
{
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, 256ul * 1024 * 1024); /* FIXME: Why is there no default? */
|
||||
MPS_ARGS_DONE(args);
|
||||
DJMUST(mps_arena_create_k(&arena, mps_arena_class_vm(), args));
|
||||
} MPS_ARGS_END(args);
|
||||
DJMUST(mps_pool_create_k(&pool, arena, pool_class, mps_args_none));
|
||||
|
|
|
|||
|
|
@ -183,7 +183,6 @@ int main(int argc, char *argv[])
|
|||
MPS_ARGS_ADD(args, MPS_KEY_MVFF_ARENA_HIGH, rnd() % 2);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_MVFF_SLOT_HIGH, rnd() % 2);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_MVFF_FIRST_FIT, rnd() % 2);
|
||||
MPS_ARGS_DONE(args);
|
||||
die(mps_pool_create_k(&pool, arena, mps_class_mvff(), args), "create MVFF");
|
||||
} MPS_ARGS_END(args);
|
||||
{
|
||||
|
|
@ -203,7 +202,6 @@ int main(int argc, char *argv[])
|
|||
MPS_ARGS_ADD(args, MPS_KEY_MAX_SIZE, (1 + rnd() % 4) * 1024);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_MVT_RESERVE_DEPTH, (1 + rnd() % 64) * 16);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_MVT_FRAG_LIMIT, (rnd() % 101) / 100.0);
|
||||
MPS_ARGS_DONE(args);
|
||||
die(mps_pool_create_k(&pool, arena, mps_class_mvt(), args), "create MVFF");
|
||||
} MPS_ARGS_END(args);
|
||||
{
|
||||
|
|
|
|||
|
|
@ -240,7 +240,6 @@ static void arena_setup(gcthread_fn_t fn,
|
|||
{
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, arenasize);
|
||||
MPS_ARGS_DONE(args);
|
||||
RESMUST(mps_arena_create_k(&arena, mps_arena_class_vm(), args));
|
||||
} MPS_ARGS_END(args);
|
||||
RESMUST(dylan_fmt(&format, arena));
|
||||
|
|
@ -253,7 +252,6 @@ static void arena_setup(gcthread_fn_t fn,
|
|||
MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format);
|
||||
if (ngen > 0)
|
||||
MPS_ARGS_ADD(args, MPS_KEY_CHAIN, chain);
|
||||
MPS_ARGS_DONE(args);
|
||||
RESMUST(mps_pool_create_k(&pool, arena, pool_class, args));
|
||||
} MPS_ARGS_END(args);
|
||||
watch(fn, name);
|
||||
|
|
|
|||
|
|
@ -222,9 +222,10 @@ extern const struct mps_key_s _mps_key_fmt_class;
|
|||
|
||||
#define MPS_ARGS_BEGIN(_var) \
|
||||
MPS_BEGIN \
|
||||
mps_arg_s _var[MPS_ARGS_MAX]; \
|
||||
unsigned _var##_i = 0; \
|
||||
MPS_BEGIN
|
||||
mps_arg_s _var[MPS_ARGS_MAX]; \
|
||||
unsigned _var##_i = 0; \
|
||||
_var[_var##_i].key = MPS_KEY_ARGS_END; \
|
||||
MPS_BEGIN
|
||||
|
||||
#define MPS_ARGS_ADD_FIELD(_var, _key, _field, _val) \
|
||||
MPS_BEGIN \
|
||||
|
|
@ -232,6 +233,7 @@ extern const struct mps_key_s _mps_key_fmt_class;
|
|||
_var[_var##_i].key = (_key); \
|
||||
_var[_var##_i].val._field = (_val); \
|
||||
++_var##_i; \
|
||||
_var[_var##_i].key = MPS_KEY_ARGS_END; \
|
||||
MPS_END
|
||||
|
||||
#define MPS_ARGS_ADD(_var, _key, _val) \
|
||||
|
|
|
|||
|
|
@ -498,7 +498,6 @@ mps_res_t mps_fmt_create_A(mps_fmt_t *mps_fmt_o,
|
|||
MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, mps_fmt_A->fwd);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, mps_fmt_A->isfwd);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mps_fmt_A->pad);
|
||||
MPS_ARGS_DONE(args);
|
||||
res = FormatCreate(&format, arena, args);
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
|
|
@ -533,7 +532,6 @@ mps_res_t mps_fmt_create_B(mps_fmt_t *mps_fmt_o,
|
|||
MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, mps_fmt_B->isfwd);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mps_fmt_B->pad);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FMT_CLASS, mps_fmt_B->mps_class);
|
||||
MPS_ARGS_DONE(args);
|
||||
res = FormatCreate(&format, arena, args);
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
|
|
@ -568,7 +566,6 @@ mps_res_t mps_fmt_create_auto_header(mps_fmt_t *mps_fmt_o,
|
|||
MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, mps_fmt->fwd);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, mps_fmt->isfwd);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mps_fmt->pad);
|
||||
MPS_ARGS_DONE(args);
|
||||
res = FormatCreate(&format, arena, args);
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
|
|
@ -601,7 +598,6 @@ mps_res_t mps_fmt_create_fixed(mps_fmt_t *mps_fmt_o,
|
|||
MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, mps_fmt_fixed->fwd);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, mps_fmt_fixed->isfwd);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mps_fmt_fixed->pad);
|
||||
MPS_ARGS_DONE(args);
|
||||
res = FormatCreate(&format, arena, args);
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
|
|
|
|||
|
|
@ -187,7 +187,6 @@ static void stress_with_arena_class(mps_arena_class_t aclass)
|
|||
MPS_ARGS_ADD(args, MPS_KEY_MAX_SIZE, max);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_MVT_RESERVE_DEPTH, TEST_SET_SIZE/2);
|
||||
MPS_ARGS_ADD(args, MPS_KEY_MVT_FRAG_LIMIT, 0.3);
|
||||
MPS_ARGS_DONE(args);
|
||||
die(stress(mps_class_mvt(), arena, randomSize, args), "stress MVT");
|
||||
} MPS_ARGS_END(args);
|
||||
|
||||
|
|
|
|||
|
|
@ -1191,7 +1191,6 @@ static Res AMCBufferFill(Addr *baseReturn, Addr *limitReturn,
|
|||
alignedSize = SizeAlignUp(size, ArenaAlign(arena));
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD_FIELD(args, amcKeySegType, p, &gen->type); /* .segtype */
|
||||
MPS_ARGS_DONE(args);
|
||||
res = ChainAlloc(&seg, amc->chain, PoolGenNr(pgen), amcSegClassGet(),
|
||||
alignedSize, pool, withReservoirPermit, args);
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
|
|||
|
|
@ -467,7 +467,6 @@ static Res AWLSegCreate(AWLSeg *awlsegReturn,
|
|||
return ResMEMORY;
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD_FIELD(args, awlKeySegRankSet, u, rankSet);
|
||||
MPS_ARGS_DONE(args);
|
||||
res = ChainAlloc(&seg, awl->chain, awl->pgen.nr, AWLSegClassGet(),
|
||||
size, pool, reservoirPermit, args);
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
|
|||
|
|
@ -526,7 +526,6 @@ static Res MRGSegPairCreate(MRGRefSeg *refSegReturn, MRG mrg,
|
|||
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD_FIELD(args, mrgKeyLinkSeg, p, linkseg); /* .ref.initarg */
|
||||
MPS_ARGS_DONE(args);
|
||||
res = SegAlloc(&segRefPart, EnsureMRGRefSegClass(),
|
||||
SegPrefDefault(), mrg->extendBy, pool,
|
||||
withReservoirPermit, args);
|
||||
|
|
|
|||
|
|
@ -243,7 +243,6 @@ static Res MVInit(Pool pool, ArgList args)
|
|||
MPS_ARGS_BEGIN(piArgs) {
|
||||
MPS_ARGS_ADD(piArgs, MPS_KEY_EXTEND_BY, blockExtendBy);
|
||||
MPS_ARGS_ADD(piArgs, MPS_KEY_MFS_UNIT_SIZE, sizeof(MVBlockStruct));
|
||||
MPS_ARGS_DONE(piArgs);
|
||||
res = PoolInit(&mv->blockPoolStruct.poolStruct, arena, PoolClassMFS(), piArgs);
|
||||
} MPS_ARGS_END(piArgs);
|
||||
if(res != ResOK)
|
||||
|
|
@ -254,7 +253,6 @@ static Res MVInit(Pool pool, ArgList args)
|
|||
MPS_ARGS_BEGIN(piArgs) {
|
||||
MPS_ARGS_ADD(piArgs, MPS_KEY_EXTEND_BY, spanExtendBy);
|
||||
MPS_ARGS_ADD(piArgs, MPS_KEY_MFS_UNIT_SIZE, sizeof(MVSpanStruct));
|
||||
MPS_ARGS_DONE(piArgs);
|
||||
res = PoolInit(&mv->spanPoolStruct.poolStruct, arena, PoolClassMFS(), piArgs);
|
||||
} MPS_ARGS_END(piArgs);
|
||||
if(res != ResOK)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ int main(int argc, char *argv[])
|
|||
testlib_unused(argc);
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, 600000);
|
||||
MPS_ARGS_DONE(args);
|
||||
testit((ArenaClass)mps_arena_class_vm(), args);
|
||||
} MPS_ARGS_END(args);
|
||||
printf("%s: Conclusion: Failed to find any defects.\n", argv[0]);
|
||||
|
|
|
|||
|
|
@ -767,7 +767,6 @@ static void *test(void *arg, size_t s)
|
|||
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format);
|
||||
MPS_ARGS_DONE(args);
|
||||
die(mps_pool_create_k(&pool, arena, mps_class_amst(), args),
|
||||
"pool_create(amst)");
|
||||
} MPS_ARGS_END(args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue