From b4bda477a5771ed1a36650c47baad09f57b869bd Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Sun, 25 Dec 2022 11:52:37 +0000 Subject: [PATCH 1/3] Replace deprecated format structures and functions in test cases. The object format variant structures (mps_fmt_A_s, mps_fmt_B_s, mps_fmt_auto_header_s) and the functions taking them as arguments (mps_fmt_create_A, mps_fmt_create_B, mps_fmt_create_auto_header) were deprecated in release 1.112.0. Using the recommended interface mps_fmt_create_k in test cases improves the coverage of that interfaces, makes it easy to remove the deprecated interfaces if needed, and prepares the test cases for the addition of more format methods if needed. Additionally, remove copy methods and associated code for counting the number of copies, as copy methods are not called and so this code is unreachable or ineffective. --- code/amsss.c | 2 +- code/awlut.c | 6 +- code/awlutth.c | 6 +- code/comm.gmk | 6 +- code/commpre.nmk | 4 +- code/finalcv.c | 2 +- code/finaltest.c | 2 +- code/fmtdy.c | 140 +++++---------------------- code/fmtdy.h | 6 +- code/fmthe.c | 64 +++++-------- code/fmtno.c | 149 ----------------------------- code/fmtno.h | 54 ----------- code/locv.c | 39 ++------ code/mps.xcodeproj/project.pbxproj | 40 -------- code/mpsicv.c | 2 +- code/qs.c | 31 ++---- code/segsmss.c | 2 +- code/zcoll.c | 2 +- code/zmess.c | 2 +- test/argerr/10.c | 4 +- test/argerr/11.c | 4 +- test/argerr/12.c | 4 +- test/argerr/13.c | 4 +- test/argerr/14.c | 4 +- test/argerr/146.c | 48 ++-------- test/argerr/147.c | 49 ++-------- test/argerr/148.c | 48 ++-------- test/argerr/149.c | 48 ++-------- test/argerr/15.c | 4 +- test/argerr/150.c | 48 ++-------- test/argerr/151.c | 48 ++-------- test/argerr/154.c | 4 +- test/argerr/16.c | 4 +- test/argerr/17.c | 4 +- test/argerr/18.c | 4 +- test/argerr/19.c | 4 +- test/argerr/4.c | 7 +- test/argerr/45.c | 4 +- test/argerr/46.c | 4 +- test/argerr/47.c | 4 +- test/argerr/48.c | 4 +- test/argerr/49.c | 4 +- test/argerr/5.c | 7 +- test/argerr/50.c | 4 +- test/argerr/51.c | 4 +- test/argerr/52.c | 4 +- test/argerr/53.c | 4 +- test/argerr/54.c | 4 +- test/argerr/55.c | 4 +- test/argerr/56.c | 4 +- test/argerr/57.c | 4 +- test/argerr/58.c | 4 +- test/argerr/59.c | 4 +- test/argerr/6.c | 7 +- test/argerr/60.c | 4 +- test/argerr/61.c | 4 +- test/argerr/62.c | 4 +- test/argerr/63.c | 4 +- test/argerr/64.c | 4 +- test/argerr/65.c | 4 +- test/argerr/66.c | 4 +- test/argerr/67.c | 4 +- test/argerr/7.c | 6 +- test/argerr/8.c | 4 +- test/argerr/9.c | 4 +- test/conerr/34.c | 4 +- test/conerr/35.c | 4 +- test/conerr/36.c | 4 +- test/conerr/37.c | 4 +- test/conerr/37f.c | 4 +- test/conerr/38.c | 4 +- test/conerr/38f.c | 4 +- test/conerr/39.c | 4 +- test/conerr/39f.c | 4 +- test/conerr/40.c | 4 +- test/conerr/40f.c | 4 +- test/conerr/60.c | 2 +- test/conerr/61.c | 2 +- test/conerr/62.c | 2 +- test/conerr/63.c | 2 +- test/conerr/64.c | 6 +- test/conerr/65.c | 6 +- test/conerr/66.c | 2 +- test/conerr/67.c | 2 +- test/conerr/68.c | 6 +- test/function/10.c | 38 ++------ test/function/103.c | 2 +- test/function/104.c | 2 +- test/function/105.c | 2 +- test/function/106.c | 2 +- test/function/107.c | 2 +- test/function/108.c | 2 +- test/function/109.c | 3 +- test/function/11.c | 2 +- test/function/110.c | 3 +- test/function/111.c | 3 +- test/function/112.c | 3 +- test/function/113.c | 4 +- test/function/114.c | 4 +- test/function/116.c | 4 +- test/function/117.c | 2 +- test/function/118.c | 27 ++---- test/function/12.c | 2 +- test/function/122.c | 4 +- test/function/123.c | 4 +- test/function/124.c | 2 +- test/function/125.c | 3 +- test/function/126.c | 3 +- test/function/127.c | 4 +- test/function/128.c | 4 +- test/function/129.c | 4 +- test/function/12p.c | 4 +- test/function/13.c | 4 +- test/function/130.c | 3 +- test/function/131.c | 4 +- test/function/134.c | 4 +- test/function/138.c | 3 +- test/function/14.c | 2 +- test/function/147.c | 4 +- test/function/148.c | 2 +- test/function/15.c | 2 +- test/function/150.c | 3 +- test/function/151.c | 4 +- test/function/152.c | 2 +- test/function/153.c | 4 +- test/function/16.c | 2 +- test/function/17.c | 2 +- test/function/171.c | 4 +- test/function/18.c | 3 +- test/function/19.c | 3 +- test/function/2.c | 4 +- test/function/20.c | 2 +- test/function/215.c | 4 +- test/function/223.c | 4 +- test/function/226.c | 5 +- test/function/227.c | 8 +- test/function/23.c | 2 +- test/function/234.c | 2 +- test/function/236.c | 2 +- test/function/237.c | 2 +- test/function/24.c | 33 ++----- test/function/25.c | 4 +- test/function/27.c | 2 +- test/function/28.c | 2 +- test/function/29.c | 4 +- test/function/3.c | 4 +- test/function/30.c | 2 +- test/function/31.c | 2 +- test/function/32.c | 2 +- test/function/33.c | 2 +- test/function/34.c | 2 +- test/function/35.c | 2 +- test/function/36.c | 2 +- test/function/37.c | 2 +- test/function/38.c | 23 +---- test/function/39.c | 2 +- test/function/4.c | 4 +- test/function/40.c | 2 +- test/function/41.c | 2 +- test/function/42.c | 2 +- test/function/43.c | 2 +- test/function/44.c | 3 +- test/function/45.c | 2 +- test/function/46.c | 4 +- test/function/47.c | 3 +- test/function/48.c | 2 +- test/function/49.c | 3 +- test/function/5.c | 4 +- test/function/50.c | 3 +- test/function/51.c | 3 +- test/function/52.c | 3 +- test/function/53.c | 2 +- test/function/54.c | 2 +- test/function/55.c | 2 +- test/function/56.c | 2 +- test/function/57.c | 2 +- test/function/6.c | 2 +- test/function/60.c | 4 +- test/function/61.c | 2 +- test/function/62.c | 2 +- test/function/63.c | 2 +- test/function/64.c | 2 +- test/function/65.c | 2 +- test/function/66.c | 22 +---- test/function/67.c | 2 +- test/function/68.c | 4 +- test/function/69.c | 2 +- test/function/72.c | 4 +- test/function/73.c | 3 +- test/function/74.c | 3 +- test/function/75.c | 3 +- test/function/76.c | 3 +- test/function/77.c | 2 +- test/function/78.c | 2 +- test/function/79.c | 2 +- test/function/80.c | 2 +- test/function/81.c | 3 +- test/function/83.c | 2 +- test/function/9.c | 4 +- test/function/96.c | 2 +- test/function/97.c | 4 +- test/function/99.c | 2 +- test/test/testlib/awlfmt.c | 65 +++---------- test/test/testlib/awlfmt.h | 4 +- test/test/testlib/exfmt.c | 63 +++--------- test/test/testlib/exfmt.h | 6 +- test/test/testlib/fastfmt.c | 31 +++--- test/test/testlib/fastfmt.h | 3 +- test/test/testlib/lofmt.c | 41 +++----- test/test/testlib/lofmt.h | 8 +- test/test/testlib/myfmt.c | 80 ++++------------ test/test/testlib/myfmt.h | 13 +-- test/test/testlib/newfmt.c | 64 +++---------- test/test/testlib/newfmt.h | 4 +- test/test/testlib/rankfmt.c | 66 +++---------- test/test/testlib/rankfmt.h | 8 +- 216 files changed, 445 insertions(+), 1562 deletions(-) delete mode 100644 code/fmtno.c delete mode 100644 code/fmtno.h diff --git a/code/amsss.c b/code/amsss.c index f7ef981e10..7b073db73c 100644 --- a/code/amsss.c +++ b/code/amsss.c @@ -213,7 +213,7 @@ int main(int argc, char *argv[]) mps_message_type_enable(arena, mps_message_type_gc_start()); mps_message_type_enable(arena, mps_message_type_gc()); die(mps_thread_reg(&thread, arena), "thread_reg"); - die(mps_fmt_create_A(&format, arena, dylan_fmt_A()), "fmt_create"); + die(dylan_fmt(&format, arena), "fmt_create"); die(mps_chain_create(&chain, arena, 1, testChain), "chain_create"); for (i = 0; i < 8; i++) { diff --git a/code/awlut.c b/code/awlut.c index 30631f02eb..3ef7eac583 100644 --- a/code/awlut.c +++ b/code/awlut.c @@ -305,10 +305,8 @@ static void setup(struct guff_s *guff) die(mps_root_create_thread(&stack, arena, thr, guff), "Root Create\n"); - die(mps_fmt_create_A(&dylanfmt, arena, dylan_fmt_A()), - "Format Create\n"); - die(mps_fmt_create_A(&dylanweakfmt, arena, dylan_fmt_A_weak()), - "Format Create (weak)\n"); + die(dylan_fmt(&dylanfmt, arena), "Format Create"); + die(dylan_fmt_weak(&dylanweakfmt, arena), "Format Create (weak)"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, dylanfmt); die(mps_pool_create_k(&leafpool, arena, mps_class_lo(), args), diff --git a/code/awlutth.c b/code/awlutth.c index ac74335af6..a2f0a6f48a 100644 --- a/code/awlutth.c +++ b/code/awlutth.c @@ -254,10 +254,8 @@ static void setup(struct guff_s *guff) die(mps_root_create_thread(&stack, arena, thr, guff), "Root Create\n"); - die(mps_fmt_create_A(&dylanfmt, arena, dylan_fmt_A()), - "Format Create\n"); - die(mps_fmt_create_A(&dylanweakfmt, arena, dylan_fmt_A_weak()), - "Format Create (weak)\n"); + die(dylan_fmt(&dylanfmt, arena), "Format Create"); + die(dylan_fmt_weak(&dylanweakfmt, arena), "Format Create (weak)"); die(mps_pool_create(&leafpool, arena, mps_class_lo(), dylanfmt), "Leaf Pool Create\n"); die(mps_pool_create(&tablepool, arena, mps_class_awl(), dylanweakfmt, diff --git a/code/comm.gmk b/code/comm.gmk index a2cd68baab..e860ea2f69 100644 --- a/code/comm.gmk +++ b/code/comm.gmk @@ -162,9 +162,9 @@ MV2 = poolmv2.c MVFF = poolmvff.c TESTLIB = testlib.c TESTTHR = testthrix.c -FMTDY = fmtdy.c fmtno.c -FMTDYTST = fmtdy.c fmtno.c fmtdytst.c -FMTHETST = fmthe.c fmtdy.c fmtno.c fmtdytst.c +FMTDY = fmtdy.c +FMTDYTST = fmtdy.c fmtdytst.c +FMTHETST = fmthe.c fmtdy.c fmtdytst.c FMTSCM = fmtscheme.c PLINTH = mpsliban.c mpsioan.c MPMCOMMON = \ diff --git a/code/commpre.nmk b/code/commpre.nmk index 236e08ad2e..01087dc407 100644 --- a/code/commpre.nmk +++ b/code/commpre.nmk @@ -181,8 +181,8 @@ LO = [poollo] MVFF = [poolmvff] POOLN = [pooln] SNC = [poolsnc] -FMTDY = [fmtdy] [fmtno] -FMTTEST = [fmthe] [fmtdy] [fmtno] [fmtdytst] +FMTDY = [fmtdy] +FMTTEST = [fmthe] [fmtdy] [fmtdytst] FMTSCHEME = [fmtscheme] TESTLIB = [testlib] [getoptl] TESTTHR = [testthrw3] diff --git a/code/finalcv.c b/code/finalcv.c index 810e18020c..e11fea074b 100644 --- a/code/finalcv.c +++ b/code/finalcv.c @@ -116,7 +116,7 @@ static void test(mps_arena_t arena, mps_pool_class_t pool_class) printf("---- finalcv: pool class %s ----\n", ClassName(pool_class)); - die(mps_fmt_create_A(&fmt, arena, dylan_fmt_A()), "fmt_create\n"); + die(dylan_fmt(&fmt, arena), "fmt_create"); die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_CHAIN, chain); diff --git a/code/finaltest.c b/code/finaltest.c index d262f9a06a..3999c69252 100644 --- a/code/finaltest.c +++ b/code/finaltest.c @@ -239,7 +239,7 @@ static void test_pool(int mode, mps_arena_t arena, mps_chain_t chain, mps_pool_t pool; mps_root_t mps_root; - die(mps_fmt_create_A(&fmt, arena, dylan_fmt_A()), "fmt_create\n"); + die(dylan_fmt(&fmt, arena), "fmt_create"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, fmt); if (mode == ModePOLL) { diff --git a/code/fmtdy.c b/code/fmtdy.c index 6cfbca681f..ccb8e1e07c 100644 --- a/code/fmtdy.c +++ b/code/fmtdy.c @@ -52,7 +52,6 @@ #include "fmtdy.h" -#include "fmtno.h" #include "mps.h" #include #include @@ -516,8 +515,7 @@ mps_res_t dylan_scan1(mps_ss_t mps_ss, mps_addr_t *object_io) return MPS_RES_OK; } -static mps_res_t dylan_scan(mps_ss_t mps_ss, - mps_addr_t base, mps_addr_t limit) +mps_res_t dylan_scan(mps_ss_t mps_ss, mps_addr_t base, mps_addr_t limit) { mps_res_t res; mps_addr_t prev = base; @@ -534,21 +532,6 @@ static mps_res_t dylan_scan(mps_ss_t mps_ss, return MPS_RES_OK; } -/* dylan_class -- return pointer indicating class of object - * - * Return wrapper pointer, except for broken hearts or padding - */ - -static mps_addr_t dylan_class(mps_addr_t obj) -{ - mps_word_t first_word = ((mps_word_t *)obj)[0]; - - if((first_word & 3) != 0) /* broken heart or padding */ - return NULL; - else - return (mps_addr_t)first_word; -} - mps_res_t dylan_scan1_weak(mps_ss_t mps_ss, mps_addr_t *object_io) { mps_addr_t *assoc; @@ -695,20 +678,7 @@ mps_addr_t dylan_skip(mps_addr_t object) return (mps_addr_t)p; } -static void dylan_copy(mps_addr_t old, mps_addr_t new) -{ - char *base = (char *)old; - char *limit = (char *)dylan_skip(old); - size_t length; - assert(base < limit); - length = (size_t)(limit - base); - assert(dylan_wrapper_check(*(mps_word_t **)old)); - /* .improve.memcpy: Can do better here as we know that new and old - will be aligned (to MPS_PF_ALIGN) */ - (void)memcpy(new, old, length); -} - -static mps_addr_t dylan_isfwd(mps_addr_t object) +mps_addr_t dylan_isfwd(mps_addr_t object) { mps_word_t h, tag; @@ -720,7 +690,7 @@ static mps_addr_t dylan_isfwd(mps_addr_t object) return NULL; } -static void dylan_fwd(mps_addr_t old, mps_addr_t new) +void dylan_fwd(mps_addr_t old, mps_addr_t new) { mps_word_t *p; mps_addr_t limit; @@ -761,101 +731,39 @@ mps_bool_t dylan_ispad(mps_addr_t addr) } -/* The dylan format structures */ - -static struct mps_fmt_A_s dylan_fmt_A_s = -{ - ALIGN, - dylan_scan, - dylan_skip, - dylan_copy, - dylan_fwd, - dylan_isfwd, - dylan_pad -}; - -static struct mps_fmt_B_s dylan_fmt_B_s = -{ - ALIGN, - dylan_scan, - dylan_skip, - dylan_copy, - dylan_fwd, - dylan_isfwd, - dylan_pad, - dylan_class -}; - -/* Functions returning the dylan format structures */ - -mps_fmt_A_s *dylan_fmt_A(void) -{ - return &dylan_fmt_A_s; -} - -mps_fmt_B_s *dylan_fmt_B(void) -{ - return &dylan_fmt_B_s; -} - -/* Format variety-independent version that picks the right format - * variety and creates it. */ +/* Create Dylan object format. */ mps_res_t dylan_fmt(mps_fmt_t *mps_fmt_o, mps_arena_t arena) { - return mps_fmt_create_B(mps_fmt_o, arena, dylan_fmt_B()); -} - -/* The weak format structures */ - -static struct mps_fmt_A_s dylan_fmt_A_weak_s = -{ - ALIGN, - dylan_scan_weak, - dylan_skip, - no_copy, - no_fwd, - no_isfwd, - no_pad -}; - -static struct mps_fmt_B_s dylan_fmt_B_weak_s = -{ - ALIGN, - dylan_scan_weak, - dylan_skip, - no_copy, - no_fwd, - no_isfwd, - no_pad, - dylan_class -}; - -/* Functions returning the weak format structures */ - -mps_fmt_A_s *dylan_fmt_A_weak(void) -{ - return &dylan_fmt_A_weak_s; -} - - -mps_fmt_B_s *dylan_fmt_B_weak(void) -{ - return &dylan_fmt_B_weak_s; + mps_res_t res; + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_ALIGN, ALIGN); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, dylan_scan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, dylan_skip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, dylan_fwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, dylan_isfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, dylan_pad); + res = mps_fmt_create_k(mps_fmt_o, arena, args); + } MPS_ARGS_END(args); + return res; } -/* Format variety-independent version that picks the right format - * variety and creates it. */ +/* Create Dylan weak object format. */ mps_res_t dylan_fmt_weak(mps_fmt_t *mps_fmt_o, mps_arena_t arena) { - return mps_fmt_create_B(mps_fmt_o, arena, dylan_fmt_B_weak()); + mps_res_t res; + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_ALIGN, ALIGN); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, dylan_scan_weak); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, dylan_skip); + res = mps_fmt_create_k(mps_fmt_o, arena, args); + } MPS_ARGS_END(args); + return res; } - - /* C. COPYRIGHT AND LICENSE * * Copyright (C) 2001-2020 Ravenbrook Limited . diff --git a/code/fmtdy.h b/code/fmtdy.h index 0bf3dddda4..e5c4900520 100644 --- a/code/fmtdy.h +++ b/code/fmtdy.h @@ -16,15 +16,15 @@ extern mps_res_t dylan_scan1_weak(mps_ss_t, mps_addr_t *); /* Format */ extern mps_fmt_A_s *dylan_fmt_A(void); -extern mps_fmt_A_s *dylan_fmt_A_weak(void); -extern mps_fmt_B_s *dylan_fmt_B(void); -extern mps_fmt_B_s *dylan_fmt_B_weak(void); extern mps_res_t dylan_fmt(mps_fmt_t *, mps_arena_t); extern mps_res_t dylan_fmt_weak(mps_fmt_t *, mps_arena_t); extern mps_addr_t dylan_weak_dependent(mps_addr_t); +extern mps_res_t dylan_scan(mps_ss_t mps_ss, mps_addr_t base, mps_addr_t limit); extern mps_addr_t dylan_skip(mps_addr_t); +extern void dylan_fwd(mps_addr_t old, mps_addr_t new); +extern mps_addr_t dylan_isfwd(mps_addr_t object); extern void dylan_pad(mps_addr_t, size_t); extern mps_bool_t dylan_ispad(mps_addr_t); extern int dylan_wrapper_check(mps_word_t *); diff --git a/code/fmthe.c b/code/fmthe.c index 76f7239f69..b796c88ad8 100644 --- a/code/fmthe.c +++ b/code/fmthe.c @@ -9,7 +9,6 @@ */ #include "fmtdy.h" -#include "fmtno.h" #include "fmthe.h" #include "mps.h" @@ -24,8 +23,6 @@ #define AddHeader(p) ((mps_addr_t)((char*)(p) + headerSIZE)) -static mps_fmt_A_s *dylan_format; - static mps_res_t dylan_header_scan(mps_ss_t mps_ss, mps_addr_t base, mps_addr_t limit) { @@ -103,7 +100,7 @@ static mps_addr_t dylan_header_skip(mps_addr_t object) break; } - p = dylan_format->skip(object); + p = dylan_skip(object); p = AddHeader(p); return p; } @@ -119,7 +116,7 @@ static mps_addr_t dylan_header_isfwd(mps_addr_t object) assert(header == realHeader); - return dylan_format->isfwd(object); + return dylan_isfwd(object); } @@ -129,41 +126,22 @@ static void dylan_header_pad(mps_addr_t addr, size_t fullSize) } -/* HeaderFormat -- format descriptor for this format */ - -static struct mps_fmt_auto_header_s HeaderFormat = -{ - ALIGN, - dylan_header_scan, - dylan_header_skip, - NULL, /* later overwritten by dylan format forward method */ - dylan_header_isfwd, - dylan_header_pad, - (size_t)headerSIZE -}; - - -/* HeaderWeakFormat -- format descriptor for this format */ - -static struct mps_fmt_auto_header_s HeaderWeakFormat = -{ - ALIGN, - dylan_header_scan_weak, - dylan_header_skip, - no_fwd, - no_isfwd, - no_pad, - (size_t)headerSIZE -}; - - /* EnsureHeaderFormat -- create a format object for this format */ mps_res_t EnsureHeaderFormat(mps_fmt_t *mps_fmt_o, mps_arena_t arena) { - dylan_format = dylan_fmt_A(); - HeaderFormat.fwd = dylan_format->fwd; - return mps_fmt_create_auto_header(mps_fmt_o, arena, &HeaderFormat); + mps_res_t res; + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_ALIGN, ALIGN); + MPS_ARGS_ADD(args, MPS_KEY_FMT_HEADER_SIZE, headerSIZE); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, dylan_header_scan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, dylan_header_skip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, dylan_fwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, dylan_header_isfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, dylan_header_pad); + res = mps_fmt_create_k(mps_fmt_o, arena, args); + } MPS_ARGS_END(args); + return res; } @@ -171,8 +149,18 @@ mps_res_t EnsureHeaderFormat(mps_fmt_t *mps_fmt_o, mps_arena_t arena) mps_res_t EnsureHeaderWeakFormat(mps_fmt_t *mps_fmt_o, mps_arena_t arena) { - dylan_format = dylan_fmt_A(); - return mps_fmt_create_auto_header(mps_fmt_o, arena, &HeaderWeakFormat); + mps_res_t res; + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_ALIGN, ALIGN); + MPS_ARGS_ADD(args, MPS_KEY_FMT_HEADER_SIZE, headerSIZE); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, dylan_header_scan_weak); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, dylan_header_skip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, dylan_fwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, dylan_header_isfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, dylan_header_pad); + res = mps_fmt_create_k(mps_fmt_o, arena, args); + } MPS_ARGS_END(args); + return res; } diff --git a/code/fmtno.c b/code/fmtno.c deleted file mode 100644 index 4854e55ed8..0000000000 --- a/code/fmtno.c +++ /dev/null @@ -1,149 +0,0 @@ -/* fmtno.c: NULL OBJECT FORMAT IMPLEMENTATION - * - * $Id$ - * Copyright (c) 2001-2020 Ravenbrook Limited. See end of file for license. - * - * .readership: MPS developers - */ - - -#include "fmtno.h" -#include "mps.h" -#include -#include -#include - - -#define notreached() assert(0) -#define unused(param) ((void)param) - - -#define ALIGN sizeof(mps_word_t) - -/* Functions for the null format. */ - -mps_res_t no_scan(mps_ss_t mps_ss, - mps_addr_t base, - mps_addr_t limit) -{ - unused(mps_ss); unused(base); unused(limit); - notreached(); - return 0; -} - -mps_addr_t no_skip(mps_addr_t object) -{ - unused(object); - notreached(); - return 0; -} - -void no_copy(mps_addr_t old, - mps_addr_t new) -{ - unused(old); unused(new); - notreached(); -} - -void no_fwd(mps_addr_t old, - mps_addr_t new) -{ - unused(old); unused(new); - notreached(); -} - -mps_addr_t no_isfwd(mps_addr_t object) -{ - unused(object); - notreached(); - return 0; -} - -void no_pad(mps_addr_t addr, - size_t size) -{ - unused(addr); unused(size); - notreached(); -} - -mps_addr_t no_class(mps_addr_t obj) -{ - unused(obj); - notreached(); - return 0; -} - -/* The null format structures */ - -static struct mps_fmt_A_s no_fmt_A_s = -{ - ALIGN, - no_scan, - no_skip, - no_copy, - no_fwd, - no_isfwd, - no_pad -}; - -static struct mps_fmt_B_s no_fmt_B_s = -{ - ALIGN, - no_scan, - no_skip, - no_copy, - no_fwd, - no_isfwd, - no_pad, - no_class -}; - -/* Functions returning the null format structures. */ - -mps_fmt_A_s *no_fmt_A(void) -{ - return &no_fmt_A_s; -} - -mps_fmt_B_s *no_fmt_B(void) -{ - return &no_fmt_B_s; -} - -/* Format variety-independent version that picks the right format - * variety and creates it. */ - -mps_res_t no_fmt(mps_fmt_t *mps_fmt_o, mps_arena_t arena) -{ - return mps_fmt_create_B(mps_fmt_o, arena, no_fmt_B()); -} - - -/* C. COPYRIGHT AND LICENSE - * - * Copyright (C) 2001-2020 Ravenbrook Limited . - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ diff --git a/code/fmtno.h b/code/fmtno.h deleted file mode 100644 index c7afc1de8d..0000000000 --- a/code/fmtno.h +++ /dev/null @@ -1,54 +0,0 @@ -/* fmtdy.h: NULL OBJECT FORMAT - * - * $Id$ - * Copyright (c) 2001-2020 Ravenbrook Limited. See end of file for license. - */ - -#ifndef fmtno_h -#define fmtno_h - -#include "mps.h" - -extern mps_res_t no_scan(mps_ss_t, mps_addr_t, mps_addr_t); -extern mps_addr_t no_skip(mps_addr_t); -extern void no_copy(mps_addr_t, mps_addr_t); -extern void no_fwd(mps_addr_t, mps_addr_t); -extern mps_addr_t no_isfwd(mps_addr_t); -extern void no_pad(mps_addr_t, size_t); -extern mps_addr_t no_class(mps_addr_t); - -extern mps_fmt_A_s *no_fmt_A(void); -extern mps_fmt_B_s *no_fmt_B(void); -extern mps_res_t no_fmt(mps_fmt_t *, mps_arena_t); - -#endif /* fmtno_h */ - - -/* C. COPYRIGHT AND LICENSE - * - * Copyright (C) 2001-2020 Ravenbrook Limited . - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ diff --git a/code/locv.c b/code/locv.c index 9a0627c1b2..cc10518967 100644 --- a/code/locv.c +++ b/code/locv.c @@ -22,23 +22,10 @@ static mps_res_t scan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t skip(mps_addr_t object); static void move(mps_addr_t object, mps_addr_t to); static mps_addr_t isMoved(mps_addr_t object); -static void copy(mps_addr_t old, mps_addr_t new); -static void pad(mps_addr_t base, size_t size); static void stepper(mps_addr_t addr, mps_fmt_t fmt, mps_pool_t pool, void *p, size_t s); -static mps_fmt_A_s locv_fmt = - { - (mps_align_t)0, /* .fmt.align.delayed: to be filled in */ - scan, - skip, - copy, - move, - isMoved, - pad - }; - static mps_addr_t roots[4]; @@ -70,8 +57,6 @@ int main(int argc, char *argv[]) testlib_init(argc, argv); - locv_fmt.align = sizeof(void *); /* .fmt.align.delayed */ - die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE), "mps_arena_create"); die(mps_root_create_table(&root, arena, mps_rank_exact(), @@ -79,7 +64,14 @@ int main(int argc, char *argv[]) roots, (sizeof(roots)/sizeof(*roots))), "RootCreate"); - die(mps_fmt_create_A(&format, arena, &locv_fmt), "FormatCreate"); + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_ALIGN, sizeof(void *)); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, scan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, skip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, move); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, isMoved); + die(mps_fmt_create_k(&format, arena, args), "FormatCreate"); + } MPS_ARGS_END(args); die(mps_pool_create(&pool, arena, mps_class_lo(), format), "LOCreate"); @@ -161,21 +153,6 @@ static mps_addr_t isMoved(mps_addr_t object) } -static void copy(mps_addr_t old, mps_addr_t new) -{ - testlib_unused(old); - testlib_unused(new); - cdie(0, "copy"); -} - - -static void pad(mps_addr_t base, size_t size) -{ - testlib_unused(base); - testlib_unused(size); - cdie(0, "pad"); -} - static void stepper(mps_addr_t addr, mps_fmt_t fmt, mps_pool_t pool, void *p, size_t s) { diff --git a/code/mps.xcodeproj/project.pbxproj b/code/mps.xcodeproj/project.pbxproj index 42f60ccb58..10a1ff9897 100644 --- a/code/mps.xcodeproj/project.pbxproj +++ b/code/mps.xcodeproj/project.pbxproj @@ -154,18 +154,15 @@ 2291A5B1175CAB2F001D4920 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 2291A5B2175CAB2F001D4920 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; 2291A5B3175CAB2F001D4920 /* fmthe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAE4156BE6D500753214 /* fmthe.c */; }; - 2291A5B4175CAB2F001D4920 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 2291A5B5175CAB2F001D4920 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 2291A5B7175CAB2F001D4920 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 2291A5BE175CAB4E001D4920 /* awlutth.c in Sources */ = {isa = PBXBuildFile; fileRef = 2291A5A9175CAA9B001D4920 /* awlutth.c */; }; 2291A5C5175CAFCA001D4920 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 2291A5C6175CAFCA001D4920 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; - 2291A5C7175CAFCA001D4920 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 2291A5C8175CAFCA001D4920 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 2291A5CB175CAFCA001D4920 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 2291A5D8175CB05F001D4920 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 2291A5D9175CB05F001D4920 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; - 2291A5DA175CB05F001D4920 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 2291A5DB175CB05F001D4920 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 2291A5DD175CB05F001D4920 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 2291A5ED175CB5E2001D4920 /* landtest.c in Sources */ = {isa = PBXBuildFile; fileRef = 2291A5E9175CB4EC001D4920 /* landtest.c */; }; @@ -184,7 +181,6 @@ 22FA176916E8D6FC0098B23F /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 22FA176A16E8D6FC0098B23F /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; 22FA176B16E8D6FC0098B23F /* fmthe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAE4156BE6D500753214 /* fmthe.c */; }; - 22FA176C16E8D6FC0098B23F /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 22FA176D16E8D6FC0098B23F /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 22FA176F16E8D6FC0098B23F /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 22FA177716E8D7A80098B23F /* amcssth.c in Sources */ = {isa = PBXBuildFile; fileRef = 22FA177616E8D7A80098B23F /* amcssth.c */; }; @@ -206,7 +202,6 @@ 3104AFEA156D3697000A585A /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 3104AFEC156D36A5000A585A /* amcsshe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3104AFEB156D36A5000A585A /* amcsshe.c */; }; 3104AFED156D374A000A585A /* fmthe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAE4156BE6D500753214 /* fmthe.c */; }; - 3104AFEE156D374D000A585A /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 3104AFEF156D3753000A585A /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 3104AFF0156D3756000A585A /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; 3104B016156D390B000A585A /* amsss.c in Sources */ = {isa = PBXBuildFile; fileRef = 3104B015156D390B000A585A /* amsss.c */; }; @@ -214,18 +209,15 @@ 3104B018156D3953000A585A /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 3104B019156D3960000A585A /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 3104B01A156D396E000A585A /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; - 3104B01B156D3973000A585A /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 3104B02E156D39E2000A585A /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 3104B031156D39FD000A585A /* fmthe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAE4156BE6D500753214 /* fmthe.c */; }; 3104B032156D3A00000A585A /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; 3104B033156D3A05000A585A /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 3104B034156D3A2C000A585A /* amssshe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3104B02F156D39F2000A585A /* amssshe.c */; }; 3104B035156D3A39000A585A /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; - 3104B036156D3A49000A585A /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 3104B04E156D3AFE000A585A /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 3104B04F156D3B09000A585A /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 3104B050156D3B09000A585A /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; - 3104B051156D3B09000A585A /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 31108A3E1C6B90E900E728EA /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 31108A411C6B90E900E728EA /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 31108A481C6B911B00E728EA /* tagtest.c in Sources */ = {isa = PBXBuildFile; fileRef = 31108A391C6B90D600E728EA /* tagtest.c */; }; @@ -240,10 +232,8 @@ 3114A5CE156E9369001E0AA3 /* finalcv.c in Sources */ = {isa = PBXBuildFile; fileRef = 3114A5CD156E9369001E0AA3 /* finalcv.c */; }; 3114A5CF156E9381001E0AA3 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 3114A5D0156E9381001E0AA3 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; - 3114A5D1156E9381001E0AA3 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 3114A5E0156E93AE001E0AA3 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 3114A5E1156E93AE001E0AA3 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; - 3114A5E2156E93AE001E0AA3 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 3114A5E3156E93AE001E0AA3 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 3114A5E4156E93AE001E0AA3 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 3114A5E6156E93B9001E0AA3 /* finaltest.c in Sources */ = {isa = PBXBuildFile; fileRef = 3114A5E5156E93B9001E0AA3 /* finaltest.c */; }; @@ -273,7 +263,6 @@ 3114A6BE156E9771001E0AA3 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 3114A6BF156E97B8001E0AA3 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 3114A6C0156E97B8001E0AA3 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; - 3114A6C1156E97B8001E0AA3 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 3114A6D1156E9829001E0AA3 /* eventcnv.c in Sources */ = {isa = PBXBuildFile; fileRef = 3114A6D0156E9829001E0AA3 /* eventcnv.c */; }; 3114A6D7156E9923001E0AA3 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 3114A6DD156E9A0F001E0AA3 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; @@ -284,19 +273,16 @@ 3124CAC5156BE41700753214 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 3124CAC8156BE48D00753214 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 3124CAC9156BE48D00753214 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; - 3124CACD156BE4C200753214 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 3124CADF156BE65900753214 /* mpsicv.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CADE156BE65900753214 /* mpsicv.c */; }; 3124CAE0156BE66B00753214 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 3124CAE1156BE67000753214 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 3124CAE2156BE68E00753214 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; - 3124CAE3156BE69B00753214 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 3124CAE5156BE6D500753214 /* fmthe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAE4156BE6D500753214 /* fmthe.c */; }; 3124CAE6156BE6F700753214 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; 3124CAF6156BE81100753214 /* amcss.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAF5156BE81100753214 /* amcss.c */; }; 3124CAF7156BE82000753214 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 3124CAF8156BE82000753214 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; 3124CAF9156BE82000753214 /* fmthe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAE4156BE6D500753214 /* fmthe.c */; }; - 3124CAFA156BE82000753214 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 3124CAFB156BE82000753214 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 3124CAFC156BE82900753214 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 3150AE53156ABA2500A6E22A /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; @@ -309,7 +295,6 @@ 31D6001A156D3CDC00337B26 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 31D6001B156D3CDC00337B26 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; 31D6001C156D3CDC00337B26 /* fmthe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAE4156BE6D500753214 /* fmthe.c */; }; - 31D6001D156D3CDC00337B26 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 31D6001E156D3CDF00337B26 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 31D60035156D3DF300337B26 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 31D60038156D3E3000337B26 /* lockcov.c in Sources */ = {isa = PBXBuildFile; fileRef = 31D60036156D3E0200337B26 /* lockcov.c */; }; @@ -321,20 +306,17 @@ 31D60060156D3F5000337B26 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 31D60069156D3F7200337B26 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 31D6006A156D3F7200337B26 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; - 31D6006B156D3F7200337B26 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 31D6006C156D3F7200337B26 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 31D6007D156D3FCF00337B26 /* zmess.c in Sources */ = {isa = PBXBuildFile; fileRef = 31D6007B156D3FCC00337B26 /* zmess.c */; }; 31D6007E156D3FD700337B26 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 31D6007F156D3FD700337B26 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; 31D60080156D3FD700337B26 /* fmthe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAE4156BE6D500753214 /* fmthe.c */; }; - 31D60081156D3FD700337B26 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 31D60082156D3FD700337B26 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 31D60083156D3FDB00337B26 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 31D6009A156D404000337B26 /* steptest.c in Sources */ = {isa = PBXBuildFile; fileRef = 31D60098156D403C00337B26 /* steptest.c */; }; 31D6009B156D404400337B26 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; }; 31D6009E156D406400337B26 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; 31D6009F156D406400337B26 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; - 31D600A0156D406400337B26 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; 31D600A1156D406400337B26 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; 31EEAC75156AB58E00714D05 /* mpmss.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC74156AB58E00714D05 /* mpmss.c */; }; 31EEAC9F156AB73400714D05 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; }; @@ -345,7 +327,6 @@ 6313D47418A4029200EB03EF /* gcbench.c in Sources */ = {isa = PBXBuildFile; fileRef = 6313D46618A3FDC900EB03EF /* gcbench.c */; }; 6313D47518A40C6300EB03EF /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; }; 6313D47618A40C7B00EB03EF /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; }; - 6313D47718A40D0400EB03EF /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -1540,7 +1521,6 @@ 22FACED2188807FF000FDBC1 /* fmtdy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fmtdy.h; sourceTree = ""; }; 22FACED3188807FF000FDBC1 /* fmtdytst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fmtdytst.h; sourceTree = ""; }; 22FACED4188807FF000FDBC1 /* fmthe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fmthe.h; sourceTree = ""; }; - 22FACED5188807FF000FDBC1 /* fmtno.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fmtno.h; sourceTree = ""; }; 22FACED6188807FF000FDBC1 /* fmtscheme.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fmtscheme.c; sourceTree = ""; }; 22FACED7188807FF000FDBC1 /* fmtscheme.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fmtscheme.h; sourceTree = ""; }; 22FACEDA1888088A000FDBC1 /* ss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ss.c; sourceTree = ""; }; @@ -1701,7 +1681,6 @@ 3124CAC6156BE48D00753214 /* fmtdy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fmtdy.c; sourceTree = ""; }; 3124CAC7156BE48D00753214 /* fmtdytst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fmtdytst.c; sourceTree = ""; }; 3124CACA156BE4A300753214 /* poollo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = poollo.c; sourceTree = ""; }; - 3124CACC156BE4C200753214 /* fmtno.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fmtno.c; sourceTree = ""; }; 3124CACE156BE4CF00753214 /* poolawl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = poolawl.c; sourceTree = ""; }; 3124CAD4156BE64A00753214 /* mpsicv */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mpsicv; sourceTree = BUILT_PRODUCTS_DIR; }; 3124CADE156BE65900753214 /* mpsicv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mpsicv.c; sourceTree = ""; }; @@ -2362,8 +2341,6 @@ 22FACED3188807FF000FDBC1 /* fmtdytst.h */, 3124CAE4156BE6D500753214 /* fmthe.c */, 22FACED4188807FF000FDBC1 /* fmthe.h */, - 3124CACC156BE4C200753214 /* fmtno.c */, - 22FACED5188807FF000FDBC1 /* fmtno.h */, 22FACED6188807FF000FDBC1 /* fmtscheme.c */, 22FACED7188807FF000FDBC1 /* fmtscheme.h */, 22EA3F3720D2B0730065F5B6 /* forktest.c */, @@ -3747,7 +3724,6 @@ 2291A5B1175CAB2F001D4920 /* fmtdy.c in Sources */, 2291A5B2175CAB2F001D4920 /* fmtdytst.c in Sources */, 2291A5B3175CAB2F001D4920 /* fmthe.c in Sources */, - 2291A5B4175CAB2F001D4920 /* fmtno.c in Sources */, 2291A5B5175CAB2F001D4920 /* testlib.c in Sources */, 22561A9918F4266600372C66 /* testthrix.c in Sources */, ); @@ -3798,7 +3774,6 @@ 22FA176916E8D6FC0098B23F /* fmtdy.c in Sources */, 22FA176A16E8D6FC0098B23F /* fmtdytst.c in Sources */, 22FA176B16E8D6FC0098B23F /* fmthe.c in Sources */, - 22FA176C16E8D6FC0098B23F /* fmtno.c in Sources */, 22FA176D16E8D6FC0098B23F /* testlib.c in Sources */, 22561A9818F4265D00372C66 /* testthrix.c in Sources */, ); @@ -3855,7 +3830,6 @@ 3104AFEA156D3697000A585A /* testlib.c in Sources */, 3104AFEC156D36A5000A585A /* amcsshe.c in Sources */, 3104AFED156D374A000A585A /* fmthe.c in Sources */, - 3104AFEE156D374D000A585A /* fmtno.c in Sources */, 3104AFEF156D3753000A585A /* fmtdy.c in Sources */, 3104AFF0156D3756000A585A /* fmtdytst.c in Sources */, ); @@ -3869,7 +3843,6 @@ 3104B017156D3915000A585A /* testlib.c in Sources */, 3104B019156D3960000A585A /* fmtdy.c in Sources */, 3104B01A156D396E000A585A /* fmtdytst.c in Sources */, - 3104B01B156D3973000A585A /* fmtno.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3882,7 +3855,6 @@ 3104B033156D3A05000A585A /* testlib.c in Sources */, 3104B034156D3A2C000A585A /* amssshe.c in Sources */, 3104B035156D3A39000A585A /* fmtdy.c in Sources */, - 3104B036156D3A49000A585A /* fmtno.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3893,7 +3865,6 @@ 3104B04E156D3AFE000A585A /* testlib.c in Sources */, 3104B04F156D3B09000A585A /* fmtdy.c in Sources */, 3104B050156D3B09000A585A /* fmtdytst.c in Sources */, - 3104B051156D3B09000A585A /* fmtno.c in Sources */, 31D60007156D3C6200337B26 /* segsmss.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -3933,7 +3904,6 @@ 3114A5CE156E9369001E0AA3 /* finalcv.c in Sources */, 3114A5CF156E9381001E0AA3 /* fmtdy.c in Sources */, 3114A5D0156E9381001E0AA3 /* fmtdytst.c in Sources */, - 3114A5D1156E9381001E0AA3 /* fmtno.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3943,7 +3913,6 @@ files = ( 3114A5E0156E93AE001E0AA3 /* fmtdy.c in Sources */, 3114A5E1156E93AE001E0AA3 /* fmtdytst.c in Sources */, - 3114A5E2156E93AE001E0AA3 /* fmtno.c in Sources */, 3114A5E3156E93AE001E0AA3 /* testlib.c in Sources */, 3114A5E6156E93B9001E0AA3 /* finaltest.c in Sources */, ); @@ -4029,7 +3998,6 @@ 3114A6BD156E9771001E0AA3 /* testlib.c in Sources */, 3114A6BF156E97B8001E0AA3 /* fmtdy.c in Sources */, 3114A6C0156E97B8001E0AA3 /* fmtdytst.c in Sources */, - 3114A6C1156E97B8001E0AA3 /* fmtno.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4049,7 +4017,6 @@ 3124CAC5156BE41700753214 /* testlib.c in Sources */, 3124CAC8156BE48D00753214 /* fmtdy.c in Sources */, 3124CAC9156BE48D00753214 /* fmtdytst.c in Sources */, - 3124CACD156BE4C200753214 /* fmtno.c in Sources */, 311A44F81C8B1EBD00852E2B /* testthrix.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -4061,7 +4028,6 @@ 3124CADF156BE65900753214 /* mpsicv.c in Sources */, 3124CAE0156BE66B00753214 /* testlib.c in Sources */, 3124CAE2156BE68E00753214 /* fmtdy.c in Sources */, - 3124CAE3156BE69B00753214 /* fmtno.c in Sources */, 3124CAE5156BE6D500753214 /* fmthe.c in Sources */, 3124CAE6156BE6F700753214 /* fmtdytst.c in Sources */, ); @@ -4075,7 +4041,6 @@ 3124CAF7156BE82000753214 /* fmtdy.c in Sources */, 3124CAF8156BE82000753214 /* fmtdytst.c in Sources */, 3124CAF9156BE82000753214 /* fmthe.c in Sources */, - 3124CAFA156BE82000753214 /* fmtno.c in Sources */, 3124CAFB156BE82000753214 /* testlib.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -4099,7 +4064,6 @@ 31D6001A156D3CDC00337B26 /* fmtdy.c in Sources */, 31D6001B156D3CDC00337B26 /* fmtdytst.c in Sources */, 31D6001C156D3CDC00337B26 /* fmthe.c in Sources */, - 31D6001D156D3CDC00337B26 /* fmtno.c in Sources */, 31D6001E156D3CDF00337B26 /* testlib.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -4130,7 +4094,6 @@ 31D6005F156D3F4A00337B26 /* zcoll.c in Sources */, 31D60069156D3F7200337B26 /* fmtdy.c in Sources */, 31D6006A156D3F7200337B26 /* fmtdytst.c in Sources */, - 31D6006B156D3F7200337B26 /* fmtno.c in Sources */, 31D6006C156D3F7200337B26 /* testlib.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -4143,7 +4106,6 @@ 31D6007E156D3FD700337B26 /* fmtdy.c in Sources */, 31D6007F156D3FD700337B26 /* fmtdytst.c in Sources */, 31D60080156D3FD700337B26 /* fmthe.c in Sources */, - 31D60081156D3FD700337B26 /* fmtno.c in Sources */, 31D60082156D3FD700337B26 /* testlib.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -4155,7 +4117,6 @@ 31D6009A156D404000337B26 /* steptest.c in Sources */, 31D6009E156D406400337B26 /* fmtdy.c in Sources */, 31D6009F156D406400337B26 /* fmtdytst.c in Sources */, - 31D600A0156D406400337B26 /* fmtno.c in Sources */, 31D600A1156D406400337B26 /* testlib.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -4190,7 +4151,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6313D47718A40D0400EB03EF /* fmtno.c in Sources */, 6313D46918A400B200EB03EF /* testlib.c in Sources */, 6313D47418A4029200EB03EF /* gcbench.c in Sources */, 6313D47518A40C6300EB03EF /* fmtdytst.c in Sources */, diff --git a/code/mpsicv.c b/code/mpsicv.c index 7c5a04ac79..227b9df9f8 100644 --- a/code/mpsicv.c +++ b/code/mpsicv.c @@ -447,7 +447,7 @@ static void test(mps_arena_t arena) die(mps_root_create_fmt(&fmtRoot, arena, mps_rank_exact(), (mps_rm_t)0, - dylan_fmt_A()->scan, + dylan_scan, alloced_obj, (mps_addr_t)(((char*)alloced_obj)+asize)), "root_create_fmt"); diff --git a/code/qs.c b/code/qs.c index aebe9a2c82..543b4a02af 100644 --- a/code/qs.c +++ b/code/qs.c @@ -47,18 +47,8 @@ static mps_res_t scan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t skip(mps_addr_t object); static void move(mps_addr_t object, mps_addr_t to); static mps_addr_t isMoved(mps_addr_t object); -static void copy(mps_addr_t object, mps_addr_t to); static void pad(mps_addr_t base, size_t size); -static struct mps_fmt_A_s fmt_A_s = - { - (mps_align_t)4, - scan, skip, copy, - move, isMoved, - pad - }; - - /* Tags used by object format */ enum {QSInt, QSRef, QSEvac, QSPadOne, QSPadMany}; @@ -335,7 +325,15 @@ static void test(void) die(mps_pool_create_k(&mpool, arena, mps_class_mvff(), mps_args_none), "pool create"); - die(mps_fmt_create_A(&format, arena, &fmt_A_s), "FormatCreate"); + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_ALIGN, 4); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, scan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, skip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, move); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, isMoved); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, pad); + die(mps_fmt_create_k(&format, arena, args), "FormatCreate"); + } MPS_ARGS_END(args); die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mps_pool_create(&pool, arena, mps_class_amc(), format, chain), "AMCCreate"); @@ -502,17 +500,6 @@ static mps_addr_t isMoved(mps_addr_t object) } -static void copy(mps_addr_t object, mps_addr_t to) -{ - QSCell cells, celld; - - cells = (QSCell)object; - celld = (QSCell)to; - - *celld = *cells; -} - - int main(int argc, char *argv[]) { testlib_init(argc, argv); diff --git a/code/segsmss.c b/code/segsmss.c index cb8aaca7d2..5e74f46b22 100644 --- a/code/segsmss.c +++ b/code/segsmss.c @@ -735,7 +735,7 @@ static void test(mps_arena_t arena) mps_chain_t chain; static mps_gen_param_s genParam = {1024, 0.2}; - die(mps_fmt_create_A(&format, arena, dylan_fmt_A()), "fmt_create"); + die(dylan_fmt(&format, arena), "fmt_create"); die(mps_chain_create(&chain, arena, 1, &genParam), "chain_create"); MPS_ARGS_BEGIN(args) { diff --git a/code/zcoll.c b/code/zcoll.c index f3d472e761..d42e0e3f3f 100644 --- a/code/zcoll.c +++ b/code/zcoll.c @@ -730,7 +730,7 @@ static void testscriptB(testDataStruct *testData) thr = testData->thr; script = testData->script; - die(mps_fmt_create_A(&fmt, arena, dylan_fmt_A()), "fmt_create"); + die(dylan_fmt(&fmt, arena), "fmt_create"); die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mps_pool_create(&amc, arena, mps_class_amc(), fmt, chain), "pool_create amc"); diff --git a/code/zmess.c b/code/zmess.c index e0431f63c3..213baccf8c 100644 --- a/code/zmess.c +++ b/code/zmess.c @@ -308,7 +308,7 @@ static void testscriptB(testDataStruct *testData) thr = testData->thr; script = testData->script; - die(mps_fmt_create_A(&fmt, arena, dylan_fmt_A()), "fmt_create"); + die(dylan_fmt(&fmt, arena), "fmt_create"); die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mps_pool_create(&amc, arena, mps_class_amc(), fmt, chain), "pool_create amc"); diff --git a/test/argerr/10.c b/test/argerr/10.c index 09d4ecce97..0fd212286d 100644 --- a/test/argerr/10.c +++ b/test/argerr/10.c @@ -35,9 +35,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/11.c b/test/argerr/11.c index af63885d51..d463b706c8 100644 --- a/test/argerr/11.c +++ b/test/argerr/11.c @@ -32,9 +32,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/12.c b/test/argerr/12.c index 17351f13cc..f27ba400e2 100644 --- a/test/argerr/12.c +++ b/test/argerr/12.c @@ -36,9 +36,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/13.c b/test/argerr/13.c index 80c3a3a96d..4a8f627604 100644 --- a/test/argerr/13.c +++ b/test/argerr/13.c @@ -34,9 +34,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/14.c b/test/argerr/14.c index fa3e1bb704..d076f04f9f 100644 --- a/test/argerr/14.c +++ b/test/argerr/14.c @@ -30,9 +30,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/146.c b/test/argerr/146.c index 0941d8079a..c191236540 100644 --- a/test/argerr/146.c +++ b/test/argerr/146.c @@ -124,20 +124,8 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtA = -{ - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; - /* in the following, size is the number of refs you want the allocated object to have */ @@ -264,30 +252,6 @@ static mps_addr_t myskip(mps_addr_t object) } } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; - mycell *toj = to; - - asserts(boj->tag = MCdata, "copy: non-data object"); - - INCCOUNT(COPY_COUNT); - commentif(formatcomments, "copy: %p -> %p\n", object, to); - -/* this line would be bad, because the objects might overlap, - and then C doesn't guarantee to do the right thing! - - *toj = *boj; -*/ - - memmove(to, object, boj->data.size); - if (!freeze) - { - toj->data.copycount = (toj->data.copycount)+1; - if (toj->data.copycount > maxcopy) maxcopy = toj->data.copycount; - } -} - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ @@ -393,9 +357,15 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + die(mps_fmt_create_k(&format, arena, args), "create format"); + } MPS_ARGS_END(args); formatcomments = 0; diff --git a/test/argerr/147.c b/test/argerr/147.c index a3c49da358..2098aa8657 100644 --- a/test/argerr/147.c +++ b/test/argerr/147.c @@ -124,20 +124,8 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtA = -{ - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; - /* in the following, size is the number of refs you want the allocated object to have */ @@ -265,30 +253,6 @@ static mps_addr_t myskip(mps_addr_t object) } } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; - mycell *toj = to; - - asserts(boj->tag = MCdata, "copy: non-data object"); - - INCCOUNT(COPY_COUNT); - commentif(formatcomments, "copy: %p -> %p\n", object, to); - -/* this line would be bad, because the objects might overlap, - and then C doesn't guarantee to do the right thing! - - *toj = *boj; -*/ - - memmove(to, object, boj->data.size); - if (!freeze) - { - toj->data.copycount = (toj->data.copycount)+1; - if (toj->data.copycount > maxcopy) maxcopy = toj->data.copycount; - } -} - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ @@ -393,9 +357,16 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + + + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + die(mps_fmt_create_k(&format, arena, args), "create format"); + } MPS_ARGS_END(args); formatcomments = 0; diff --git a/test/argerr/148.c b/test/argerr/148.c index 8f9f624900..4da18a0f0f 100644 --- a/test/argerr/148.c +++ b/test/argerr/148.c @@ -124,20 +124,8 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtA = -{ - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; - /* in the following, size is the number of refs you want the allocated object to have */ @@ -265,30 +253,6 @@ static mps_addr_t myskip(mps_addr_t object) } } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; - mycell *toj = to; - - asserts(boj->tag = MCdata, "copy: non-data object"); - - INCCOUNT(COPY_COUNT); - commentif(formatcomments, "copy: %p -> %p\n", object, to); - -/* this line would be bad, because the objects might overlap, - and then C doesn't guarantee to do the right thing! - - *toj = *boj; -*/ - - memmove(to, object, boj->data.size); - if (!freeze) - { - toj->data.copycount = (toj->data.copycount)+1; - if (toj->data.copycount > maxcopy) maxcopy = toj->data.copycount; - } -} - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ @@ -393,9 +357,15 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + die(mps_fmt_create_k(&format, arena, args), "create format"); + } MPS_ARGS_END(args); formatcomments = 0; diff --git a/test/argerr/149.c b/test/argerr/149.c index 2f0f2c451a..f44eee7759 100644 --- a/test/argerr/149.c +++ b/test/argerr/149.c @@ -122,20 +122,8 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtA = -{ - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; - /* in the following, size is the number of refs you want the allocated object to have */ @@ -297,30 +285,6 @@ static mps_addr_t myskip(mps_addr_t object) } } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; - mycell *toj = to; - - asserts(boj->tag = MCdata, "copy: non-data object"); - - INCCOUNT(COPY_COUNT); - commentif(formatcomments, "copy: %p -> %p\n", object, to); - -/* this line would be bad, because the objects might overlap, - and then C doesn't guarantee to do the right thing! - - *toj = *boj; -*/ - - memmove(to, object, boj->data.size); - if (!freeze) - { - toj->data.copycount = (toj->data.copycount)+1; - if (toj->data.copycount > maxcopy) maxcopy = toj->data.copycount; - } -} - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ @@ -455,9 +419,15 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + die(mps_fmt_create_k(&format, arena, args), "create format"); + } MPS_ARGS_END(args); formatcomments = 0; diff --git a/test/argerr/15.c b/test/argerr/15.c index 3a1ae94b8b..4044783952 100644 --- a/test/argerr/15.c +++ b/test/argerr/15.c @@ -28,9 +28,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/150.c b/test/argerr/150.c index 819ea57403..127e6191b2 100644 --- a/test/argerr/150.c +++ b/test/argerr/150.c @@ -122,20 +122,8 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtA = -{ - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; - /* in the following, size is the number of refs you want the allocated object to have */ @@ -296,30 +284,6 @@ static mps_addr_t myskip(mps_addr_t object) } } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; - mycell *toj = to; - - asserts(boj->tag = MCdata, "copy: non-data object"); - - INCCOUNT(COPY_COUNT); - commentif(formatcomments, "copy: %p -> %p\n", object, to); - -/* this line would be bad, because the objects might overlap, - and then C doesn't guarantee to do the right thing! - - *toj = *boj; -*/ - - memmove(to, object, boj->data.size); - if (!freeze) - { - toj->data.copycount = (toj->data.copycount)+1; - if (toj->data.copycount > maxcopy) maxcopy = toj->data.copycount; - } -} - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ @@ -454,9 +418,15 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + die(mps_fmt_create_k(&format, arena, args), "create format"); + } MPS_ARGS_END(args); formatcomments = 0; diff --git a/test/argerr/151.c b/test/argerr/151.c index cedbb9eb9b..3a1b83fee9 100644 --- a/test/argerr/151.c +++ b/test/argerr/151.c @@ -122,20 +122,8 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtA = -{ - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; - /* in the following, size is the number of refs you want the allocated object to have */ @@ -297,30 +285,6 @@ static mps_addr_t myskip(mps_addr_t object) } } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; - mycell *toj = to; - - asserts(boj->tag = MCdata, "copy: non-data object"); - - INCCOUNT(COPY_COUNT); - commentif(formatcomments, "copy: %p -> %p\n", object, to); - -/* this line would be bad, because the objects might overlap, - and then C doesn't guarantee to do the right thing! - - *toj = *boj; -*/ - - memmove(to, object, boj->data.size); - if (!freeze) - { - toj->data.copycount = (toj->data.copycount)+1; - if (toj->data.copycount > maxcopy) maxcopy = toj->data.copycount; - } -} - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ @@ -455,9 +419,15 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + die(mps_fmt_create_k(&format, arena, args), "create format"); + } MPS_ARGS_END(args); formatcomments = 0; diff --git a/test/argerr/154.c b/test/argerr/154.c index 2e53a87eef..5376908709 100644 --- a/test/argerr/154.c +++ b/test/argerr/154.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/16.c b/test/argerr/16.c index e7f6e738d8..4f6d1ffac3 100644 --- a/test/argerr/16.c +++ b/test/argerr/16.c @@ -36,9 +36,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/17.c b/test/argerr/17.c index e52d95664e..0270350366 100644 --- a/test/argerr/17.c +++ b/test/argerr/17.c @@ -33,9 +33,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/18.c b/test/argerr/18.c index e52ae02275..90e6b32d91 100644 --- a/test/argerr/18.c +++ b/test/argerr/18.c @@ -36,9 +36,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/19.c b/test/argerr/19.c index ecc903abb7..e2b5bf7fd3 100644 --- a/test/argerr/19.c +++ b/test/argerr/19.c @@ -33,9 +33,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/4.c b/test/argerr/4.c index a1b915cdfc..a07e8ba4e2 100644 --- a/test/argerr/4.c +++ b/test/argerr/4.c @@ -1,7 +1,7 @@ /* TEST_HEADER id = $Id$ - summary = NULL 1st arg to fmt_create_A + summary = NULL 1st arg to mps_fmt_create_k language = c link = testlib.o newfmt.o OUTPUT_SPEC @@ -27,10 +27,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(NULL, arena, &fmtA), - "create format"); - + cdie(make_format(NULL, arena), "create format"); } int main(void) diff --git a/test/argerr/45.c b/test/argerr/45.c index 2d77a663d2..fd4289680a 100644 --- a/test/argerr/45.c +++ b/test/argerr/45.c @@ -36,9 +36,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/46.c b/test/argerr/46.c index 1f9bd759b7..99cdc3b50e 100644 --- a/test/argerr/46.c +++ b/test/argerr/46.c @@ -34,9 +34,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/47.c b/test/argerr/47.c index 4a6c125347..5a3dd4e5fc 100644 --- a/test/argerr/47.c +++ b/test/argerr/47.c @@ -37,9 +37,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/48.c b/test/argerr/48.c index 14524392c9..21e2e19a20 100644 --- a/test/argerr/48.c +++ b/test/argerr/48.c @@ -35,9 +35,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/49.c b/test/argerr/49.c index 917c3df62d..b0fe073b36 100644 --- a/test/argerr/49.c +++ b/test/argerr/49.c @@ -37,9 +37,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/5.c b/test/argerr/5.c index 060664ebc5..182787b088 100644 --- a/test/argerr/5.c +++ b/test/argerr/5.c @@ -1,7 +1,7 @@ /* TEST_HEADER id = $Id$ - summary = UNALIGNED 1st arg to fmt_create_A + summary = UNALIGNED 1st arg to mps_fmt_create_k language = c link = testlib.o newfmt.o OUTPUT_SPEC @@ -25,10 +25,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(UNALIGNED, arena, &fmtA), - "create format"); - + cdie(make_format(UNALIGNED, arena), "create format"); } int main(void) diff --git a/test/argerr/50.c b/test/argerr/50.c index 4addae439d..f884cf73a1 100644 --- a/test/argerr/50.c +++ b/test/argerr/50.c @@ -37,9 +37,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/51.c b/test/argerr/51.c index 29230442a0..ab865b8946 100644 --- a/test/argerr/51.c +++ b/test/argerr/51.c @@ -37,9 +37,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/52.c b/test/argerr/52.c index 7a74a69c4a..04ff75bc80 100644 --- a/test/argerr/52.c +++ b/test/argerr/52.c @@ -37,9 +37,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/53.c b/test/argerr/53.c index 55b7e16089..79a7d144e7 100644 --- a/test/argerr/53.c +++ b/test/argerr/53.c @@ -35,9 +35,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/54.c b/test/argerr/54.c index 586be2f554..5c2cd44255 100644 --- a/test/argerr/54.c +++ b/test/argerr/54.c @@ -40,9 +40,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/55.c b/test/argerr/55.c index c664c604b5..652baebf45 100644 --- a/test/argerr/55.c +++ b/test/argerr/55.c @@ -38,9 +38,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/56.c b/test/argerr/56.c index 1e499568bd..4265365f23 100644 --- a/test/argerr/56.c +++ b/test/argerr/56.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/57.c b/test/argerr/57.c index 5648a503be..3e2ac85437 100644 --- a/test/argerr/57.c +++ b/test/argerr/57.c @@ -39,9 +39,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/58.c b/test/argerr/58.c index 6fb66e52e9..31399f93e8 100644 --- a/test/argerr/58.c +++ b/test/argerr/58.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/59.c b/test/argerr/59.c index 0b64805957..054db90b5e 100644 --- a/test/argerr/59.c +++ b/test/argerr/59.c @@ -40,9 +40,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/6.c b/test/argerr/6.c index 6960970154..a538e28f1d 100644 --- a/test/argerr/6.c +++ b/test/argerr/6.c @@ -1,7 +1,7 @@ /* TEST_HEADER id = $Id$ - summary = NULL 2nd arg to fmt_create_A + summary = NULL 2nd arg to mps_fmt_create_k language = c link = testlib.o newfmt.o OUTPUT_SPEC @@ -29,10 +29,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, NULL, &fmtA), - "create format"); - + cdie(make_format(&format, NULL), "create format"); } int main(void) diff --git a/test/argerr/60.c b/test/argerr/60.c index ed7027c178..d9aa6b12db 100644 --- a/test/argerr/60.c +++ b/test/argerr/60.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/61.c b/test/argerr/61.c index c7618d33bf..12566e6fa9 100644 --- a/test/argerr/61.c +++ b/test/argerr/61.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/62.c b/test/argerr/62.c index a037a5dd1b..28e18fde34 100644 --- a/test/argerr/62.c +++ b/test/argerr/62.c @@ -39,9 +39,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/63.c b/test/argerr/63.c index 0da3cd0098..3f7a16313a 100644 --- a/test/argerr/63.c +++ b/test/argerr/63.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/64.c b/test/argerr/64.c index 5fab3db227..8740c79d08 100644 --- a/test/argerr/64.c +++ b/test/argerr/64.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/65.c b/test/argerr/65.c index 9bcb5f2867..55d7713a19 100644 --- a/test/argerr/65.c +++ b/test/argerr/65.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/66.c b/test/argerr/66.c index 905524fc44..cb72622c1a 100644 --- a/test/argerr/66.c +++ b/test/argerr/66.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/67.c b/test/argerr/67.c index d478fdb15e..59d845c161 100644 --- a/test/argerr/67.c +++ b/test/argerr/67.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/argerr/7.c b/test/argerr/7.c index 493338be16..1ac40e6736 100644 --- a/test/argerr/7.c +++ b/test/argerr/7.c @@ -1,7 +1,7 @@ /* TEST_HEADER id = $Id$ - summary = UNALIGNED 2nd arg to fmt_create_A + summary = UNALIGNED 2nd arg to mps_fmt_create_k language = c link = testlib.o newfmt.o OUTPUT_SPEC @@ -26,9 +26,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, UNALIGNED, &fmtA), - "create format"); + cdie(make_format(&format, UNALIGNED), "create format"); } diff --git a/test/argerr/8.c b/test/argerr/8.c index 7ca25ab0b4..1eed1cc64e 100644 --- a/test/argerr/8.c +++ b/test/argerr/8.c @@ -29,9 +29,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); mps_fmt_destroy(NULL); diff --git a/test/argerr/9.c b/test/argerr/9.c index 84ba817f84..bdf528f745 100644 --- a/test/argerr/9.c +++ b/test/argerr/9.c @@ -26,9 +26,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); mps_fmt_destroy(UNALIGNED); diff --git a/test/conerr/34.c b/test/conerr/34.c index c2ec597c9c..2895cddd52 100644 --- a/test/conerr/34.c +++ b/test/conerr/34.c @@ -34,9 +34,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/conerr/35.c b/test/conerr/35.c index 80aafa7180..3a7fabb7c4 100644 --- a/test/conerr/35.c +++ b/test/conerr/35.c @@ -36,9 +36,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/conerr/36.c b/test/conerr/36.c index 9d8040d4a0..27ee10221a 100644 --- a/test/conerr/36.c +++ b/test/conerr/36.c @@ -36,9 +36,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/conerr/37.c b/test/conerr/37.c index d749027db7..7b1e8f0fac 100644 --- a/test/conerr/37.c +++ b/test/conerr/37.c @@ -38,9 +38,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/conerr/37f.c b/test/conerr/37f.c index 024602762c..b4cf5d21cd 100644 --- a/test/conerr/37f.c +++ b/test/conerr/37f.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/conerr/38.c b/test/conerr/38.c index c81d2b3253..432983107c 100644 --- a/test/conerr/38.c +++ b/test/conerr/38.c @@ -38,9 +38,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/conerr/38f.c b/test/conerr/38f.c index 7d974aefa8..d7691377a1 100644 --- a/test/conerr/38f.c +++ b/test/conerr/38f.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/conerr/39.c b/test/conerr/39.c index 4c4fb85f7e..2d922a6498 100644 --- a/test/conerr/39.c +++ b/test/conerr/39.c @@ -37,9 +37,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/conerr/39f.c b/test/conerr/39f.c index e21ea8e39e..6b5bdc37ee 100644 --- a/test/conerr/39f.c +++ b/test/conerr/39f.c @@ -40,9 +40,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/conerr/40.c b/test/conerr/40.c index de21b0068f..57238a1b56 100644 --- a/test/conerr/40.c +++ b/test/conerr/40.c @@ -33,9 +33,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/conerr/40f.c b/test/conerr/40f.c index 7f403d8342..4b4f6feba7 100644 --- a/test/conerr/40f.c +++ b/test/conerr/40f.c @@ -40,9 +40,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/conerr/60.c b/test/conerr/60.c index dab72b4914..6d1f8e1f08 100644 --- a/test/conerr/60.c +++ b/test/conerr/60.c @@ -31,7 +31,7 @@ static void test(void *stack_pointer) mps_arena_park(arena); cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, marker), "create root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format); cdie(mps_pool_create_k(&pool_ams, arena, mps_class_ams(), args), "ams pool"); diff --git a/test/conerr/61.c b/test/conerr/61.c index 0f5fa65cba..f8f63162c3 100644 --- a/test/conerr/61.c +++ b/test/conerr/61.c @@ -30,7 +30,7 @@ static void test(void *stack_pointer) mps_arena_park(arena); cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, marker), "create root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format); cdie(mps_pool_create_k(&pool, arena, mps_class_awl(), args), "pool"); diff --git a/test/conerr/62.c b/test/conerr/62.c index 2c49053603..65c25c0279 100644 --- a/test/conerr/62.c +++ b/test/conerr/62.c @@ -31,7 +31,7 @@ static void test(void *stack_pointer) mps_arena_park(arena); cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, marker), "create root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format); cdie(mps_pool_create_k(&pool_ams, arena, mps_class_ams(), args), "ams pool"); diff --git a/test/conerr/63.c b/test/conerr/63.c index 4fec52ff41..932c2ba2ce 100644 --- a/test/conerr/63.c +++ b/test/conerr/63.c @@ -30,7 +30,7 @@ static void test(void *stack_pointer) mps_arena_park(arena); cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, marker), "create root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format); cdie(mps_pool_create_k(&pool, arena, mps_class_awl(), args), "pool"); diff --git a/test/conerr/64.c b/test/conerr/64.c index c17c3da40c..c49ee44135 100644 --- a/test/conerr/64.c +++ b/test/conerr/64.c @@ -32,11 +32,7 @@ static void test(void *stack_pointer) mps_arena_park(arena); cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, marker), "create root"); - MPS_ARGS_BEGIN(args) { - MPS_ARGS_ADD(args, MPS_KEY_FMT_HEADER_SIZE, header); - fmtargs(args + 1); - cdie(mps_fmt_create_k(&fmt, arena, args), "lo format"); - } MPS_ARGS_END(args); + cdie(make_format_header(&fmt, arena, header), "lo format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, fmt); cdie(mps_pool_create_k(&pool_ams, arena, mps_class_ams(), args), "ams pool"); diff --git a/test/conerr/65.c b/test/conerr/65.c index 8ed48c380f..5def2b7aa6 100644 --- a/test/conerr/65.c +++ b/test/conerr/65.c @@ -31,11 +31,7 @@ static void test(void *stack_pointer) mps_arena_park(arena); cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, marker), "create root"); - MPS_ARGS_BEGIN(args) { - MPS_ARGS_ADD(args, MPS_KEY_FMT_HEADER_SIZE, header); - fmtargs(args + 1); - cdie(mps_fmt_create_k(&fmt, arena, args), "format"); - } MPS_ARGS_END(args); + cdie(make_format_header(&fmt, arena, header), "format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, fmt); cdie(mps_pool_create_k(&pool, arena, mps_class_awl(), args), "pool"); diff --git a/test/conerr/66.c b/test/conerr/66.c index 89a4ecffc2..53ed9622f6 100644 --- a/test/conerr/66.c +++ b/test/conerr/66.c @@ -30,7 +30,7 @@ static void test(void *stack_pointer) mps_arena_park(arena); cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, marker), "create root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format); cdie(mps_pool_create_k(&pool, arena, mps_class_ams(), args), "pool"); diff --git a/test/conerr/67.c b/test/conerr/67.c index 9709c0c43f..77cb686f88 100644 --- a/test/conerr/67.c +++ b/test/conerr/67.c @@ -30,7 +30,7 @@ static void test(void *stack_pointer) mps_arena_park(arena); cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, marker), "create root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format); cdie(mps_pool_create_k(&pool, arena, mps_class_ams(), args), "pool"); diff --git a/test/conerr/68.c b/test/conerr/68.c index f21fc567e6..1c31a8047e 100644 --- a/test/conerr/68.c +++ b/test/conerr/68.c @@ -31,11 +31,7 @@ static void test(void *stack_pointer) mps_arena_park(arena); cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, marker), "create root"); - MPS_ARGS_BEGIN(args) { - MPS_ARGS_ADD(args, MPS_KEY_FMT_HEADER_SIZE, header); - fmtargs(args + 1); - cdie(mps_fmt_create_k(&fmt, arena, args), "format"); - } MPS_ARGS_END(args); + cdie(make_format_header(&fmt, arena, header), "format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, fmt); cdie(mps_pool_create_k(&pool, arena, mps_class_ams(), args), "pool"); diff --git a/test/function/10.c b/test/function/10.c index 358f927686..ca02b16ff4 100644 --- a/test/function/10.c +++ b/test/function/10.c @@ -26,35 +26,6 @@ static mps_addr_t myskip(mps_addr_t object) return (mps_addr_t) ((char *) object + OBJSIZE); } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ -} - -static void mypad(mps_addr_t base, size_t size) -{ -} - -static mps_addr_t myisfwd(mps_addr_t object) -{ - return NULL; -} - -static void myfwd(mps_addr_t object, mps_addr_t to) -{ -} - -struct mps_fmt_A_s fmtA = -{ - 1, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; - - static void test(void *stack_pointer) { mps_arena_t arena; @@ -75,9 +46,12 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + cdie(mps_fmt_create_k(&format, arena, args), "create format"); + } MPS_ARGS_END(args); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/103.c b/test/function/103.c index 6a61ba9ddb..4ca02ea2fd 100644 --- a/test/function/103.c +++ b/test/function/103.c @@ -77,7 +77,7 @@ static void test(void *stack_pointer) (mps_addr_t *)&exfmt_root, 1), "create table root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/104.c b/test/function/104.c index 392dc6c31b..576df0569f 100644 --- a/test/function/104.c +++ b/test/function/104.c @@ -184,7 +184,7 @@ static void test(void *stack_pointer) (mps_addr_t *)&b[0], 4), "create b root table"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/105.c b/test/function/105.c index 0ec950f9c8..d54833df7e 100644 --- a/test/function/105.c +++ b/test/function/105.c @@ -40,7 +40,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/106.c b/test/function/106.c index 0c38a78417..7f091dc4d8 100644 --- a/test/function/106.c +++ b/test/function/106.c @@ -78,7 +78,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtLO), "create format"); + cdie(make_format_header(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amcz(), format, chain), diff --git a/test/function/107.c b/test/function/107.c index 5bd3f4754d..08b30d530b 100644 --- a/test/function/107.c +++ b/test/function/107.c @@ -78,7 +78,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtLO), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amcz(), format, chain), diff --git a/test/function/108.c b/test/function/108.c index 73f160af3b..ccdd222c57 100644 --- a/test/function/108.c +++ b/test/function/108.c @@ -45,7 +45,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/109.c b/test/function/109.c index 3b9f8fd966..8a5a39cb3d 100644 --- a/test/function/109.c +++ b/test/function/109.c @@ -141,8 +141,7 @@ static void test(void *stack_pointer) (mps_addr_t*)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/11.c b/test/function/11.c index 2326880039..62c63085d3 100644 --- a/test/function/11.c +++ b/test/function/11.c @@ -44,7 +44,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); formatcomments = 0; diff --git a/test/function/110.c b/test/function/110.c index 27717fefab..f1a7e91c06 100644 --- a/test/function/110.c +++ b/test/function/110.c @@ -145,8 +145,7 @@ static void test(void *stack_pointer) (mps_addr_t*)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/111.c b/test/function/111.c index db15c35c36..f08cf9f974 100644 --- a/test/function/111.c +++ b/test/function/111.c @@ -113,8 +113,7 @@ static void test(void *stack_pointer) (mps_addr_t*)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/112.c b/test/function/112.c index 7c25d1e5fa..b570c80837 100644 --- a/test/function/112.c +++ b/test/function/112.c @@ -43,8 +43,7 @@ static void test(void *stack_pointer) (mps_addr_t*)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poollo, arena, mps_class_amcz(), format, chain), diff --git a/test/function/113.c b/test/function/113.c index 35ec465338..96663b809a 100644 --- a/test/function/113.c +++ b/test/function/113.c @@ -44,9 +44,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1,arena,mps_rank_ambig(),0,&exfmt_root,1), "create table root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/114.c b/test/function/114.c index 9c1ebebbb8..b050c1b8fe 100644 --- a/test/function/114.c +++ b/test/function/114.c @@ -43,9 +43,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1,arena,mps_rank_ambig(),0,&exfmt_root,1), "create table root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/116.c b/test/function/116.c index ed1daa6937..360c292f8e 100644 --- a/test/function/116.c +++ b/test/function/116.c @@ -45,9 +45,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/117.c b/test/function/117.c index 2acc715583..69054dc9b3 100644 --- a/test/function/117.c +++ b/test/function/117.c @@ -47,7 +47,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/118.c b/test/function/118.c index e83a8f5488..c821442027 100644 --- a/test/function/118.c +++ b/test/function/118.c @@ -55,23 +55,6 @@ static void simple_pad(mps_addr_t addr, size_t size) { } -static void simple_copy(mps_addr_t obj, mps_addr_t to) -{ - error("copy method not implemented in this test"); -} - - -struct mps_fmt_A_s simple_fmt_A = { - 4, - &simple_scan, - &simple_skip, - &simple_copy, - &simple_fwd, - &simple_is_fwd, - &simple_pad -}; - - static mps_addr_t make(void) { size_t size = objSIZE; @@ -105,7 +88,15 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "thread_reg"); - die(mps_fmt_create_A(&format, arena, &simple_fmt_A), "fmt_create"); + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, simple_scan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, simple_skip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, simple_fwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, simple_is_fwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, simple_pad); + die(mps_fmt_create_k(&format, arena, args), "fmt_create"); + } MPS_ARGS_END(args); + die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/12.c b/test/function/12.c index a7cd73a27c..106a9bd043 100644 --- a/test/function/12.c +++ b/test/function/12.c @@ -77,7 +77,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); cdie(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/122.c b/test/function/122.c index 0fce6bef03..58835c2c35 100644 --- a/test/function/122.c +++ b/test/function/122.c @@ -98,9 +98,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root2, arena, mps_rank_ambig(), 0, (mps_addr_t*)&b[0], 4), "create b root table"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/123.c b/test/function/123.c index 83082eaf38..c41852e8f3 100644 --- a/test/function/123.c +++ b/test/function/123.c @@ -49,9 +49,7 @@ static void test(void *stack_pointer) cdie(mps_root_create_table(&rootb, arena, mps_rank_ambig(), 0, addr, 1), "create root b"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/124.c b/test/function/124.c index 14f68b739a..3eba866d97 100644 --- a/test/function/124.c +++ b/test/function/124.c @@ -77,7 +77,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_exact(), 0, &objtab[0], TABSIZE), "create root table"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/125.c b/test/function/125.c index 611619c584..97a09e464c 100644 --- a/test/function/125.c +++ b/test/function/125.c @@ -44,8 +44,7 @@ static void test(void *stack_pointer) (mps_addr_t*)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/126.c b/test/function/126.c index caffb99af0..2fe413f07a 100644 --- a/test/function/126.c +++ b/test/function/126.c @@ -42,8 +42,7 @@ static void test(void *stack_pointer) (mps_addr_t*)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/127.c b/test/function/127.c index 23cbdeaa4c..f2ce06238b 100644 --- a/test/function/127.c +++ b/test/function/127.c @@ -76,9 +76,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_exact(), 0, &objtab[0], TABSIZE), "create root table"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/128.c b/test/function/128.c index f55d7f3cb4..0032f65c0c 100644 --- a/test/function/128.c +++ b/test/function/128.c @@ -76,9 +76,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_exact(), 0, &objtab[0], TABSIZE), "create root table"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/129.c b/test/function/129.c index 3521534ef1..81590589ae 100644 --- a/test/function/129.c +++ b/test/function/129.c @@ -75,9 +75,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_exact(), 0, &objtab[0], TABSIZE), "create root table"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/12p.c b/test/function/12p.c index 04bdc59f52..cec5b1d1d2 100644 --- a/test/function/12p.c +++ b/test/function/12p.c @@ -70,9 +70,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/13.c b/test/function/13.c index 94dd01f430..f5c257fc47 100644 --- a/test/function/13.c +++ b/test/function/13.c @@ -70,9 +70,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/130.c b/test/function/130.c index 2d4195d539..2d43c4d642 100644 --- a/test/function/130.c +++ b/test/function/130.c @@ -39,8 +39,7 @@ static void test(void *stack_pointer) "create arena"); die(mps_arena_commit_limit_set(arena, 1u << 20), "commit_limit_set"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/131.c b/test/function/131.c index da2e856358..71b4041540 100644 --- a/test/function/131.c +++ b/test/function/131.c @@ -44,9 +44,7 @@ static void test(void *stack_pointer) "create arena"); mps_arena_commit_limit_set(arena, (size_t) (1024*1024*1)); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/134.c b/test/function/134.c index 78cc7375ad..2851b6a5fb 100644 --- a/test/function/134.c +++ b/test/function/134.c @@ -76,9 +76,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_exact(), 0, &objtab[0], TABSIZE), "create root table"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/138.c b/test/function/138.c index 51c583534f..aab3772491 100644 --- a/test/function/138.c +++ b/test/function/138.c @@ -46,8 +46,7 @@ static void test(void *stack_pointer) (mps_addr_t*)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/14.c b/test/function/14.c index 206af9b0e5..30a1fcb135 100644 --- a/test/function/14.c +++ b/test/function/14.c @@ -56,7 +56,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); cdie(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/147.c b/test/function/147.c index 8c90c3e03d..58329a80cd 100644 --- a/test/function/147.c +++ b/test/function/147.c @@ -36,9 +36,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie( mps_pool_create(&spool, arena, mps_class_snc(), format), diff --git a/test/function/148.c b/test/function/148.c index 1dd43b0402..dcfc52a01b 100644 --- a/test/function/148.c +++ b/test/function/148.c @@ -63,7 +63,7 @@ static void test(void *stack_pointer) /* because we know objects in the stack pool don't move, */ /* we can do without roots. Hooray! */ - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/15.c b/test/function/15.c index b2c0aac923..0d38ae03f2 100644 --- a/test/function/15.c +++ b/test/function/15.c @@ -36,7 +36,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); cdie(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/150.c b/test/function/150.c index f1d19b3402..9fec9b77d9 100644 --- a/test/function/150.c +++ b/test/function/150.c @@ -162,8 +162,7 @@ static void test(void *stack_pointer) (mps_addr_t *)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/151.c b/test/function/151.c index 952329ffab..ad3e311090 100644 --- a/test/function/151.c +++ b/test/function/151.c @@ -35,9 +35,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie( mps_pool_create(&spool, arena, mps_class_snc(), format), diff --git a/test/function/152.c b/test/function/152.c index af197c8f1d..284eacc500 100644 --- a/test/function/152.c +++ b/test/function/152.c @@ -63,7 +63,7 @@ static void test(void *stack_pointer) /* because we know objects in the stack pool don't move, we can do without roots. Hooray! */ - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/153.c b/test/function/153.c index efee275565..7c73c78c36 100644 --- a/test/function/153.c +++ b/test/function/153.c @@ -34,9 +34,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie( mps_pool_create(&spool, arena, mps_class_snc(), format), diff --git a/test/function/16.c b/test/function/16.c index 626ba6c486..3c4ab0f795 100644 --- a/test/function/16.c +++ b/test/function/16.c @@ -44,7 +44,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); cdie(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/17.c b/test/function/17.c index 30b06d21c4..fa9320a440 100644 --- a/test/function/17.c +++ b/test/function/17.c @@ -33,7 +33,7 @@ static void test(void *stack_pointer) cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena"); die(mps_thread_reg(&thread, arena), "register thread"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool1, arena, mps_class_amc(), format, chain), diff --git a/test/function/171.c b/test/function/171.c index 4f61b29b0b..79b92c4cbb 100644 --- a/test/function/171.c +++ b/test/function/171.c @@ -76,9 +76,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_exact(), 0, &objtab[0], TABSIZE), "create root table"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/18.c b/test/function/18.c index eba534e2b2..9f2d36dd44 100644 --- a/test/function/18.c +++ b/test/function/18.c @@ -38,7 +38,8 @@ static void test(void *stack_pointer) "create arena"); die(mps_arena_commit_limit_set(arena, 1ul << 30), "commit_limit_set"); die(mps_thread_reg(&thread, arena), "register thread"); - cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); + cdie(make_format(&format, arena), "create format"); die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), mps_args_none), "pool"); diff --git a/test/function/19.c b/test/function/19.c index 691dede067..1dec3a171d 100644 --- a/test/function/19.c +++ b/test/function/19.c @@ -39,7 +39,8 @@ static void test(void *stack_pointer) "create arena"); die(mps_arena_commit_limit_set(arena, 1ul << 30), "commit_limit_set"); die(mps_thread_reg(&thread, arena), "register thread"); - cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); + cdie(make_format(&format, arena), "create format"); die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), mps_args_none), "pool"); diff --git a/test/function/2.c b/test/function/2.c index 80bf7abd2d..654df66f72 100644 --- a/test/function/2.c +++ b/test/function/2.c @@ -39,9 +39,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/20.c b/test/function/20.c index afab78f129..b3f350850d 100644 --- a/test/function/20.c +++ b/test/function/20.c @@ -36,7 +36,7 @@ static void test(void *stack_pointer) while (1) { p++; - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); report("format", "%i", p); } diff --git a/test/function/215.c b/test/function/215.c index b15312ce10..bf49eca526 100644 --- a/test/function/215.c +++ b/test/function/215.c @@ -77,9 +77,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_exact(), 0, &objtab[0], TABSIZE), "create root table"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/223.c b/test/function/223.c index ab0de19af7..b85387c318 100644 --- a/test/function/223.c +++ b/test/function/223.c @@ -77,9 +77,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_exact(), 0, &objtab[0], TABSIZE), "create root table"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/226.c b/test/function/226.c index 9031e6c327..86067d6bf3 100644 --- a/test/function/226.c +++ b/test/function/226.c @@ -100,9 +100,8 @@ static void test(void *stack_pointer) mps_root_create_table(&root2, arena, mps_rank_exact(), 0, (mps_addr_t *)obj_table, MAXLDS), "create table root"); - cdie(mps_root_create_thread(&root1, arena, thread, stack_pointer), "thread root"); cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(mps_root_create_thread(&root1, arena, thread, stack_pointer), "thread root"); + cdie(make_format(&format, arena), "create format"); cdie( mps_pool_create(&poolawl, arena, mps_class_awl(), format, getassociated), "create awl pool"); diff --git a/test/function/227.c b/test/function/227.c index 7de43c39ea..cbf319acd7 100644 --- a/test/function/227.c +++ b/test/function/227.c @@ -79,12 +79,8 @@ static void test(void *stack_pointer) mps_root_create_table(&root2a, arena2, mps_rank_exact(), 0, &objtab2[0], TABSIZE), "create root table"); - cdie( - mps_fmt_create_A(&format1, arena1, &fmtA), - "create format"); - cdie( - mps_fmt_create_A(&format2, arena2, &fmtA), - "create format"); + cdie(make_format(&format1, arena1), "create format"); + cdie(make_format(&format2, arena2), "create format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format1); diff --git a/test/function/23.c b/test/function/23.c index 3bf7cbfbf8..0f54c7b50c 100644 --- a/test/function/23.c +++ b/test/function/23.c @@ -50,7 +50,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); formatcomments = 0; diff --git a/test/function/234.c b/test/function/234.c index a7468e3dba..a4093dedf7 100644 --- a/test/function/234.c +++ b/test/function/234.c @@ -30,7 +30,7 @@ static void test_pool(void *stack_pointer, mps_pool_class_t pool_class) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "create thread"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format); cdie(mps_pool_create_k(&pool, arena, pool_class, args), "create pool"); diff --git a/test/function/236.c b/test/function/236.c index 4628a07daf..b47bc684f1 100644 --- a/test/function/236.c +++ b/test/function/236.c @@ -100,7 +100,7 @@ static void test(void *stack_pointer) struct timespec timespec = { 0, 1000000 }; die(mps_arena_create_k(&arena, mps_arena_class_vm(), mps_args_none), "mps_arena_create_k"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); MPS_ARGS_BEGIN(args) { MPS_ARGS_ADD(args, MPS_KEY_FORMAT, format); die(mps_pool_create_k(&pool, arena, mps_class_amc(), args), "mps_pool_create_k"); diff --git a/test/function/237.c b/test/function/237.c index 20e01ab66d..1a9315add4 100644 --- a/test/function/237.c +++ b/test/function/237.c @@ -164,7 +164,7 @@ static void test(void *stack_pointer) }; die(mps_arena_create_k(&arena, mps_arena_class_vm(), mps_args_none), "mps_arena_create_k"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); die(mps_chain_create(&chain, arena, 2, gen_params), "mps_chain_create"); die(mps_thread_reg(&thread, arena), "mps_thread_reg"); die(mps_root_create_thread(&root, arena, thread, stack_pointer), "mps_root_create_thread"); diff --git a/test/function/24.c b/test/function/24.c index ebb33e5991..c46a82aabe 100644 --- a/test/function/24.c +++ b/test/function/24.c @@ -28,35 +28,11 @@ static mps_addr_t myskip(mps_addr_t object) return (mps_addr_t) ((char *) object + OBJSIZE); } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ -} - -static void mypad(mps_addr_t base, size_t size) -{ -} - static mps_addr_t myisfwd(mps_addr_t object) { return NULL; } -static void myfwd(mps_addr_t object, mps_addr_t to) -{ -} - -struct mps_fmt_A_s fmtA = -{ - 1, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; - - static void test(void *stack_pointer) { mps_arena_t arena; @@ -77,9 +53,12 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + cdie(mps_fmt_create_k(&format, arena, args), "create format"); + } MPS_ARGS_END(args); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/25.c b/test/function/25.c index a340e14b34..23773f71ac 100644 --- a/test/function/25.c +++ b/test/function/25.c @@ -68,9 +68,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtLO), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie( mps_pool_create(&pool, arena, mps_class_lo(), format), diff --git a/test/function/27.c b/test/function/27.c index ede37f50ff..578ea6827a 100644 --- a/test/function/27.c +++ b/test/function/27.c @@ -42,7 +42,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); cdie(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/28.c b/test/function/28.c index 48e8405006..0828b97f3b 100644 --- a/test/function/28.c +++ b/test/function/28.c @@ -41,7 +41,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/29.c b/test/function/29.c index 4b58c17234..dd603f0299 100644 --- a/test/function/29.c +++ b/test/function/29.c @@ -67,9 +67,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtLO), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie( mps_pool_create(&pool, arena, mps_class_lo(), format), diff --git a/test/function/3.c b/test/function/3.c index a1f59e3804..c776fbcde2 100644 --- a/test/function/3.c +++ b/test/function/3.c @@ -43,9 +43,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/function/30.c b/test/function/30.c index a84450a319..04fc4d1064 100644 --- a/test/function/30.c +++ b/test/function/30.c @@ -36,7 +36,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); die(mps_pool_create(&pool, arena, mps_class_awl(), format, getassociated), "create pool"); diff --git a/test/function/31.c b/test/function/31.c index d7a62579b0..2ccd7a49fd 100644 --- a/test/function/31.c +++ b/test/function/31.c @@ -46,7 +46,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/32.c b/test/function/32.c index 04b34a0a9e..750ba0c2b4 100644 --- a/test/function/32.c +++ b/test/function/32.c @@ -44,7 +44,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/33.c b/test/function/33.c index 067e78ca04..98c4c5f1ce 100644 --- a/test/function/33.c +++ b/test/function/33.c @@ -43,7 +43,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/34.c b/test/function/34.c index 489cfb0b3e..730c4033b1 100644 --- a/test/function/34.c +++ b/test/function/34.c @@ -45,7 +45,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/35.c b/test/function/35.c index 51749214b6..3850e71292 100644 --- a/test/function/35.c +++ b/test/function/35.c @@ -55,7 +55,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root, arena, mps_rank_exact(), 0, (mps_addr_t*)&z[0], 10), "create table root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); cdie(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/36.c b/test/function/36.c index ccf0029ec5..3b2a7ab6b1 100644 --- a/test/function/36.c +++ b/test/function/36.c @@ -42,7 +42,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/37.c b/test/function/37.c index 32f17a3255..949c331582 100644 --- a/test/function/37.c +++ b/test/function/37.c @@ -58,7 +58,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root2, arena, mps_rank_ambig(), 0, &exfmt_root, 1), "create exfmt root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/38.c b/test/function/38.c index 64120805ad..a0866d9072 100644 --- a/test/function/38.c +++ b/test/function/38.c @@ -29,25 +29,6 @@ static mycell *obj_table[MAXLDS]; static mps_ld_t lds[MAXLDS]; -static void checklds(void) -{ - int i; - - for (i=0; i < MAXLDS; i++) { - if (obj_table[i]->data.copycount != 0) { - asserts(mps_ld_isstale(lds[i], arena, (mps_addr_t) obj_table[i]), - "%d isn't stale but should be", i); - if (ranint(4) == 0) { - obj_table[i]->data.copycount = 0; - mps_ld_reset(lds[i], arena); - comment("reset %d", i); - mps_ld_add(lds[i], arena, (mps_addr_t) obj_table[i]); - } - } - } -} - - static void test(void *stack_pointer) { mps_pool_t poolmvff, poolawl, poolamc; @@ -78,8 +59,7 @@ static void test(void *stack_pointer) "create table root"); cdie(mps_root_create_thread(&root1, arena, thread, stack_pointer), "thread root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); @@ -140,7 +120,6 @@ static void test(void *stack_pointer) for (i=0; i < 1000; i++) { comment("%d of 1000", i); - checklds(); for (j=0; j < 8; j++) { a = allocdumb(apamc, 32*1024, mps_rank_exact()); } diff --git a/test/function/39.c b/test/function/39.c index 8b0b4bd03d..7c084bf8a0 100644 --- a/test/function/39.c +++ b/test/function/39.c @@ -46,7 +46,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/4.c b/test/function/4.c index 21b4d6d879..c9ceabb662 100644 --- a/test/function/4.c +++ b/test/function/4.c @@ -46,9 +46,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); formatcomments = 0; diff --git a/test/function/40.c b/test/function/40.c index d41fe21e7d..1dde2dffea 100644 --- a/test/function/40.c +++ b/test/function/40.c @@ -49,7 +49,7 @@ static void test(void *stack_pointer) die(mps_root_create_table(&root2, arena, mps_rank_ambig(), 0, &exfmt_root, 1), "create exfmt root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/41.c b/test/function/41.c index 680c5b92fa..25af6515ae 100644 --- a/test/function/41.c +++ b/test/function/41.c @@ -45,7 +45,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/42.c b/test/function/42.c index dcad2bd9cb..0ef8c67a17 100644 --- a/test/function/42.c +++ b/test/function/42.c @@ -43,7 +43,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/43.c b/test/function/43.c index c34e602579..5922c63d94 100644 --- a/test/function/43.c +++ b/test/function/43.c @@ -43,7 +43,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/44.c b/test/function/44.c index b215c62de0..8816a28a27 100644 --- a/test/function/44.c +++ b/test/function/44.c @@ -55,7 +55,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_ambig(), 0, &exfmt_root, 1), "create exfmt root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), @@ -143,7 +143,6 @@ static void test(void *stack_pointer) setref(c, 4, g); b = c; } - asserts(counters[COPY_COUNT]==0, "Eppur si muove!"); DC; if (j==9) { comment("collecting..."); diff --git a/test/function/45.c b/test/function/45.c index c13ede7219..497330cd17 100644 --- a/test/function/45.c +++ b/test/function/45.c @@ -68,7 +68,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/46.c b/test/function/46.c index 1a8b2cdcca..2d89078011 100644 --- a/test/function/46.c +++ b/test/function/46.c @@ -62,9 +62,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_ambig(), 0, &exfmt_root, 1), "create exfmt root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/47.c b/test/function/47.c index 5e20fe7d2a..a5e07671d9 100644 --- a/test/function/47.c +++ b/test/function/47.c @@ -43,8 +43,7 @@ static void test(void *stack_pointer) "create exfmt root"); cdie(mps_root_create_thread(&root1, arena, thread, stack_pointer), "thread root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_pool_create(&poolawl, arena, mps_class_awl(), format, getassociated), "create awl pool"); diff --git a/test/function/48.c b/test/function/48.c index cac91292ec..4415e24be6 100644 --- a/test/function/48.c +++ b/test/function/48.c @@ -43,7 +43,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/49.c b/test/function/49.c index ffdbc5778f..2ac083ef13 100644 --- a/test/function/49.c +++ b/test/function/49.c @@ -142,8 +142,7 @@ static void test(void *stack_pointer) (mps_addr_t *)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/5.c b/test/function/5.c index 2250626a80..6acccb7af4 100644 --- a/test/function/5.c +++ b/test/function/5.c @@ -42,9 +42,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); formatcomments = 0; diff --git a/test/function/50.c b/test/function/50.c index 6d12449b59..e990b8229a 100644 --- a/test/function/50.c +++ b/test/function/50.c @@ -145,8 +145,7 @@ static void test(void *stack_pointer) (mps_addr_t *)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/51.c b/test/function/51.c index 3eda038c38..2b3e35207c 100644 --- a/test/function/51.c +++ b/test/function/51.c @@ -114,8 +114,7 @@ static void test(void *stack_pointer) (mps_addr_t *)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/52.c b/test/function/52.c index 3f847ddadf..3de8545a6b 100644 --- a/test/function/52.c +++ b/test/function/52.c @@ -53,8 +53,7 @@ static void test(void *stack_pointer) (mps_addr_t *)&exfmt_root, 1), "exfmt root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/53.c b/test/function/53.c index 8bb5d4554b..5c12d232ad 100644 --- a/test/function/53.c +++ b/test/function/53.c @@ -43,7 +43,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/54.c b/test/function/54.c index f4eb16bbce..db92522679 100644 --- a/test/function/54.c +++ b/test/function/54.c @@ -44,7 +44,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/55.c b/test/function/55.c index a37f49d3f8..f302664b88 100644 --- a/test/function/55.c +++ b/test/function/55.c @@ -44,7 +44,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/56.c b/test/function/56.c index dbe4a616c0..a6dbc95755 100644 --- a/test/function/56.c +++ b/test/function/56.c @@ -42,7 +42,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/57.c b/test/function/57.c index 74f095791c..64b594adc5 100644 --- a/test/function/57.c +++ b/test/function/57.c @@ -42,7 +42,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/6.c b/test/function/6.c index d399f20ca8..744f3662fe 100644 --- a/test/function/6.c +++ b/test/function/6.c @@ -42,7 +42,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); cdie(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/60.c b/test/function/60.c index 3b850fb5c9..e5b45e59f9 100644 --- a/test/function/60.c +++ b/test/function/60.c @@ -40,9 +40,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/61.c b/test/function/61.c index 33df809802..384b7a6376 100644 --- a/test/function/61.c +++ b/test/function/61.c @@ -43,7 +43,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc1, arena, mps_class_amc(), format, chain), diff --git a/test/function/62.c b/test/function/62.c index 4624376a3b..1beb5abe62 100644 --- a/test/function/62.c +++ b/test/function/62.c @@ -42,7 +42,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc1, arena, mps_class_amc(), format, chain), diff --git a/test/function/63.c b/test/function/63.c index af12b6dc29..0f2b15490a 100644 --- a/test/function/63.c +++ b/test/function/63.c @@ -42,7 +42,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc1, arena, mps_class_amc(), format, chain), diff --git a/test/function/64.c b/test/function/64.c index 7c17c0144a..a21d0a4726 100644 --- a/test/function/64.c +++ b/test/function/64.c @@ -43,7 +43,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/65.c b/test/function/65.c index 62faa09c8d..e43c0a5636 100644 --- a/test/function/65.c +++ b/test/function/65.c @@ -100,7 +100,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root, arena, mps_rank_exact(), 0, &exfmt_root, 1), "create exfmt root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/66.c b/test/function/66.c index 546b02dfcf..57695dfc14 100644 --- a/test/function/66.c +++ b/test/function/66.c @@ -24,23 +24,6 @@ mps_arena_t arena; static mycell *obj_table[MAXLDS]; static mps_ld_t lds[MAXLDS]; -static void checklds(void) { - int i; - - for (i=0; i < MAXLDS; i++) { - if (obj_table[i]->data.copycount != 0) { - asserts(mps_ld_isstale(lds[i], arena, (mps_addr_t) obj_table[i]), - "%d isn't stale but should be", i); - if (ranint(4) == 0) { - obj_table[i]->data.copycount = 0; - mps_ld_reset(lds[i], arena); - comment("reset %d", i); - mps_ld_add(lds[i], arena, (mps_addr_t) obj_table[i]); - } - } - } -} - static void test(void *stack_pointer) { mps_pool_t poolmvff, poolawl, poolamc; @@ -76,9 +59,7 @@ static void test(void *stack_pointer) "create table root"); cdie(mps_root_create_thread(&root1, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie( mps_pool_create(&poolawl, arena, mps_class_awl(), format, getassociated), @@ -143,7 +124,6 @@ static void test(void *stack_pointer) for (i=0; i < 1000; i++) { comment("%d of 1000", i); - checklds(); for (j=0; j < 4; j++) { a = allocdumb(apamc, 32*1024, mps_rank_exact()); } diff --git a/test/function/67.c b/test/function/67.c index c9b3e9dc08..9c3fc4cd15 100644 --- a/test/function/67.c +++ b/test/function/67.c @@ -57,7 +57,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_ambig(), 0, &exfmt_root, 1), "create exfmt root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/68.c b/test/function/68.c index 748c28bf1c..bdc9ec316e 100644 --- a/test/function/68.c +++ b/test/function/68.c @@ -47,9 +47,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_ambig(), 0, &exfmt_root, 1), "create exfmt root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/69.c b/test/function/69.c index cb97ce044b..4f17f9d69d 100644 --- a/test/function/69.c +++ b/test/function/69.c @@ -47,7 +47,7 @@ static void test(void *stack_pointer) die(mps_root_create_area(&rootB, arena, mps_rank_ambig(), (mps_rm_t)0, &b, &b + 1, mps_scan_area, NULL), "create root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/72.c b/test/function/72.c index 1d39d0ec83..a0a3c05b1f 100644 --- a/test/function/72.c +++ b/test/function/72.c @@ -41,9 +41,7 @@ static void test(void *stack_pointer) cdie(mps_root_create_area(&root, arena, mps_rank_exact(), 0, &a[0], &a[3], mps_scan_area, NULL), "create area"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/73.c b/test/function/73.c index 84f4bd40dd..bde91f6d86 100644 --- a/test/function/73.c +++ b/test/function/73.c @@ -37,8 +37,7 @@ static void test(void *stack_pointer) (mps_addr_t *)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_pool_create(&poolawl, arena, mps_class_awl(), format, getassociated), "create pool"); diff --git a/test/function/74.c b/test/function/74.c index 9811ac97f0..f31b295d2a 100644 --- a/test/function/74.c +++ b/test/function/74.c @@ -37,8 +37,7 @@ static void test(void *stack_pointer) (mps_addr_t *)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_pool_create(&poollo, arena, mps_class_lo(), format), "create pool"); diff --git a/test/function/75.c b/test/function/75.c index 39559738de..19f3dbdf3f 100644 --- a/test/function/75.c +++ b/test/function/75.c @@ -43,8 +43,7 @@ static void test(void *stack_pointer) (mps_addr_t *)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/76.c b/test/function/76.c index 1d11511e11..e9a8546f48 100644 --- a/test/function/76.c +++ b/test/function/76.c @@ -49,8 +49,7 @@ static void test(void *stack_pointer) (mps_addr_t*)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/77.c b/test/function/77.c index 19973e2ae6..18f0b472db 100644 --- a/test/function/77.c +++ b/test/function/77.c @@ -46,7 +46,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1,arena,mps_rank_ambig(),0,&exfmt_root,1), "create table root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/78.c b/test/function/78.c index ee7ab96e45..e18ff9c5e2 100644 --- a/test/function/78.c +++ b/test/function/78.c @@ -47,7 +47,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1,arena,mps_rank_ambig(),0,&exfmt_root,1), "create table root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/79.c b/test/function/79.c index c8eca9d4c1..19504768d1 100644 --- a/test/function/79.c +++ b/test/function/79.c @@ -46,7 +46,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1,arena,mps_rank_ambig(),0,&exfmt_root,1), "create table root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/80.c b/test/function/80.c index a9d6050e8c..fa313870f3 100644 --- a/test/function/80.c +++ b/test/function/80.c @@ -46,7 +46,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1,arena,mps_rank_ambig(),0,&exfmt_root,1), "create table root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/function/81.c b/test/function/81.c index b066694888..2f399e19f5 100644 --- a/test/function/81.c +++ b/test/function/81.c @@ -45,8 +45,7 @@ static void test(void *stack_pointer) (mps_addr_t*)&exfmt_root, 1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/83.c b/test/function/83.c index b230c9c0e4..dc41143ab2 100644 --- a/test/function/83.c +++ b/test/function/83.c @@ -60,7 +60,7 @@ static void test(void *stack_pointer) die(mps_root_create_table(&root, arena, mps_rank_ambig(), 0, &temp_root, 1), "create temp root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool1, arena, mps_class_amc(), format, chain), diff --git a/test/function/9.c b/test/function/9.c index b22de20a65..7395782025 100644 --- a/test/function/9.c +++ b/test/function/9.c @@ -35,9 +35,7 @@ static void test(void *stack_pointer) cdie(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); cdie(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/96.c b/test/function/96.c index dd44b51a38..6ece0d3514 100644 --- a/test/function/96.c +++ b/test/function/96.c @@ -73,7 +73,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1,arena,mps_rank_ambig(),0,addr,1), "create table root"); - cdie(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amc(), format, chain), diff --git a/test/function/97.c b/test/function/97.c index c6f0ff24b8..19782ee49d 100644 --- a/test/function/97.c +++ b/test/function/97.c @@ -187,9 +187,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1, arena, mps_rank_ambig(), 0, addr, 4), "create b root table"); - cdie( - mps_fmt_create_A(&format, arena, &fmtA), - "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); diff --git a/test/function/99.c b/test/function/99.c index 8a576a6187..e556f08371 100644 --- a/test/function/99.c +++ b/test/function/99.c @@ -45,7 +45,7 @@ static void test(void *stack_pointer) mps_root_create_table(&root1,arena,mps_rank_ambig(),0,&exfmt_root,1), "create table root"); - die(mps_fmt_create_A(&format, arena, &fmtA), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&poolamc, arena, mps_class_amc(), format, chain), diff --git a/test/test/testlib/awlfmt.c b/test/test/testlib/awlfmt.c index 0977d0de6d..7edd8b5d4d 100644 --- a/test/test/testlib/awlfmt.c +++ b/test/test/testlib/awlfmt.c @@ -31,7 +31,6 @@ enum SCANOBJ_COUNT, /* = #objects scanned (real ones, that is) */ SCANPAD_COUNT, /* = #pads scanned */ SCANHEART_COUNT, - COPY_COUNT, SKIP_COUNT, FWD_COUNT, ISFWD_COUNT, @@ -45,7 +44,6 @@ int counters[PAD_COUNT+1]; int prevcounters[PAD_COUNT+1]; int maxcounters[PAD_COUNT+1] = {0}; -static long int maxcopy = 0; static int freeze=0; /* The AWL pool makes certain assumptions about the object format, @@ -103,20 +101,21 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtA = +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena) { - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; - + mps_res_t res; + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + res = mps_fmt_create_k(fmt_o, arena, args); + } MPS_ARGS_END(args); + return res; +} /* in the following, size is the number of refs you want the allocated object to have @@ -144,7 +143,6 @@ mycell *allocdumb(mps_ap_t ap, size_t size, int countflag) q->data.tag = (mps_word_t) wrapper; q->data.assoc = NULL; q->data.id = nextid; - q->data.copycount = 0; q->data.numrefs = 0; q->data.checkedflag = 0; q->data.countflag = countflag; @@ -181,7 +179,6 @@ mycell *allocone(mps_ap_t ap, int size, int countflag) q->data.tag = MCdata + (mps_word_t) wrapper; q->data.assoc = NULL; q->data.id = nextid; - q->data.copycount = 0; q->data.numrefs = size; q->data.checkedflag = 0; q->data.countflag = countflag; @@ -296,32 +293,6 @@ static mps_addr_t myskip(mps_addr_t object) } } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; - mycell *toj = to; - - asserts(boj->tag == MCdata + (mps_word_t) wrapper, - "copy: non-data object"); - - INCCOUNTIF(boj->data.countflag, COPY_COUNT); - commentif(formatcomments, "copy: %li: %p -> %p\n", - boj->data.id, object, to); - -/* this line would be bad, because the objects might overlap, - and then C doesn't guarantee to do the right thing! - - *toj = *boj; -*/ - - memmove(to, object, boj->data.size); - if (!freeze) - { - toj->data.copycount = (toj->data.copycount)+1; - if (toj->data.copycount > maxcopy) maxcopy = toj->data.copycount; - } -} - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ @@ -420,13 +391,6 @@ long int getid(mycell *obj) return obj->data.id; } -long int getcopycount(mycell *obj) -{ - asserts(obj->tag == MCdata + (mps_word_t) wrapper, - "getcopycount: non-data object."); - return obj->data.copycount; -} - long int getsize(mycell *obj) { asserts(obj->tag == MCdata + (mps_word_t) wrapper, @@ -507,7 +471,6 @@ void resetcounters(void) prevcounters[i]=0; maxcounters[i]=0; } - maxcopy = 0; } void updatecounters(void) @@ -542,7 +505,6 @@ void displaycounters(void) d_c(SCANOBJ_COUNT, "object scans"); d_c(SCANHEART_COUNT, "heart scans"); d_c(SCANPAD_COUNT, "pad scans"); - d_c(COPY_COUNT, "copys"); d_c(SKIP_COUNT, "skips"); d_c(FWD_COUNT, "fwds"); d_c(ISFWD_COUNT, "isfwds"); @@ -561,7 +523,6 @@ void displaymaxcounters(void) d_mc(SCANOBJ_COUNT, "object scans"); d_mc(SCANHEART_COUNT, "heart scans"); d_mc(SCANPAD_COUNT, "pad scans"); - d_mc(COPY_COUNT, "copys"); d_mc(SKIP_COUNT, "skips"); d_mc(FWD_COUNT, "fwds"); d_mc(ISFWD_COUNT, "isfwds"); @@ -570,6 +531,4 @@ void displaymaxcounters(void) d_mc(DYING_REFERENCE_COUNT, "references fixed to NULL"); d_mc(PAD_COUNT, "pads"); comment("--------"); - comment("max copies of a single object: %li.", maxcopy); - comment("--------"); } diff --git a/test/test/testlib/awlfmt.h b/test/test/testlib/awlfmt.h index 3947e470e2..e0b66a6549 100644 --- a/test/test/testlib/awlfmt.h +++ b/test/test/testlib/awlfmt.h @@ -45,7 +45,6 @@ struct data mycell *assoc; size_t size; long int id; - long int copycount; long int numrefs; int checkedflag; int countflag; @@ -60,7 +59,7 @@ union mycell struct data data; }; -extern struct mps_fmt_A_s fmtA; +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena); mycell *allocone(mps_ap_t ap, int size, int countflag); mycell *allocdumb(mps_ap_t ap, size_t bytes, int countflag); @@ -71,7 +70,6 @@ void setref(mycell *obj, int n, mycell *to); mycell *getref(mycell *obj, int n); long int getid(mycell *obj); -long int getcopycount(mycell *obj); long int getsize(mycell *obj); void checkfrom(mycell *obj); diff --git a/test/test/testlib/exfmt.c b/test/test/testlib/exfmt.c index 2b2678834a..4aa4e237e6 100644 --- a/test/test/testlib/exfmt.c +++ b/test/test/testlib/exfmt.c @@ -32,7 +32,6 @@ int counters[PAD_COUNT+1] = {0}; int prevcounters[PAD_COUNT+1] = {0}; int maxcounters[PAD_COUNT+1] = {0}; -long int maxcopy = 0; int freeze=0; /* The AWL pool makes certain assumptions about the object format, @@ -92,19 +91,21 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtA = +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena) { - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; + mps_res_t res; + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + res = mps_fmt_create_k(fmt_o, arena, args); + } MPS_ARGS_END(args); + return res; +} /* in the following, size is the number of refs you want the allocated object to have @@ -131,7 +132,6 @@ mycell *allocdumb(mps_ap_t ap, size_t size, int countflag) q->data.tag = (mps_word_t) wrapper; q->data.assoc = NULL; q->data.id = nextid; - q->data.copycount = 0; q->data.numrefs = 0; q->data.checkedflag = 0; q->data.countflag = countflag; @@ -167,7 +167,6 @@ mycell *allocone(mps_ap_t ap, int size, int countflag) q->data.tag = MCdata + (mps_word_t) wrapper; q->data.assoc = NULL; q->data.id = nextid; - q->data.copycount = 0; q->data.numrefs = size; q->data.checkedflag = 0; q->data.countflag = countflag; @@ -282,32 +281,6 @@ static mps_addr_t myskip(mps_addr_t object) } } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; - mycell *toj = to; - - asserts(boj->tag == MCdata + (mps_word_t) wrapper, - "copy: non-data object"); - - INCCOUNTIF(boj->data.countflag, COPY_COUNT); - commentif(formatcomments, "copy: %li: %p -> %p\n", - boj->data.id, object, to); - -/* this line would be bad, because the objects might overlap, - and then C doesn't guarantee to do the right thing! - - *toj = *boj; -*/ - - memmove(to, object, boj->data.size); - if (!freeze) - { - toj->data.copycount = (toj->data.copycount)+1; - if (toj->data.copycount > maxcopy) maxcopy = toj->data.copycount; - } -} - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ @@ -406,13 +379,6 @@ long int getid(mycell *obj) return obj->data.id; } -long int getcopycount(mycell *obj) -{ - asserts(obj->tag == MCdata + (mps_word_t) wrapper, - "getcopycount: non-data object."); - return obj->data.copycount; -} - long int getsize(mycell *obj) { asserts(obj->tag == MCdata + (mps_word_t) wrapper, @@ -493,7 +459,6 @@ void resetcounters(void) prevcounters[i]=0; maxcounters[i]=0; } - maxcopy = 0; } void updatecounters(void) @@ -528,7 +493,6 @@ void displaycounters(void) d_c(SCANOBJ_COUNT, "object scans"); d_c(SCANHEART_COUNT, "heart scans"); d_c(SCANPAD_COUNT, "pad scans"); - d_c(COPY_COUNT, "copys"); d_c(SKIP_COUNT, "skips"); d_c(FWD_COUNT, "fwds"); d_c(ISFWD_COUNT, "isfwds"); @@ -547,7 +511,6 @@ void displaymaxcounters(void) d_mc(SCANOBJ_COUNT, "object scans"); d_mc(SCANHEART_COUNT, "heart scans"); d_mc(SCANPAD_COUNT, "pad scans"); - d_mc(COPY_COUNT, "copys"); d_mc(SKIP_COUNT, "skips"); d_mc(FWD_COUNT, "fwds"); d_mc(ISFWD_COUNT, "isfwds"); @@ -556,7 +519,5 @@ void displaymaxcounters(void) d_mc(DYING_REFERENCE_COUNT, "references fixed to NULL"); d_mc(PAD_COUNT, "pads"); comment("--------"); - comment("max copies of a single object: %li.", maxcopy); - comment("--------"); } diff --git a/test/test/testlib/exfmt.h b/test/test/testlib/exfmt.h index 2faa392cbb..04d0629889 100644 --- a/test/test/testlib/exfmt.h +++ b/test/test/testlib/exfmt.h @@ -37,7 +37,6 @@ enum { SCANOBJ_COUNT, /* = read objects scanned */ SCANPAD_COUNT, /* = pads scanned */ SCANHEART_COUNT, /* = hearts scanned */ - COPY_COUNT, SKIP_COUNT, FWD_COUNT, ISFWD_COUNT, @@ -51,7 +50,6 @@ extern int counters[PAD_COUNT+1]; extern int prevcounters[PAD_COUNT+1]; extern int maxcounters[PAD_COUNT+1]; -long int maxcopy; int freeze; /* the object format is visible so tests that want to @@ -82,7 +80,6 @@ struct data mycell *assoc; size_t size; long int id; - long int copycount; long int numrefs; int checkedflag; int countflag; @@ -97,7 +94,7 @@ union mycell struct data data; }; -extern struct mps_fmt_A_s fmtA; +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena); mycell *allocone(mps_ap_t ap, int size, int countflag); mycell *allocdumb(mps_ap_t ap, size_t bytes, int countflag); @@ -108,7 +105,6 @@ void setref(mycell *obj, int n, mycell *to); mycell *getref(mycell *obj, int n); long int getid(mycell *obj); -long int getcopycount(mycell *obj); long int getsize(mycell *obj); void checkfrom(mycell *obj); diff --git a/test/test/testlib/fastfmt.c b/test/test/testlib/fastfmt.c index dcc01d494d..418a5bd8ce 100644 --- a/test/test/testlib/fastfmt.c +++ b/test/test/testlib/fastfmt.c @@ -40,19 +40,21 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtA = +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena) { - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; + mps_res_t res; + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + res = mps_fmt_create_k(fmt_o, arena, args); + } MPS_ARGS_END(args); + return res; +} /* in the following, size is the number of refs you want the allocated object to have @@ -78,7 +80,6 @@ mycell *allocdumb(mps_ap_t ap, size_t size, mps_rank_t rank) q->data.tag = (mps_word_t) wrapper; q->data.assoc = NULL; q->data.id = nextid; - q->data.copycount = 0; q->data.numrefs = 0; q->data.checkedflag = 0; q->data.rank = rank; @@ -111,7 +112,6 @@ mycell *allocone(mps_ap_t ap, int size, mps_rank_t rank) q->data.tag = MCdata + (mps_word_t) wrapper; q->data.assoc = NULL; q->data.id = nextid; - q->data.copycount = 0; q->data.numrefs = size; q->data.checkedflag = 0; q->data.rank = rank; @@ -198,13 +198,6 @@ static mps_addr_t myskip(mps_addr_t object) } } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; - - memmove(to, object, boj->data.size); -} - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ diff --git a/test/test/testlib/fastfmt.h b/test/test/testlib/fastfmt.h index c2330ff2c8..7faea3ac13 100644 --- a/test/test/testlib/fastfmt.h +++ b/test/test/testlib/fastfmt.h @@ -40,7 +40,6 @@ struct data mycell *assoc; size_t size; long int id; - long int copycount; long int numrefs; int checkedflag; mps_rank_t rank; @@ -55,7 +54,7 @@ union mycell struct data data; }; -extern struct mps_fmt_A_s fmtA; +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena); mycell *allocone(mps_ap_t ap, int size, mps_rank_t rank); mycell *allocdumb(mps_ap_t ap, size_t bytes, mps_rank_t rank); diff --git a/test/test/testlib/lofmt.c b/test/test/testlib/lofmt.c index 35567c8f31..c93ac68d16 100644 --- a/test/test/testlib/lofmt.c +++ b/test/test/testlib/lofmt.c @@ -32,19 +32,21 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtLO = +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena) { - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; + mps_res_t res; + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + res = mps_fmt_create_k(fmt_o, arena, args); + } MPS_ARGS_END(args); + return res; +} /* in the following, size is the size_t of the data element of the lodata structure you want the object to have; i.e. @@ -70,7 +72,6 @@ locell *alloclo(mps_ap_t ap, size_t size) { q=p; q->data.tag = LOdata; q->data.id = nextid; - q->data.copycount = 0; q->data.size = bytes; } while (!mps_commit(ap, p, bytes)); @@ -104,18 +105,6 @@ static mps_addr_t myskip(mps_addr_t object) { } } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - locell *boj = object; - locell *toj = to; - - asserts(allowlocopies, "locopy on LO object"); - asserts(boj->tag == LOdata, "locopy: non-data object"); - - memmove(to, object, boj->data.size); - toj->data.copycount = (toj->data.copycount)+1; -} - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ @@ -180,12 +169,6 @@ long int getloid(locell *obj) return obj->data.id; } -long int getlocopycount(locell *obj) -{ - asserts(obj->tag == LOdata, "getlocopycount: non-data object."); - return obj->data.copycount; -} - size_t getlosize(locell *obj) { asserts(obj->tag == LOdata, "getlosize: non-data object."); diff --git a/test/test/testlib/lofmt.h b/test/test/testlib/lofmt.h index e8e2c17d02..9003b8cf3c 100644 --- a/test/test/testlib/lofmt.h +++ b/test/test/testlib/lofmt.h @@ -1,7 +1,7 @@ /* $Id$ lofmt.h - A format for the LO pool class. We have to allow for copying - and forwarding, but scan should never be called. + A format for the LO pool class. We have to allow for forwarding, + but scan should never be called. */ #ifndef lofmt_h @@ -36,7 +36,6 @@ struct lodata tag tag; size_t size; long int id; - long int copycount; size_t len; char data[MAXSIZE]; }; @@ -50,12 +49,11 @@ union locell struct lodata data; }; -extern struct mps_fmt_A_s fmtLO; +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena); locell *alloclo(mps_ap_t ap, size_t bytes); long int getloid(locell *obj); -long int getlocopycount(locell *obj); size_t getlosize(locell *obj); #endif diff --git a/test/test/testlib/myfmt.c b/test/test/testlib/myfmt.c index 385d01fa3c..f6c6ce6183 100644 --- a/test/test/testlib/myfmt.c +++ b/test/test/testlib/myfmt.c @@ -14,54 +14,39 @@ enum {MCpadsingle, MCpadmany, MCheart, MCdata}; variable default function - formatcomments 1 print comments on scanning, fixing, copying - copysurplus 1 copy the surplus space in objects when moving - + formatcomments 1 print comments on scanning, fixing */ int formatcomments=1; -int copysurplus=1; /* we don't have a separate type for leaf nodes; instead the scanning function doesn't fix null refs - - the words after ref[1] are copied by mycopy, - (so you can use them to store data) as long as copysurplus=1 */ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtA = +mps_res_t make_format_header(mps_fmt_t *fmt_o, mps_arena_t arena, size_t header) { - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; - -void fmtargs(mps_arg_s args[MPS_ARGS_MAX]) + mps_res_t res; + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + MPS_ARGS_ADD(args, MPS_KEY_FMT_HEADER_SIZE, header); + res = mps_fmt_create_k(fmt_o, arena, args); + } MPS_ARGS_END(args); + return res; +} + +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena) { - args[0].key = MPS_KEY_ALIGN; - args[0].val.align = MPS_PF_ALIGN; - args[1].key = MPS_KEY_FMT_SCAN; - args[1].val.fmt_scan = myscan; - args[2].key = MPS_KEY_FMT_SKIP; - args[2].val.fmt_skip = myskip; - args[3].key = MPS_KEY_FMT_FWD; - args[3].val.fmt_fwd = myfwd; - args[4].key = MPS_KEY_FMT_ISFWD; - args[4].val.fmt_isfwd = myisfwd; - args[5].key = MPS_KEY_FMT_PAD; - args[5].val.fmt_pad = mypad; - args[6].key = MPS_KEY_ARGS_END; + return make_format_header(fmt_o, arena, 0); } mycell *allocheader(mps_ap_t ap, mps_word_t data, @@ -171,37 +156,6 @@ mps_addr_t myskip(mps_addr_t object) } } -void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; -/* mycell *toj = to; -*/ - - commentif(formatcomments, "copy! %p -> %p\n", object, to); - -/* this line is bad, because the objects might overlap, - and then C doesn't guarantee to do the right thing! - - *toj = *boj; -*/ - - asserts(boj->tag == MCdata, "Bad object tag in copy"); - - if (copysurplus) - { - memmove(to, object, boj->size); - } - else - { - memmove(to, object, sizeof(mycell)); - } - -/* it's guaranteed that we won't have to copy a pad, so we - don't have to worry about fiddling the pointer -*/ - -} - void mypad(mps_addr_t base, size_t size) { mycell *obj = base; diff --git a/test/test/testlib/myfmt.h b/test/test/testlib/myfmt.h index 87db53e4e5..fd743f1cce 100644 --- a/test/test/testlib/myfmt.h +++ b/test/test/testlib/myfmt.h @@ -14,13 +14,10 @@ myfmt.h variable default function - formatcomments 1 print comments on scanning, fixing, copying - copysurplus 1 copy the surplus space in objects when moving - + formatcomments 1 print comments on scanning, fixing */ extern int formatcomments; -extern int copysurplus; typedef struct mycell { @@ -32,19 +29,15 @@ typedef struct mycell /* we don't have a separate type for leaf nodes; instead the scanning function doesn't fix null refs - - the words after ref[1] are copied by mycopy, - (so you can use them to store data) as long as copysurplus=1 */ -extern struct mps_fmt_A_s fmtA; - mycell *allocone(mps_ap_t ap, mps_word_t data, mycell *ref0, mycell *ref1, size_t size); mycell *allocheader(mps_ap_t ap, mps_word_t data, mycell *ref0, mycell *ref1, size_t size, size_t header); -void fmtargs(mps_arg_s args[MPS_ARGS_MAX]); +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena); +mps_res_t make_format_header(mps_fmt_t *fmt_o, mps_arena_t arena, size_t header); #endif diff --git a/test/test/testlib/newfmt.c b/test/test/testlib/newfmt.c index 0ccc35a555..587fca66de 100644 --- a/test/test/testlib/newfmt.c +++ b/test/test/testlib/newfmt.c @@ -13,7 +13,7 @@ newfmt.c variable default function - formatcomments 1 print comments on scanning, fixing, copying + formatcomments 1 print comments on scanning, fixing checkcomments 1 print comments on checking */ @@ -35,7 +35,6 @@ enum SCANPS_COUNT, /* = #pad singles scanned */ SCANPM_COUNT, /* etc ... */ SCANHEART_COUNT, - COPY_COUNT, SKIP_COUNT, FWD_COUNT, ISFWD_COUNT, @@ -49,7 +48,6 @@ int counters[PAD_MULTI_COUNT+1]; int prevcounters[PAD_MULTI_COUNT+1]; int maxcounters[PAD_MULTI_COUNT+1] = {0}; -static long int maxcopy = 0; static int freeze=0; #define INCCOUNT(c) do {if(!freeze) counters[c]+=1;} while (0) @@ -78,19 +76,21 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); -struct mps_fmt_A_s fmtA = +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena) { - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; + mps_res_t res; + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + res = mps_fmt_create_k(fmt_o, arena, args); + } MPS_ARGS_END(args); + return res; +} /* in the following, size is the number of refs you want the allocated object to have @@ -117,7 +117,6 @@ mycell *allocdumb(mps_ap_t ap, size_t size) q=p; q->data.tag = MCdata; q->data.id = nextid; - q->data.copycount = 0; q->data.numrefs = 0; q->data.checkedflag = 0; q->data.size = bytes; @@ -152,7 +151,6 @@ mycell *allocone(mps_ap_t ap, int size) q=p; q->data.tag = MCdata; q->data.id = nextid; - q->data.copycount = 0; q->data.numrefs = size; q->data.checkedflag = 0; q->data.size = bytes; @@ -251,31 +249,6 @@ static mps_addr_t myskip(mps_addr_t object) } } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; - mycell *toj = to; - - asserts(boj->tag == MCdata, "copy: non-data object"); - - INCCOUNT(COPY_COUNT); - commentif(formatcomments, "copy: %li: %p -> %p\n", - boj->data.id, object, to); - -/* this line would be bad, because the objects might overlap, - and then C doesn't guarantee to do the right thing! - - *toj = *boj; -*/ - - memmove(to, object, boj->data.size); - if (!freeze) - { - toj->data.copycount = (toj->data.copycount)+1; - if (toj->data.copycount > maxcopy) maxcopy = toj->data.copycount; - } -} - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ @@ -379,12 +352,6 @@ long int getid(mycell *obj) return obj->data.id; } -long int getcopycount(mycell *obj) -{ - asserts(obj->tag == MCdata, "getcopycount: non-data object."); - return obj->data.copycount; -} - long int getsize(mycell *obj) { asserts(obj->tag == MCdata, "getsize: non-data object."); @@ -460,7 +427,6 @@ void resetcounters(void) prevcounters[i]=0; maxcounters[i]=0; } - maxcopy = 0; } void updatecounters(void) @@ -496,7 +462,6 @@ void displaycounters(void) d_c(SCANHEART_COUNT, "heart scans"); d_c(SCANPS_COUNT, "pad scans (single word)"); d_c(SCANPM_COUNT, "pad scans (multi word)"); - d_c(COPY_COUNT, "copys"); d_c(SKIP_COUNT, "skips"); d_c(FWD_COUNT, "fwds"); d_c(ISFWD_COUNT, "isfwds"); @@ -516,7 +481,6 @@ void displaymaxcounters(void) d_mc(SCANHEART_COUNT, "heart scans"); d_mc(SCANPS_COUNT, "pad scans (single word)"); d_mc(SCANPM_COUNT, "pad scans (multi word)"); - d_mc(COPY_COUNT, "copys"); d_mc(SKIP_COUNT, "skips"); d_mc(FWD_COUNT, "fwds"); d_mc(ISFWD_COUNT, "isfwds"); @@ -525,7 +489,5 @@ void displaymaxcounters(void) d_mc(PAD_SINGLE_COUNT, "pads (single word)"); d_mc(PAD_MULTI_COUNT, "pads (multi word)"); comment("--------"); - comment("max copies of a single object: %li.", maxcopy); - comment("--------"); } diff --git a/test/test/testlib/newfmt.h b/test/test/testlib/newfmt.h index 66a2e51b69..0b506f1202 100644 --- a/test/test/testlib/newfmt.h +++ b/test/test/testlib/newfmt.h @@ -44,7 +44,6 @@ struct data tag tag; size_t size; long int id; - long int copycount; long int numrefs; int checkedflag; struct refitem {mycell *addr; long int id;} ref[MAXSIZE]; @@ -59,7 +58,7 @@ union mycell struct data data; }; -extern struct mps_fmt_A_s fmtA; +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena); mycell *allocone(mps_ap_t ap, int size); mycell *allocdumb(mps_ap_t ap, size_t bytes); @@ -70,7 +69,6 @@ void setref(mycell *obj, int n, mycell *to); mycell *getref(mycell *obj, int n); long int getid(mycell *obj); -long int getcopycount(mycell *obj); long int getsize(mycell *obj); void checkfrom(mycell *obj); diff --git a/test/test/testlib/rankfmt.c b/test/test/testlib/rankfmt.c index 9f9e4eb50f..58afcc1f31 100644 --- a/test/test/testlib/rankfmt.c +++ b/test/test/testlib/rankfmt.c @@ -32,7 +32,6 @@ int counters[PAD_COUNT+1] = {0}; int prevcounters[PAD_COUNT+1] = {0}; int maxcounters[PAD_COUNT+1] = {0}; -long int maxcopy = 0; int freeze=0; @@ -96,20 +95,21 @@ static mps_res_t myscan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit); static mps_addr_t myskip(mps_addr_t object); static void myfwd(mps_addr_t object, mps_addr_t to); static mps_addr_t myisfwd(mps_addr_t object); -static void mycopy(mps_addr_t object, mps_addr_t to); static void mypad(mps_addr_t base, size_t size); - -struct mps_fmt_A_s fmtA = +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena) { - MPS_PF_ALIGN, - &myscan, - &myskip, - &mycopy, - &myfwd, - &myisfwd, - &mypad -}; + mps_res_t res; + MPS_ARGS_BEGIN(args) { + MPS_ARGS_ADD(args, MPS_KEY_FMT_SCAN, myscan); + MPS_ARGS_ADD(args, MPS_KEY_FMT_SKIP, myskip); + MPS_ARGS_ADD(args, MPS_KEY_FMT_FWD, myfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_ISFWD, myisfwd); + MPS_ARGS_ADD(args, MPS_KEY_FMT_PAD, mypad); + res = mps_fmt_create_k(fmt_o, arena, args); + } MPS_ARGS_END(args); + return res; +} /* in the following, size is the number of refs you want @@ -140,7 +140,6 @@ mps_res_t allocrdumb(mycell **rvar, mps_ap_t ap, q->data.tag = (mps_word_t) wrapper; q->data.assoc = NULL; q->data.id = nextid; - q->data.copycount = 0; q->data.numrefs = 0; q->data.checkedflag = 0; q->data.rank = rank; @@ -190,7 +189,6 @@ mps_res_t allocrone(mycell **rvar, mps_ap_t ap, int size, mps_rank_t rank) { q->data.tag = MCdata + (mps_word_t) wrapper; q->data.assoc = NULL; q->data.id = nextid; - q->data.copycount = 0; q->data.numrefs = size; q->data.checkedflag = 0; q->data.rank = rank; @@ -333,33 +331,6 @@ static mps_addr_t myskip(mps_addr_t object) } -static void mycopy(mps_addr_t object, mps_addr_t to) -{ - mycell *boj = object; - mycell *toj = to; - - asserts(boj->tag == MCdata + (mps_word_t) wrapper, - "copy: non-data object"); - - INCCOUNT(COPY_COUNT); - commentif(formatcomments, "copy: %li: %p -> %p\n", - boj->data.id, object, to); - - /* this line would be bad, because the objects might overlap, - and then C doesn't guarantee to do the right thing! - - *toj = *boj; - */ - - memmove(to, object, boj->data.size); - if (!freeze) - { - toj->data.copycount = (toj->data.copycount)+1; - if (toj->data.copycount > maxcopy) maxcopy = toj->data.copycount; - } -} - - /* pad stores not its size but a pointer to the next object, because we know we'll never be asked to copy it */ @@ -465,14 +436,6 @@ long int getid(mycell *obj) } -long int getcopycount(mycell *obj) -{ - asserts(obj->tag == MCdata + (mps_word_t) wrapper, - "getcopycount: non-data object."); - return obj->data.copycount; -} - - long int getsize(mycell *obj) { asserts(obj->tag == MCdata + (mps_word_t) wrapper, @@ -556,7 +519,6 @@ void resetcounters(void) prevcounters[i]=0; maxcounters[i]=0; } - maxcopy = 0; } @@ -594,7 +556,6 @@ void displaycounters(void) d_c(SCANOBJ_COUNT, "object scans"); d_c(SCANHEART_COUNT, "heart scans"); d_c(SCANPAD_COUNT, "pad scans"); - d_c(COPY_COUNT, "copys"); d_c(SKIP_COUNT, "skips"); d_c(FWD_COUNT, "fwds"); d_c(ISFWD_COUNT, "isfwds"); @@ -614,7 +575,6 @@ void displaymaxcounters(void) d_mc(SCANOBJ_COUNT, "object scans"); d_mc(SCANHEART_COUNT, "heart scans"); d_mc(SCANPAD_COUNT, "pad scans"); - d_mc(COPY_COUNT, "copys"); d_mc(SKIP_COUNT, "skips"); d_mc(FWD_COUNT, "fwds"); d_mc(ISFWD_COUNT, "isfwds"); @@ -623,6 +583,4 @@ void displaymaxcounters(void) d_mc(DYING_REFERENCE_COUNT, "references fixed to NULL"); d_mc(PAD_COUNT, "pads"); comment("--------"); - comment("max copies of a single object: %li.", maxcopy); - comment("--------"); } diff --git a/test/test/testlib/rankfmt.h b/test/test/testlib/rankfmt.h index 575df998ac..a2cadaad01 100644 --- a/test/test/testlib/rankfmt.h +++ b/test/test/testlib/rankfmt.h @@ -38,7 +38,6 @@ enum { SCANOBJ_COUNT, /* = read objects scanned */ SCANPAD_COUNT, /* = pads scanned */ SCANHEART_COUNT, /* = hearts scanned */ - COPY_COUNT, SKIP_COUNT, FWD_COUNT, ISFWD_COUNT, @@ -53,7 +52,6 @@ extern int prevcounters[PAD_COUNT+1]; extern int maxcounters[PAD_COUNT+1]; -long int maxcopy; int freeze; @@ -90,7 +88,6 @@ struct data mycell *assoc; size_t size; long int id; - long int copycount; long int numrefs; int checkedflag; mps_rank_t rank; @@ -106,9 +103,7 @@ union mycell struct data data; }; - -extern struct mps_fmt_A_s fmtA; - +mps_res_t make_format(mps_fmt_t *fmt_o, mps_arena_t arena); mycell *allocone(mps_ap_t ap, int size, mps_rank_t rank); mycell *allocdumb(mps_ap_t ap, size_t bytes, mps_rank_t rank); @@ -123,7 +118,6 @@ void setref(mycell *obj, int n, mycell *to); mycell *getref(mycell *obj, int n); long int getid(mycell *obj); -long int getcopycount(mycell *obj); long int getsize(mycell *obj); From 8b23fbc796101d5668a068238711c6efe95f11a1 Mon Sep 17 00:00:00 2001 From: Richard Brooksby Date: Thu, 26 Jan 2023 16:23:26 +0000 Subject: [PATCH 2/3] Fixing up unused symbol warnings found during review . --- test/argerr/146.c | 1 - test/argerr/147.c | 1 - test/argerr/148.c | 1 - test/function/104.c | 2 +- test/function/24.c | 5 ----- test/function/97.c | 2 +- 6 files changed, 2 insertions(+), 10 deletions(-) diff --git a/test/argerr/146.c b/test/argerr/146.c index c191236540..c6ca4d7870 100644 --- a/test/argerr/146.c +++ b/test/argerr/146.c @@ -63,7 +63,6 @@ int counters[PAD_MULTI_COUNT+1]; int prevcounters[PAD_MULTI_COUNT+1]; int maxcounters[PAD_MULTI_COUNT+1] = {0}; -static long int maxcopy = 0; static int freeze=0; #define INCCOUNT(c) if(!freeze) counters[c]+=1 diff --git a/test/argerr/147.c b/test/argerr/147.c index 2098aa8657..63c6f19a4e 100644 --- a/test/argerr/147.c +++ b/test/argerr/147.c @@ -63,7 +63,6 @@ int counters[PAD_MULTI_COUNT+1]; int prevcounters[PAD_MULTI_COUNT+1]; int maxcounters[PAD_MULTI_COUNT+1] = {0}; -static long int maxcopy = 0; static int freeze=0; #define INCCOUNT(c) if(!freeze) counters[c]+=1 diff --git a/test/argerr/148.c b/test/argerr/148.c index 4da18a0f0f..38c2e86322 100644 --- a/test/argerr/148.c +++ b/test/argerr/148.c @@ -63,7 +63,6 @@ int counters[PAD_MULTI_COUNT+1]; int prevcounters[PAD_MULTI_COUNT+1]; int maxcounters[PAD_MULTI_COUNT+1] = {0}; -static long int maxcopy = 0; static int freeze=0; #define INCCOUNT(c) if(!freeze) counters[c]+=1 diff --git a/test/function/104.c b/test/function/104.c index 576df0569f..171bd6392b 100644 --- a/test/function/104.c +++ b/test/function/104.c @@ -120,7 +120,7 @@ static mps_res_t area_scan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit, void { mycell *obj = base; mps_res_t res; - mps_addr_t p, q; + mps_addr_t p; switch (obj->tag & 0x3) { diff --git a/test/function/24.c b/test/function/24.c index c46a82aabe..0c263c1a13 100644 --- a/test/function/24.c +++ b/test/function/24.c @@ -28,11 +28,6 @@ static mps_addr_t myskip(mps_addr_t object) return (mps_addr_t) ((char *) object + OBJSIZE); } -static mps_addr_t myisfwd(mps_addr_t object) -{ - return NULL; -} - static void test(void *stack_pointer) { mps_arena_t arena; diff --git a/test/function/97.c b/test/function/97.c index 19782ee49d..fea44bdc9e 100644 --- a/test/function/97.c +++ b/test/function/97.c @@ -118,7 +118,7 @@ static mps_res_t area_scan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit, void { mycell *obj = base; mps_res_t res; - mps_addr_t p, q; + mps_addr_t p; switch (obj->tag & 0x3) { From 7d91d2ecad78a149d8147781784753e29ee06188 Mon Sep 17 00:00:00 2001 From: Richard Brooksby Date: Thu, 26 Jan 2023 16:57:11 +0000 Subject: [PATCH 3/3] Fixing build and link error in test/function/106.c as part of review . --- test/function/106.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/function/106.c b/test/function/106.c index 7f091dc4d8..39c9abe7a8 100644 --- a/test/function/106.c +++ b/test/function/106.c @@ -78,7 +78,7 @@ static void test(void *stack_pointer) die(mps_thread_reg(&thread, arena), "register thread"); cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); - cdie(make_format_header(&format, arena), "create format"); + cdie(make_format(&format, arena), "create format"); cdie(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create"); die(mmqa_pool_create_chain(&pool, arena, mps_class_amcz(), format, chain),