mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-21 03:52:16 -08:00
Try to hack chains
Copied from Perforce Change: 21652 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
c2099483c0
commit
cfbfa40598
1 changed files with 48 additions and 18 deletions
|
|
@ -1,30 +1,24 @@
|
|||
/* $HopeName: MMQA_harness!testlib:versind.h(trunk.9) $
|
||||
versind.h
|
||||
This file used to read header files depending on the
|
||||
value of the MPS_INTERFACE_VERSION parameter (aka MMQA_VERS_XX).
|
||||
Now it works using MMQA_SYMBOL_xxx tests.
|
||||
/* $HopeName: MMQA_harness!testlib:versind.h(trunk.10) $
|
||||
*
|
||||
* If you define mps_ symbols here, you also need to list them in
|
||||
* MMQA_harness!testlib:assumed.
|
||||
*/
|
||||
|
||||
Almost all the existing functionality can be done just as well
|
||||
this way. The only difference is the change in parameters
|
||||
between 'oldstyle' and 'modern', which is no longer relevant.
|
||||
We don't need to test oldstyle MMs any more.
|
||||
|
||||
For the record, the old versions were:
|
||||
MO : modern -- i.e. as in thursday afternoon
|
||||
OS : oldstyle -- dylan.incr.patch.11
|
||||
GR : grotesque -- dylan.honeybee (space -> arena)
|
||||
BQ : baroque -- dylan.meadowlark (have to include mpsw3.h)
|
||||
HU : humanist -- dylan.kinglet (spare committed fund)
|
||||
*/
|
||||
|
||||
/* In release.dylan.honeybee, space was renamed arena in lots of functions
|
||||
We'll use the "destroy" functions to test which versions are available
|
||||
*/
|
||||
|
||||
#define mmqaArenaSIZE ((size_t)1<<30)
|
||||
|
||||
#ifdef MMQA_DEFINED_mps_arena_destroy
|
||||
|
||||
#ifdef MMQA_DEFINED_mps_space_destroy
|
||||
|
||||
/* bizarrely, both versions seem to be present! */
|
||||
|
||||
#else
|
||||
|
||||
/* need to define "space" variants */
|
||||
#define mps_space_clamp(a) mps_arena_clamp(a)
|
||||
#define mps_space_release(a) mps_arena_release(a)
|
||||
|
|
@ -36,10 +30,14 @@ versind.h
|
|||
#define mps_space_t mps_arena_t
|
||||
#include "mpsavm.h"
|
||||
#define mps_space_create(space) \
|
||||
mps_arena_create(space, mps_arena_class_vm(), (size_t)1<<30)
|
||||
mps_arena_create(space, mps_arena_class_vm(), )
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef MMQA_DEFINED_mps_space_destroy
|
||||
|
||||
/* need to define "arena" variants */
|
||||
#define mps_arena_clamp(a) mps_space_clamp(a)
|
||||
#define mps_arena_release(a) mps_space_release(a)
|
||||
|
|
@ -49,12 +47,17 @@ versind.h
|
|||
#define mps_arena_reserved(a) mps_space_reserved(a)
|
||||
#define mps_arena_committed(a) mps_space_committed(a)
|
||||
#define mps_arena_t mps_space_t
|
||||
|
||||
#else
|
||||
|
||||
/* Neither exists -- error! */
|
||||
#error Could find either mps_arena_destroy or mps_space_destroy
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Before release.epcore.brisling / release.dylan.kinglet
|
||||
there was no spare committed fund
|
||||
*/
|
||||
|
|
@ -73,6 +76,7 @@ versind.h
|
|||
"MPS interface versions before HU do not support the spare committed fund")
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
The following defs can't be done automatically. I don't think
|
||||
this is a problem, but here they are just in case.
|
||||
|
|
@ -88,3 +92,29 @@ versind.h
|
|||
(mps_ap_create)(a, p)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef MMQA_DEFINED_mps_chain_create
|
||||
|
||||
|
||||
#define mps_chain_t void*
|
||||
|
||||
typedef struct mps_gen_param_s {
|
||||
size_t mps_capacity;
|
||||
double mps_mortality;
|
||||
} mps_gen_param_s;
|
||||
|
||||
#define mps_chain_create(p, a, s, par) (*(p) = NULL, (void)(par), MPS_RES_OK)
|
||||
#define mps_chain_destroy(p) do {} while(0)
|
||||
|
||||
#define mmqa_pool_create_chain(pool_o, arena, class, format, chain) \
|
||||
mps_pool_create(pool_o, arena, class, format)
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
#define mmqa_pool_create_chain(pool_o, arena, class, format, chain) \
|
||||
mps_pool_create(pool_o, arena, class, format, chain)
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue