diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-21 10:26:49 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-21 10:26:49 +0000 |
commit | 3edafd46128542d863667585f9a89284fdbd1af2 (patch) | |
tree | eae463c7e1a890bc96a7e7708f07dd8997200910 /gcc/melt-runtime.h | |
parent | b4421d15da23138db8af4f299466ca64f7225ddf (diff) | |
download | gcc-3edafd46128542d863667585f9a89284fdbd1af2.tar.gz |
2011-01-21 Basile Starynkevitch <basile@starynkevitch.net>
{{the meltrunsup*.[ch] are generated and contain melt runtime
support files}}
. :: svn-ignore property: Added *.bak & *.old
* meltrunsup.h: Add new generated file, included from
melt-runtime.h.
* meltrunsup-inc.c: Add new generated file, included from
melt-runtime.c, in particular...
(MELT_DEFINE_MAPTR): remove macro.
Don't use meltspecial_st but the particular melspecial*_st names.
* melt/WorkInProgress-GenRunTime/: Remove directory.
* melt-build.tpl: Backup old meltrunsup* files as *.bak.
* melt-build.mk: Regenerate.
* melt-runtime.h: Add include of generated meltrunsup.h
Remove every old code which has been replaced by generated code.
* melt-runtime.c: Add include of generated meltrunsup-inc.c
and remove every old code which is not generated.
* melt-run.proto.h: Improve comment, telling that meltrunsup.h is
generated.
{{Regenerate}}
* melt/generated/warmelt-normal-0.c: Regenerate.
* melt/generated/warmelt-macro-0.c: Regenerate.
* melt/generated/warmelt-outobj-0.c: Regenerate.
* melt/generated/warmelt-genobj-0.c: Regenerate.
* melt/generated/warmelt-base-0.c: Regenerate.
* melt/generated/warmelt-normatch-0.c: Regenerate.
* melt/generated/warmelt-debug-0.c: Regenerate.
* melt/generated/warmelt-first-0.c: Regenerate.
* Makefile.in (MELT_H): Add generated meltrunsup.h
(melt-runtime.o): Add dependency on generated meltrunsup-inc.c
(MELT_PLUGIN_HEADERS): Add meltrunsup.h
(melt_make_cc1_dependency, gt-melt-runtime-plugin.h): Add $(MELT_H)
(upgrade-warmelt): Call melt-generate appropriately and add comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@169081 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/melt-runtime.h')
-rw-r--r-- | gcc/melt-runtime.h | 1273 |
1 files changed, 124 insertions, 1149 deletions
diff --git a/gcc/melt-runtime.h b/gcc/melt-runtime.h index f858686d928..d7c86c409e6 100644 --- a/gcc/melt-runtime.h +++ b/gcc/melt-runtime.h @@ -38,12 +38,6 @@ extern void fatal_error (const char *, ...); #define MELT_PUBLIC_VISIBILITY #endif -#define MELT_GENERATE_RUNTIME 0 - -#if MELT_GENERATE_RUNTIME -#warning MELT has some runtime generated -#endif /* MELT_GENERATE_RUNTIME*/ - /* we need PPL because some static inline functions use it below (e.g. melt_raw_new_ppl_empty_constraint_system). This is notably true for gtype-desc.c which is generated by gengtype and won't @@ -150,15 +144,79 @@ const char* melt_argument(const char* argname); /* naming convention: all struct melt*_st are inside the melt_un */ -typedef union melt_un *melt_ptr_t; -typedef struct meltobject_st *meltobject_ptr_t; -typedef struct meltmapobjects_st *meltmapobjects_ptr_t; -typedef struct meltclosure_st *meltclosure_ptr_t; -typedef struct meltroutine_st *meltroutine_ptr_t; -typedef struct meltmultiple_st *meltmultiple_ptr_t; -typedef struct meltbox_st *meltbox_ptr_t; -typedef struct meltpair_st *meltpair_ptr_t; -typedef struct meltlist_st *meltlist_ptr_t; + +union meltparam_un; /* declared in file meltrunsup.h */ + +/* used in file meltrunsup.h */ + +#ifndef melt_ptr_t_TYPEDEFINED +typedef union melt_un* melt_ptr_t ; +#define melt_ptr_t_TYPEDEFINED +#endif /*melt_ptr_t_TYPEDEFINED*/ + +/* forward declaration, return the magic of the discriminant or 0 */ +static inline int melt_magic_discr (melt_ptr_t p); + + +/* the maximal length of name of melt routines descriptions */ +#define MELT_ROUTDESCR_LEN 100 + +#ifndef meltobject_ptr_t_TYPEDEFINED +typedef struct meltobject_st* meltobject_ptr_t ; +#define meltobject_ptr_t_TYPEDEFINED +#endif /*meltobject_ptr_t_TYPEDEFINED*/ + +struct /* entry of string maps */ +GTY (()) +entrystringsmelt_st +{ + const char *GTY (()) e_at; + melt_ptr_t e_va; +}; + + +struct /* entry of object maps*/ +GTY (()) +entryobjectsmelt_st +{ + meltobject_ptr_t e_at; + melt_ptr_t e_va; +}; + +/* a union of special pointers which have to be explicitly deleted */ +union melt_special_un +{ + /* all the pointers here have to be pointers to struct or to void, + because the generated gtype-desc.c don't include all the files + which define mpfr_ptr ppl_Coefficient_t etc... */ + /* generic pointer */ void *sp_pointer; + /* stdio file */ FILE *sp_file; + /*mpfr_ptr= */ void *sp_mpfr; + /* malloced pointer to mpfr_t */ + ppl_Coefficient_t sp_coefficient; + ppl_Linear_Expression_t sp_linear_expression; + ppl_Constraint_t sp_constraint; + ppl_Constraint_System_t sp_constraint_system; + ppl_Generator_t sp_generator; + ppl_Generator_System_t sp_generator_system; + ppl_Polyhedron_t sp_polyhedron; +}; +/* make a special value; return NULL if the discriminant is not special */ + +/* actually, all meltspecial*_st structures are similar */ +#define meltspecial_st meltspecialfile_st +struct meltspecial_st*meltgc_make_special (melt_ptr_t discr_p); + +/* forwarded pointers; nobody see them except the melt copying + garbage collector */ +struct +GTY (()) +meltforward_st +{ + meltobject_ptr_t discr; /* actually always (void*)1 for forwarded */ + melt_ptr_t forward; +}; + struct debugprint_melt_st { @@ -181,6 +239,21 @@ extern int melt_debug_garbcoll; #define melt_debuggc_eprintf(Fmt,...) do{}while(0) #endif +/* also in generated meltrunsup.h */ +#ifndef meltobject_ptr_t_TYPEDEFINED +typedef struct meltobject_st* meltobject_ptr_t; +#define meltobject_ptr_t_TYPEDEFINED +#endif + +#ifndef melt_ptr_t_TYPEDEFINED +typedef union melt_un* melt_ptr_t; +#define melt_ptr_t_TYPEDEFINED +#endif + +#ifndef meltroutine_ptr_t_TYPEDEFINED +typedef struct meltroutine_st *meltroutine_ptr_t; +#define meltroutine_ptr_t_TYPEDEFINED +#endif /******************* closures, routines ************************/ @@ -188,116 +261,22 @@ extern int melt_debug_garbcoll; the routine just marks the frame passed as first argument */ #define MELTPAR_MARKGGC ((char*)(-1L)) -union meltparam_un - /* Actually, that whole union should be generated by - generate_runtypesupport_param function in warmelt-outobj.melt */ -{ - /* for melt value pointers, we pass the address of a local, to be - compatible with our copying garbage collector */ - melt_ptr_t *meltbp_aptr; /* letter p */ -#define MELTBPAR_PTR 'p' -#define MELTBPARSTR_PTR "p" - -/* we no longer have BPAR_RESTPTR as 'R' */ - - tree meltbp_tree; /* letter t */ - tree *meltbp_treeptr; /* for extra results */ -#define MELTBPAR_TREE 't' -#define MELTBPARSTR_TREE "t" - - gimple meltbp_gimple; /* letter g */ - gimple *meltbp_gimpleptr; /* for extra results */ -#define MELTBPAR_GIMPLE 'g' -#define MELTBPARSTR_GIMPLE "g" - - gimple_seq meltbp_gimpleseq; /* letter g */ - gimple_seq *meltbp_gimpleseqptr; /* for extra results */ -#define MELTBPAR_GIMPLESEQ 'G' -#define MELTBPARSTR_GIMPLESEQ "G" - - long meltbp_long; /* letter l */ - long *meltbp_longptr; /* for results */ -#define MELTBPAR_LONG 'l' -#define MELTBPARSTR_LONG "l" - - edge meltbp_edge; /* letter e */ - edge *meltbp_edgeptr; /* for results */ -#define MELTBPAR_EDGE 'e' -#define MELTBPARSTR_EDGE "e" - - basic_block meltbp_bb; /* letter b */ - basic_block *meltbp_bbptr; /* for results */ -#define MELTBPAR_BB 'b' -#define MELTBPARSTR_BB "b" - - /* readonly constant strings - not in GP nor in heap */ - const char *meltbp_cstring; /* letter s */ - const char **meltbp_cstringptr; /* for results */ -#define MELTBPAR_CSTRING 's' -#define MELTBPARSTR_CSTRING "s" - - /* PPL and special stuff are getting the upper case letters */ - /* PPL coefficients */ - ppl_Coefficient_t meltbp_ppl_coefficient; - ppl_Coefficient_t* meltbp_ppl_coefficientptr; -#define MELTBPAR_PPL_COEFFICIENT 'A' -#define MELTBPARSTR_PPL_COEFFICIENT "A" - - /* PPL constraints */ - ppl_Constraint_t meltbp_ppl_constraint; - ppl_Constraint_t* meltbp_ppl_constraintptr; -#define MELTBPAR_PPL_CONSTRAINT 'B' -#define MELTBPARSTR_PPL_CONSTRAINT "B" - - /* PPL constraint systems */ - ppl_Constraint_System_t meltbp_ppl_constraint_system; - ppl_Constraint_System_t* meltbp_ppl_constraint_systemptr; -#define MELTBPAR_PPL_CONSTRAINT_SYSTEM 'C' -#define MELTBPARSTR_PPL_CONSTRAINT_SYSTEM "C" - - /* PPL linear expressions */ - ppl_Linear_Expression_t meltbp_ppl_linear_expression; - ppl_Linear_Expression_t* meltbp_ppl_linear_expressionptr; -#define MELTBPAR_PPL_LINEAR_EXPRESSION 'D' -#define MELTBPARSTR_PPL_LINEAR_EXPRESSION "D" - - /* PPL polyhedrons */ - ppl_Polyhedron_t meltbl_ppl_polyhedron; - ppl_Polyhedron_t* meltbp_ppl_polyhedronptr; -#define MELTBPAR_PPL_POLYHEDRON 'E' -#define MELTBPARSTR_PPL_POLYHEDRON "E" - - - - /* bitmap-s */ - bitmap meltbp_bitmap; /* letter I */ - bitmap *meltbp_bitmapptr; /* for results */ -#define MELTBPAR_BITMAP 'I' -#define MELTBPARSTR_BITMAP "I" - - /* loop-s */ - struct loop *meltbp_loop; /* letter L */ - struct loop **meltbp_loopptr; /* for results */ -#define MELTBPAR_LOOP 'L' -#define MELTBPARSTR_LOOP "L" - - - /* rtx-s */ - rtx meltbp_rtx; /* letter X */ - rtx* meltbp_rtxptr; -#define MELTBPAR_RTX 'X' -#define MELTBPARSTR_RTX "X" - - - /* rtvec-s */ - rtvec meltbp_rtvec; /* letter Y */ - rtvec* meltbp_rtvecptr; -#define MELTBPAR_RTVEC 'Y' -#define MELTBPARSTR_RTVEC "Y" - -#define MELTBPAR__LAST 'Z' -#warning MELTBPAR__LAST is very temporary actually generated in meltrunsup.h -}; +/* functions needed to support the generated map accessing routines + inside meltrunsup.h */ +void *meltgc_raw_new_mappointers (meltobject_ptr_t discr_p, + unsigned len); + +void +meltgc_raw_put_mappointers (void *mappointer_p, + const void *attr, melt_ptr_t valu_p); + +melt_ptr_t +melt_raw_get_mappointers (void *mappointer_p, const void *attr); + +melt_ptr_t +meltgc_raw_remove_mappointers (void *mappointer_p, const void *attr); + + /*** the closures contain routines which are called by applying closures; each routine is called with: @@ -332,12 +311,8 @@ typedef char melt_argdescr_cell_t; /* The maximal value of above scalar types */ #define MELT_ARGDESCR_MAX CHAR_MAX -typedef melt_ptr_t meltroutfun_t (meltclosure_ptr_t closp_, - melt_ptr_t firstargp_, - const melt_argdescr_cell_t xargdescr_[], - union meltparam_un *xargtab_, - const melt_argdescr_cell_t xresdescr_[], - union meltparam_un *xrestab_); +#include "meltrunsup.h" + /* the application routine does not call the GC; of course, the applied closure can call the GC! */ @@ -353,6 +328,7 @@ melt_ptr_t melt_apply (meltclosure_ptr_t clos_p, extern long melt_application_count (void); extern long melt_application_depth (void); + /* gnu indent has some trouble with GTY hence */ /* *INDENT-OFF* */ @@ -375,95 +351,6 @@ VEC (meltobject_ptr_t, gc) typedef VEC (melt_ptr_t, gc) melt_valvec_t; -enum meltobmag_en { - MELTOBMAG__NONE = 0, - - MELTOBMAG_OBJECT = 30000, - - /* keep these in alphabetical order */ - MELTOBMAG_BASICBLOCK, - MELTOBMAG_BITMAP, - MELTOBMAG_BOX, - MELTOBMAG_CLOSURE, - MELTOBMAG_DECAY, - MELTOBMAG_EDGE, - MELTOBMAG_GIMPLE, - MELTOBMAG_GIMPLESEQ, - MELTOBMAG_INT, - MELTOBMAG_LIST, - MELTOBMAG_LOOP, - MELTOBMAG_MAPBASICBLOCKS, - MELTOBMAG_MAPBITMAPS, - MELTOBMAG_MAPEDGES, - MELTOBMAG_MAPGIMPLES, - MELTOBMAG_MAPGIMPLESEQS, - MELTOBMAG_MAPLOOPS, - MELTOBMAG_MAPOBJECTS, - MELTOBMAG_MAPRTVECS, - MELTOBMAG_MAPRTXS, - MELTOBMAG_MAPSTRINGS, - MELTOBMAG_MAPTREES, - MELTOBMAG_MIXBIGINT, - MELTOBMAG_MIXINT, - MELTOBMAG_MIXLOC, - MELTOBMAG_MULTIPLE, - MELTOBMAG_PAIR, - MELTOBMAG_REAL, - MELTOBMAG_ROUTINE, - MELTOBMAG_RTVEC, - MELTOBMAG_RTX, - MELTOBMAG_STRBUF, - MELTOBMAG_STRING, - MELTOBMAG_TREE, - - /* extra spare slots */ - MELTOBMAG__SPARE1, - MELTOBMAG__SPARE2, - MELTOBMAG__SPARE3, - MELTOBMAG__SPARE4, - MELTOBMAG__SPARE5, - MELTOBMAG__SPARE6, - MELTOBMAG__SPARE7, - MELTOBMAG__SPARE8, - MELTOBMAG__SPARE9, - MELTOBMAG__SPARE10, - MELTOBMAG__SPARE11, - MELTOBMAG__SPARE12, - MELTOBMAG__SPARE13, - MELTOBMAG__SPARE14, - MELTOBMAG__SPARE15, - MELTOBMAG__SPARE16, - MELTOBMAG__SPARE17, - MELTOBMAG__SPARE18, - MELTOBMAG__SPARE19, - MELTOBMAG__SPARE20, - MELTOBMAG__SPARE21, - MELTOBMAG__SPARE22, - MELTOBMAG__SPARE23, - MELTOBMAG__SPARE24, - MELTOBMAG__SPARE25, - MELTOBMAG__SPARE26, - MELTOBMAG__SPARE27, - MELTOBMAG__SPARE28, - MELTOBMAG__SPARE29, - MELTOBMAG__SPARE30, - MELTOBMAG__SPARE31, - - /* special, explicitly destroyed */ - MELTOBMAG_SPEC_FILE, /* closed when deleted */ - MELTOBMAG_SPEC_RAWFILE, /* not closed when deleted */ - MELTOBMAG_SPEC_MPFR, - MELTOBMAG_SPECPPL_COEFFICIENT, - MELTOBMAG_SPECPPL_LINEAR_EXPRESSION, - MELTOBMAG_SPECPPL_CONSTRAINT, - MELTOBMAG_SPECPPL_CONSTRAINT_SYSTEM, - MELTOBMAG_SPECPPL_GENERATOR, - MELTOBMAG_SPECPPL_GENERATOR_SYSTEM, - MELTOBMAG_SPECPPL_POLYHEDRON, - - MELTOBMAG__LAST -}; - /* Gives the constant string corresponding to a given object magic above. */ @@ -489,41 +376,6 @@ const char* melt_obmag_string(int i); */ -/* *INDENT-ON* */ - -/* when MELTOBMAG_OBJECT -- */ - -/* GCC 4.6 gengtype introducted the variable_size GTY attribute. But - GCC 4.5 don't have it. So every usage of variable_size is marked by - a comment on the same line as the 'GTY' and 'variable_size' words - with @@ followed by MELTGTY to help an external shell script to - convert and backport this melt-runtime.h to 4.5 habits. */ - -struct -GTY ((variable_size)) /*@@MELTGTY@@*/ -meltobject_st -{ - /* for objects, the discriminant is their class */ - meltobject_ptr_t obj_class; - unsigned obj_hash; /* hash code of the object */ - unsigned short obj_num; - unsigned short obj_len; - melt_ptr_t GTY ((length ("%h.obj_len"))) obj_vartab[FLEXIBLE_DIM]; -}; -#define meltobj_class obj_class -#define meltobj_magic obj_num - - -#define MELT_OBJECT_STRUCT(N) { \ - meltobject_ptr_t obj_class; \ - unsigned obj_hash; \ - unsigned short obj_num; \ - unsigned short obj_len; \ - melt_ptr_t* obj_vartab[N]; \ - long _gap; } - -/* set serial is an obsolete nop */ -static inline void melt_object_set_serial(meltobject_ptr_t ob ATTRIBUTE_UNUSED) {} /* some types, including objects, strbuf, stringmaps, objectmaps, all @@ -531,693 +383,6 @@ static inline void melt_object_set_serial(meltobject_ptr_t ob ATTRIBUTE_UNUSED) should be carefully updated in the forwarding step (and checked if young) */ -/* forwarded pointers; nobody see them except the melt copying - garbage collector */ -struct -GTY (()) -meltforward_st -{ - meltobject_ptr_t discr; /* actually always (void*)1 for forwarded */ - melt_ptr_t forward; -}; - -/* when MELTOBMAG_DECAY */ -struct -GTY ((mark_hook ("melt_mark_decay"))) -meltdecay_st -{ - meltobject_ptr_t discr; - melt_ptr_t val; - unsigned remain; /* remaining number of marking */ -}; - - -/* when MELTOBMAG_BOX */ -struct -GTY (()) -meltbox_st -{ - meltobject_ptr_t discr; - melt_ptr_t val; -}; - -/* when MELTOBMAG_MULTIPLE */ -struct -GTY ((variable_size)) /*@@MELTGTY@@*/ -meltmultiple_st -{ - meltobject_ptr_t discr; - unsigned nbval; - melt_ptr_t GTY ((length ("%h.nbval"))) tabval[FLEXIBLE_DIM]; -}; - -#define MELT_MULTIPLE_STRUCT(N) { \ - meltobject_ptr_t discr; \ - unsigned nbval; \ - melt_ptr_t tabval[N]; \ - long _gap; } - -/* when MELTOBMAG_CLOSURE */ -struct -GTY ((variable_size)) /*@@MELTGTY@@*/ -meltclosure_st -{ - meltobject_ptr_t discr; - meltroutine_ptr_t rout; - unsigned nbval; - melt_ptr_t GTY ((length ("%h.nbval"))) tabval[FLEXIBLE_DIM]; -}; - -#define MELT_CLOSURE_STRUCT(N) { \ - meltobject_ptr_t discr; \ - meltroutine_ptr_t rout; \ - unsigned nbval; \ - melt_ptr_t tabval[N]; \ - long _gap; } - -/* when MELTOBMAG_ROUTINE */ -#define MELT_ROUTDESCR_LEN 96 - -struct -GTY ((variable_size)) /*@@MELTGTY@@*/ -meltroutine_st -{ - meltobject_ptr_t discr; - char routdescr[MELT_ROUTDESCR_LEN]; - meltroutfun_t* GTY ((skip)) routfunad; - melt_ptr_t routdata; - unsigned nbval; - melt_ptr_t GTY ((length ("%h.nbval"))) tabval[FLEXIBLE_DIM]; -}; - -/* unsafely set inside the meltroutine_st pointed by Rptr the - routine function pointer to Rout */ -#define MELT_ROUTINE_SET_ROUTCODE(Rptr,Rout) do { \ - ((struct meltroutine_st*)(Rptr))->routfunad \ - = (Rout); \ -} while(0) - - - - -#define MELT_ROUTINE_STRUCT(N) { \ - meltobject_ptr_t discr; \ - char routdescr[MELT_ROUTDESCR_LEN]; \ - meltroutfun_t* routfunad; \ - melt_ptr_t routdata; \ - unsigned nbval; \ - melt_ptr_t tabval[N]; \ - long _gap; } - - -/* when MELTOBMAG_PAIR */ -struct -GTY ((chain_next ("%h.tl"))) -meltpair_st -{ - meltobject_ptr_t discr; - melt_ptr_t hd; - struct meltpair_st *tl; -}; - - -/* when MELTOBMAG_LIST */ -struct -GTY (()) -meltlist_st -{ - meltobject_ptr_t discr; - struct meltpair_st *first; - struct meltpair_st *last; -}; - - - - - -/* when MELTOBMAG_INT - */ -struct -GTY (()) -meltint_st -{ - meltobject_ptr_t discr; - long val; -}; - -/* when MELTOBMAG_MIXINT - */ -struct -GTY (()) -meltmixint_st -{ - meltobject_ptr_t discr; - melt_ptr_t ptrval; - long intval; -}; - -/* when MELTOBMAG_MIXLOC - */ -struct -GTY (()) -meltmixloc_st -{ - meltobject_ptr_t discr; - melt_ptr_t ptrval; - long intval; - location_t locval; -}; - - -/* when MELTOBMAG_MIXBIGINT - an exported array mpz compatible; since we - use an exported mpz format, the value can be copied and trashed by - MELT garbage collector without harm. */ -struct -GTY ((variable_size)) /*@@MELTGTY@@*/ -meltmixbigint_st -{ - meltobject_ptr_t discr; - melt_ptr_t ptrval; - bool negative; - unsigned biglen; - long GTY ((length ("%h.biglen"))) tabig[FLEXIBLE_DIM]; /* of length LEN */ -}; - - -/* when MELTOBMAG_REAL */ -struct -GTY (()) -meltreal_st -{ - meltobject_ptr_t discr; - REAL_VALUE_TYPE val; -}; - - -/* a union of special pointers which have to be explicitly deleted */ -union special_melt_un -{ - /* all the pointers here have to be pointers to struct or to void, - because the generated gtype-desc.c don't include all the files - which define mpfr_ptr ppl_Coefficient_t etc... */ - /* generic pointer */ void *sp_pointer; - /* stdio file */ FILE *sp_file; - /*mpfr_ptr= */ void *sp_mpfr; - /* malloced pointer to mpfr_t */ - ppl_Coefficient_t sp_coefficient; - ppl_Linear_Expression_t sp_linear_expression; - ppl_Constraint_t sp_constraint; - ppl_Constraint_System_t sp_constraint_system; - ppl_Generator_t sp_generator; - ppl_Generator_System_t sp_generator_system; - ppl_Polyhedron_t sp_polyhedron; -}; - -/* PPL special have to be explicitly deleted; hence we need a hook - to mark them, an inside mark, and to maintain lists of existing - such PPL special boxes -which we scan to delete the unmarked - ones */ -/* when MELTOBMAG_SPEC* eg MELTOBMAG_SPEC_MPFR, MELTOBMAG_SPECPPL_COEFFICIENT; etc. - */ -struct -GTY ((mark_hook ("melt_mark_special"))) -meltspecial_st -{ - meltobject_ptr_t discr; - int mark; - struct meltspecial_st *GTY ((skip)) nextspec; - union special_melt_un GTY ((skip)) val; -}; - - -static inline void -melt_mark_special (struct meltspecial_st *p) -{ - p->mark = 1; - melt_debuggc_eprintf ("marked special %p of magic %d %s", - (void*)p, p->discr->meltobj_magic, - melt_obmag_string (p->discr->meltobj_magic)); -} - -static inline void -melt_mark_decay (struct meltdecay_st *p) -{ - /* this is tricky since it actually changes the marked data; however, - changing pointers to NULL is ok! */ - if (p->remain <= 0) - p->val = NULL; - else - p->remain--; -} - -/* make a special value; return NULL if the discriminant is not - special; all special values should be made thru this. */ -extern MELT_PUBLIC_VISIBILITY struct meltspecial_st* meltgc_make_special (melt_ptr_t discr); - - -/* when MELTOBMAG_STRING - */ -struct -GTY ((variable_size)) /*@@MELTGTY@@*/ -meltstring_st -{ - meltobject_ptr_t discr; - char val[FLEXIBLE_DIM]; /* null terminated */ -}; - -#define MELT_STRING_STRUCT(N) { \ - meltobject_ptr_t discr; \ - char val[(N)+1]; /* null terminated */ \ - long _gap; } - - - -/* when MELTOBMAG_STRBUF - string buffers */ -struct -GTY (()) -meltstrbuf_st -{ - meltobject_ptr_t discr; - char *GTY ((length ("1+melt_primtab[%h.buflenix]"))) bufzn; - unsigned char buflenix; /* allocated length index of - buffer */ - unsigned bufstart; - unsigned bufend; /* start & end useful positions */ - /* the following field is usually the value of buf (for - objects in the young zone), to allocate the object and its fields - at once; hence its GTY-ed length is zero */ - char GTY ((length ("0"))) buf_space[FLEXIBLE_DIM]; -}; - -/* when MELTOBMAG_TREE - boxed tree-s */ -struct -GTY (()) -melttree_st -{ - meltobject_ptr_t discr; - tree val; -}; - - -/* when MELTOBMAG_GIMPLE - boxed gimple-s */ -struct -GTY (()) -meltgimple_st -{ - meltobject_ptr_t discr; - gimple val; -}; - - -/* when MELTOBMAG_GIMPLESEQ - boxed gimple_seq-s */ -struct -GTY (()) -meltgimpleseq_st -{ - meltobject_ptr_t discr; - gimple_seq val; -}; - - - -/* when MELTOBMAG_BASICBLOCK - boxed basic_block-s */ -struct -GTY (()) -meltbasicblock_st -{ - meltobject_ptr_t discr; - basic_block val; -}; - -/* when MELTOBMAG_EDGE */ -struct -GTY (()) -meltedge_st -{ - meltobject_ptr_t discr; - edge val; -}; - - -/* when MELTOBMAG_LOOP - boxed loop-s */ -struct -GTY (()) -meltloop_st -{ - meltobject_ptr_t discr; - loop_p val; -}; - - - -/* when MELTOBMAG_RTX - boxed rtx-s */ -struct -GTY (()) -meltrtx_st -{ - meltobject_ptr_t discr; - rtx val; -}; - - -/* when MELTOBMAG_BITMAP - boxed bitmap-s */ -struct -GTY (()) -meltbitmap_st -{ - meltobject_ptr_t discr; - bitmap val; -}; - - -/* when MELTOBMAG_RTVEC - boxed rtvec-s */ -struct -GTY (()) -meltrtvec_st -{ - meltobject_ptr_t discr; - rtvec val; -}; - - - - -/*** hashed maps of objects to melt ***/ -struct -GTY (()) -entryobjectsmelt_st -{ - meltobject_ptr_t e_at; - melt_ptr_t e_va; -}; - -/* when MELTOBMAG_MAPOBJECTS */ -struct -GTY (()) -meltmapobjects_st -{ - meltobject_ptr_t discr; - unsigned count; - unsigned char lenix; - struct entryobjectsmelt_st *GTY ((length ("melt_primtab[%h.lenix]"))) - entab; - /* the following field is usually the value of entab (for - objects in the young zone), to allocate the object and its fields - at once; hence its GTY-ed length is zero */ - struct entryobjectsmelt_st GTY ((length ("0"))) map_space[FLEXIBLE_DIM]; -}; - -/*** hashed maps of trees to melt ***/ -struct -GTY (()) -entrytreesmelt_st -{ - tree e_at; - melt_ptr_t e_va; -}; - -/* when MELTOBMAG_MAPTREES */ -struct -GTY (()) -meltmaptrees_st -{ - /* change meltmappointers_st when changing this structure */ - meltobject_ptr_t discr; - unsigned count; - unsigned char lenix; - struct entrytreesmelt_st *GTY ((length ("melt_primtab[%h.lenix]"))) - entab; -}; - - - -/*** hashed maps of gimples to melt ***/ -struct -GTY (()) -entrygimplesmelt_st -{ - gimple e_at; - melt_ptr_t e_va; -}; - -/* when MELTOBMAG_MAPGIMPLES */ -struct -GTY (()) -meltmapgimples_st -{ - /* change meltmappointers_st when changing this structure */ - meltobject_ptr_t discr; - unsigned count; - unsigned char lenix; - struct entrygimplesmelt_st *GTY ((length ("melt_primtab[%h.lenix]"))) - entab; -}; - - -/*** hashed maps of gimpleseqs to melt ***/ -struct -GTY (()) -entrygimpleseqsmelt_st -{ - gimple_seq e_at; - melt_ptr_t e_va; -}; - -/* when MELTOBMAG_MAPGIMPLESEQS */ -struct -GTY (()) -meltmapgimpleseqs_st -{ - /* change meltmappointers_st when changing this structure */ - meltobject_ptr_t discr; - unsigned count; - unsigned char lenix; - struct entrygimpleseqsmelt_st *GTY ((length ("melt_primtab[%h.lenix]"))) - entab; -}; - - - -/*** hashed maps of loop_p-s to melt values ***/ -struct -GTY (()) -entryloopsmelt_st -{ - loop_p e_at; - melt_ptr_t e_va; -}; - -/* when MELTOBMAG_MAPLOOPS */ -struct -GTY (()) -meltmaploops_st -{ - /* change meltmappointers_st when changing this structure */ - meltobject_ptr_t discr; - unsigned count; - unsigned char lenix; - struct entryloopsmelt_st *GTY ((length ("melt_primtab[%h.lenix]"))) - entab; -}; - - - -/*** hashed maps of bitmap-s to melt values ***/ -struct -GTY (()) -entrybitmapsmelt_st -{ - bitmap e_at; - melt_ptr_t e_va; -}; - -/* when MELTOBMAG_MAPBITMAPS */ -struct -GTY (()) -meltmapbitmaps_st -{ - /* change meltmappointers_st when changing this structure */ - meltobject_ptr_t discr; - unsigned count; - unsigned char lenix; - struct entrybitmapsmelt_st *GTY ((length ("melt_primtab[%h.lenix]"))) - entab; -}; - - - - -/*** hashed maps of rtx-s to melt values ***/ -struct -GTY (()) -entryrtxsmelt_st -{ - rtx e_at; - melt_ptr_t e_va; -}; - -/* when MELTOBMAG_MAPRTXS */ -struct -GTY (()) -meltmaprtxs_st -{ - /* change meltmappointers_st when changing this structure */ - meltobject_ptr_t discr; - unsigned count; - unsigned char lenix; - struct entryrtxsmelt_st *GTY ((length ("melt_primtab[%h.lenix]"))) - entab; -}; - - - -/*** hashed maps of rtvec-s to melt values ***/ -struct -GTY (()) -entryrtvecsmelt_st -{ - rtvec e_at; - melt_ptr_t e_va; -}; - -/* when MELTOBMAG_MAPRTVECS */ -struct -GTY (()) -meltmaprtvecs_st -{ - /* change meltmappointers_st when changing this structure */ - meltobject_ptr_t discr; - unsigned count; - unsigned char lenix; - struct entryrtvecsmelt_st *GTY ((length ("melt_primtab[%h.lenix]"))) - entab; -}; - - - -/*** hashed maps of strings to melt ***/ -struct -GTY (()) -entrystringsmelt_st -{ - const char *GTY (()) e_at; - melt_ptr_t e_va; -}; - -/* when MELTOBMAG_MAPSTRINGS */ -struct -GTY (()) -meltmapstrings_st -{ - meltobject_ptr_t discr; - unsigned count; - unsigned char lenix; - struct entrystringsmelt_st *GTY ((length ("melt_primtab[%h.lenix]"))) - entab; -}; - - -/*** hashed maps of basicblocks to melt ***/ - -struct -GTY (()) -entrybasicblocksmelt_st -{ - basic_block e_at; - melt_ptr_t e_va; -}; - -/* when MELTOBMAG_MAPBASICBLOCKS */ -struct -GTY (()) -meltmapbasicblocks_st -{ - /* change meltmappointers_st when changing this structure */ - meltobject_ptr_t discr; - unsigned count; - unsigned char lenix; - struct entrybasicblocksmelt_st - *GTY ((length ("melt_primtab[%h.lenix]"))) entab; -}; - -/*** hashed maps of edges to melt ***/ -struct -GTY (()) -entryedgesmelt_st -{ - edge e_at; - melt_ptr_t e_va; -}; - -/* when MELTOBMAG_MAPEDGES */ -struct -GTY (()) -meltmapedges_st -{ - /* change meltmappointers_st when changing this structure */ - meltobject_ptr_t discr; - unsigned count; - unsigned char lenix; - struct entryedgesmelt_st *GTY ((length ("melt_primtab[%h.lenix]"))) - entab; -}; - - -/**** our union for everything ***/ -/* never use an array of melt_un, only array of pointers melt_ptr_t */ -typedef union -GTY ((desc ("%0.u_discr->meltobj_magic"))) -melt_un -{ - meltobject_ptr_t GTY ((skip)) u_discr; - struct meltforward_st GTY ((skip)) u_forward; - struct meltobject_st GTY ((tag ("MELTOBMAG_OBJECT"))) u_object; - struct meltbox_st GTY ((tag ("MELTOBMAG_BOX"))) u_box; - struct meltdecay_st GTY ((tag ("MELTOBMAG_DECAY"))) u_decay; - struct meltmultiple_st GTY ((tag ("MELTOBMAG_MULTIPLE"))) u_multiple; - struct meltclosure_st GTY ((tag ("MELTOBMAG_CLOSURE"))) u_closure; - struct meltroutine_st GTY ((tag ("MELTOBMAG_ROUTINE"))) u_routine; - struct meltlist_st GTY ((tag ("MELTOBMAG_LIST"))) u_list; - struct meltint_st GTY ((tag ("MELTOBMAG_INT"))) u_int; - struct meltmixint_st GTY ((tag ("MELTOBMAG_MIXINT"))) u_mixint; - struct meltmixloc_st GTY ((tag ("MELTOBMAG_MIXLOC"))) u_mixloc; - struct meltmixbigint_st GTY ((tag ("MELTOBMAG_MIXBIGINT"))) u_mixbigint; - struct meltreal_st GTY ((tag ("MELTOBMAG_REAL"))) u_real; - struct meltpair_st GTY ((tag ("MELTOBMAG_PAIR"))) u_pair; - /* The struct meltspecial_st share several GTY tag-s, but gengtype - need to have one case per tag! See - http://gcc.gnu.org/ml/gcc/2010-07/msg00061.html for more. */ - struct meltspecial_st GTY ((tag ("MELTOBMAG_SPEC_FILE"))) u_special_file; - struct meltspecial_st GTY ((tag ("MELTOBMAG_SPEC_RAWFILE"))) u_special_rawfile; - struct meltspecial_st GTY ((tag ("MELTOBMAG_SPEC_MPFR"))) u_special_mpfr; - struct meltspecial_st GTY ((tag ("MELTOBMAG_SPECPPL_COEFFICIENT"))) u_special_ppl_coefficient; - struct meltspecial_st GTY ((tag ("MELTOBMAG_SPECPPL_LINEAR_EXPRESSION"))) u_special_ppl_linear_expression; - struct meltspecial_st GTY ((tag ("MELTOBMAG_SPECPPL_CONSTRAINT"))) u_special_ppl_constraint; - struct meltspecial_st GTY ((tag ("MELTOBMAG_SPECPPL_CONSTRAINT_SYSTEM"))) u_special_ppl_constraint_system; - struct meltspecial_st GTY ((tag ("MELTOBMAG_SPECPPL_GENERATOR"))) u_special_ppl_generator; - struct meltspecial_st GTY ((tag ("MELTOBMAG_SPECPPL_GENERATOR_SYSTEM"))) u_special_ppl_generator_system; - struct meltspecial_st GTY ((tag ("MELTOBMAG_SPECPPL_POLYHEDRON"))) u_special_ppl_polyhedron; - /* for simplicity and compatibility with previous code, we can just write u_special! */ - struct meltspecial_st GTY ((skip)) u_special; - struct meltstring_st GTY ((tag ("MELTOBMAG_STRING"))) u_string; - struct meltstrbuf_st GTY ((tag ("MELTOBMAG_STRBUF"))) u_strbuf; - struct melttree_st GTY ((tag ("MELTOBMAG_TREE"))) u_tree; - struct meltgimple_st GTY ((tag ("MELTOBMAG_GIMPLE"))) u_gimple; - struct meltgimpleseq_st GTY ((tag ("MELTOBMAG_GIMPLESEQ"))) u_gimpleseq; - struct meltbasicblock_st GTY ((tag ("MELTOBMAG_BASICBLOCK"))) u_basicblock; - struct meltedge_st GTY ((tag ("MELTOBMAG_EDGE"))) u_edge; - struct meltloop_st GTY ((tag ("MELTOBMAG_LOOP"))) u_loop; - struct meltbitmap_st GTY ((tag ("MELTOBMAG_BITMAP"))) u_bitmap; - struct meltrtx_st GTY ((tag ("MELTOBMAG_RTX"))) u_rtx; - struct meltrtvec_st GTY ((tag ("MELTOBMAG_RTVEC"))) u_rtvec; - struct meltmapobjects_st GTY ((tag ("MELTOBMAG_MAPOBJECTS"))) u_mapobjects; - struct meltmapstrings_st GTY ((tag ("MELTOBMAG_MAPSTRINGS"))) u_mapstrings; - struct meltmaptrees_st GTY ((tag ("MELTOBMAG_MAPTREES"))) u_maptrees; - struct meltmapgimples_st GTY ((tag ("MELTOBMAG_MAPGIMPLES"))) u_mapgimples; - struct meltmapgimpleseqs_st GTY ((tag ("MELTOBMAG_MAPGIMPLESEQS"))) u_mapgimpleseqs; - struct meltmapbasicblocks_st GTY ((tag ("MELTOBMAG_MAPBASICBLOCKS"))) u_mapbasicblocks; - struct meltmapedges_st GTY ((tag ("MELTOBMAG_MAPEDGES"))) u_mapedges; - struct meltmaploops_st GTY ((tag ("MELTOBMAG_MAPLOOPS"))) u_maploops; - struct meltmapbitmaps_st GTY ((tag ("MELTOBMAG_MAPBITMAPS"))) u_mapbitmaps; - struct meltmaprtxs_st GTY ((tag ("MELTOBMAG_MAPRTXS"))) u_maprtxs; - struct meltmaprtvecs_st GTY ((tag ("MELTOBMAG_MAPRTVECS"))) u_maprtvecs; -} melt_un_t; /* return the magic of the discriminant or 0 */ static inline int @@ -1325,199 +490,7 @@ melt_ptr_t melt_container_value (melt_ptr_t cont); -void *meltgc_raw_new_mappointers (meltobject_ptr_t discr_p, - unsigned len); - -void -meltgc_raw_put_mappointers (void *mappointer_p, - const void *attr, melt_ptr_t valu_p); - -melt_ptr_t -melt_raw_get_mappointers (void *mappointer_p, const void *attr); - -melt_ptr_t -meltgc_raw_remove_mappointers (void *mappointer_p, const void *attr); - -/* big macro to implement a mapFOOs */ -#define MELT_DEFINE_MAPTR(Meltobmag,Ptyp,Mapstruct,Newf,Getf,Putf,Removef,Countf,Sizef,Nthattrf,Nthvalf) \ - \ -static inline melt_ptr_t \ -Newf (meltobject_ptr_t discr, unsigned len) \ -{ \ - if (melt_magic_discr ((melt_ptr_t) discr) != MELTOBMAG_OBJECT) \ - return NULL; \ - if (discr->meltobj_magic != Meltobmag) \ - return NULL; \ - return (melt_ptr_t) meltgc_raw_new_mappointers (discr, len); \ -} \ - \ -static inline melt_ptr_t \ -Getf (melt_ptr_t map_p, Ptyp attr) \ -{ \ - if (melt_magic_discr ((melt_ptr_t) map_p) != Meltobmag || !attr) \ - return NULL; \ - return melt_raw_get_mappointers (map_p, attr); \ -} \ - \ -static inline void \ -Putf (struct Mapstruct *map_p, \ - Ptyp attr, melt_ptr_t valu_p) \ -{ \ - if (melt_magic_discr ((melt_ptr_t) map_p) != Meltobmag \ - || !attr || !valu_p) \ - return; \ - meltgc_raw_put_mappointers (map_p, attr, valu_p); \ -} \ - \ -static inline melt_ptr_t \ -Removef (struct Mapstruct *map, Ptyp attr) \ -{ \ - if (melt_magic_discr ((melt_ptr_t) map) != Meltobmag || !attr) \ - return NULL; \ - return meltgc_raw_remove_mappointers (map, attr); \ -} \ - \ -static inline unsigned \ -Countf (struct Mapstruct* map_p) \ -{ \ - if (!map_p || map_p->discr->obj_num != Meltobmag) \ - return 0; \ - return map_p->count; \ -} \ - \ -static inline int \ -Sizef (struct Mapstruct* map_p) \ -{ \ - if (!map_p || map_p->discr->obj_num != Meltobmag) \ - return 0; \ - return melt_primtab[map_p->lenix]; \ -} \ - \ -static inline Ptyp \ -Nthattrf(struct Mapstruct* map_p, int ix) \ -{ \ - Ptyp at = 0; \ - if (!map_p || map_p->discr->obj_num != Meltobmag) \ - return 0; \ - if (ix < 0 || ix >= melt_primtab[map_p->lenix]) \ - return 0; \ - at = map_p->entab[ix].e_at; \ - if ((void *) at == (void *) HTAB_DELETED_ENTRY) \ - return 0; \ - return at; \ -} \ - \ -static inline melt_ptr_t \ -Nthvalf(struct Mapstruct* map_p, int ix) \ -{ \ - Ptyp at = 0; \ - if (!map_p || map_p->discr->obj_num != Meltobmag) \ - return 0; \ - if (ix < 0 || ix >= melt_primtab[map_p->lenix]) \ - return 0; \ - at = map_p->entab[ix].e_at; \ - if (!at || (void *) at == (void *) HTAB_DELETED_ENTRY) \ - return 0; \ - return map_p->entab[ix].e_va; \ -} - -/* end of MELT_DEFINE_MAPTR macro */ - -MELT_DEFINE_MAPTR(MELTOBMAG_MAPTREES, tree, meltmaptrees_st, - meltgc_new_maptrees, - melt_get_maptrees, - melt_put_maptrees, - melt_remove_maptrees, - melt_count_maptrees, - melt_size_maptrees, - melt_nthattr_maptrees, - melt_nthval_maptrees) - -MELT_DEFINE_MAPTR(MELTOBMAG_MAPGIMPLES, gimple, meltmapgimples_st, - meltgc_new_mapgimples, - melt_get_mapgimples, - melt_put_mapgimples, - melt_remove_mapgimples, - melt_count_mapgimples, - melt_size_mapgimples, - melt_nthattr_mapgimples, - melt_nthval_mapgimples) - -MELT_DEFINE_MAPTR(MELTOBMAG_MAPGIMPLESEQS, gimple_seq, meltmapgimpleseqs_st, - meltgc_new_mapgimpleseqs, - melt_get_mapgimpleseqs, - melt_put_mapgimpleseqs, - melt_remove_mapgimpleseqs, - melt_count_mapgimpleseqs, - melt_size_mapgimpleseqs, - melt_nthattr_mapgimpleseqs, - melt_nthval_mapgimpleseqs) - - -MELT_DEFINE_MAPTR(MELTOBMAG_MAPEDGES, edge, meltmapedges_st, - meltgc_new_mapedges, - melt_get_mapedges, - melt_put_mapedges, - melt_remove_mapedges, - melt_count_mapedges, - melt_size_mapedges, - melt_nthattr_mapedges, - melt_nthval_mapedges) - -MELT_DEFINE_MAPTR(MELTOBMAG_MAPBASICBLOCKS, basic_block, meltmapbasicblocks_st, - meltgc_new_mapbasicblocks, - melt_get_mapbasicblocks, - melt_put_mapbasicblocks, - melt_remove_mapbasicblocks, - melt_count_mapbasicblocks, - melt_size_mapbasicblocks, - melt_nthattr_mapbasicblocks, - melt_nthval_mapbasicblocks) - -MELT_DEFINE_MAPTR(MELTOBMAG_MAPLOOPS, loop_p, meltmaploops_st, - meltgc_new_maploops, - melt_get_maploops, - melt_put_maploops, - melt_remove_maploops, - melt_count_maploops, - melt_size_maploops, - melt_nthattr_maploops, - melt_nthval_maploops) - -MELT_DEFINE_MAPTR(MELTOBMAG_MAPRTXS, rtx, meltmaprtxs_st, - meltgc_new_maprtxs, - melt_get_maprtxs, - melt_put_maprtxs, - melt_remove_maprtxs, - melt_count_maprtxs, - melt_size_maprtxs, - melt_nthattr_maprtxs, - melt_nthval_maprtxs) - -MELT_DEFINE_MAPTR(MELTOBMAG_MAPRTVECS, rtvec, meltmaprtvecs_st, - meltgc_new_maprtvecs, - melt_get_maprtvecs, - melt_put_maprtvecs, - melt_remove_maprtvecs, - melt_count_maprtvecs, - melt_size_maprtvecs, - melt_nthattr_maprtvecs, - melt_nthval_maprtvecs) - -MELT_DEFINE_MAPTR(MELTOBMAG_MAPBITMAPS, bitmap, meltmapbitmaps_st, - meltgc_new_mapbitmaps, - melt_get_mapbitmaps, - melt_put_mapbitmaps, - melt_remove_mapbitmaps, - melt_count_mapbitmaps, - melt_size_mapbitmaps, - melt_nthattr_mapbitmaps, - melt_nthval_mapbitmaps) - - -/* do not use MELT_DEFINE_MAPTR elsewhere */ -#undef MELT_DEFINE_MAPTR /* allocate a new boxed tree of given DISCR [DISCR_TREE if null] & content VAL */ @@ -1698,6 +671,8 @@ extern void *melt_endalz; extern char *melt_curalz; /* the store vector grows downward */ extern void **melt_storalz; + + /* list of specials in the allocation zone */ extern struct meltspecial_st *melt_newspeclist; /* list of specials in the heap */ @@ -2955,7 +1930,7 @@ melt_ppl_coefficient_content (melt_ptr_t ppl_p) { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_COEFFICIENT) return NULL; - return ((struct meltspecial_st *)ppl_p)->val.sp_coefficient; + return ((struct meltspecialpplcoefficient_st *)ppl_p)->val.sp_coefficient; } /* put the content of a boxed PPL coefficient */ @@ -2964,7 +1939,7 @@ melt_ppl_coefficient_put_content(melt_ptr_t ppl_p, ppl_Coefficient_t coef) { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_COEFFICIENT) return; - ((struct meltspecial_st *)ppl_p)->val.sp_coefficient = coef; + ((struct meltspecialpplcoefficient_st *)ppl_p)->val.sp_coefficient = coef; } /* get the content of a boxed PPL linear expression */ @@ -2973,7 +1948,7 @@ melt_ppl_linear_expression_content(melt_ptr_t ppl_p) { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_LINEAR_EXPRESSION) return NULL; - return ((struct meltspecial_st *)ppl_p)->val.sp_linear_expression; + return ((struct meltspecialppllinearexpression_st *)ppl_p)->val.sp_linear_expression; } /* put the content of a boxed PPL linear expression */ @@ -2982,7 +1957,7 @@ melt_ppl_linear_expression_put_content(melt_ptr_t ppl_p, ppl_Linear_Expression_t { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_LINEAR_EXPRESSION) return; - ((struct meltspecial_st *)ppl_p)->val.sp_linear_expression = liex; + ((struct meltspecialppllinearexpression_st *)ppl_p)->val.sp_linear_expression = liex; } /* get the content of a boxed PPL constraint */ @@ -2991,7 +1966,7 @@ melt_ppl_constraint_content(melt_ptr_t ppl_p) { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_CONSTRAINT) return NULL; - return ((struct meltspecial_st *)ppl_p)->val.sp_constraint; + return ((struct meltspecialpplconstraint_st *)ppl_p)->val.sp_constraint; } /* putt the content of a boxed PPL constraint */ @@ -3000,7 +1975,7 @@ melt_ppl_constraint_put_content(melt_ptr_t ppl_p, ppl_Constraint_t cons) { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_CONSTRAINT) return; - ((struct meltspecial_st *)ppl_p)->val.sp_constraint = cons; + ((struct meltspecialpplconstraint_st *)ppl_p)->val.sp_constraint = cons; } /* get the content of a boxed PPL constraint system */ @@ -3009,7 +1984,7 @@ melt_ppl_constraint_system_content(melt_ptr_t ppl_p) { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_CONSTRAINT_SYSTEM) return NULL; - return ((struct meltspecial_st *)ppl_p)->val.sp_constraint_system; + return ((struct meltspecialpplconstraintsystem_st *)ppl_p)->val.sp_constraint_system; } /* put the content of a boxed PPL constraint system */ @@ -3018,7 +1993,7 @@ melt_ppl_constraint_system_put_content(melt_ptr_t ppl_p, ppl_Constraint_System_t { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_CONSTRAINT_SYSTEM) return; - ((struct meltspecial_st *)ppl_p)->val.sp_constraint_system = consys; + ((struct meltspecialpplconstraintsystem_st *)ppl_p)->val.sp_constraint_system = consys; } @@ -3028,7 +2003,7 @@ melt_ppl_generator_content(melt_ptr_t ppl_p) { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_GENERATOR) return NULL; - return ((struct meltspecial_st *)ppl_p)->val.sp_generator; + return ((struct meltspecialpplgenerator_st *)ppl_p)->val.sp_generator; } @@ -3038,7 +2013,7 @@ melt_ppl_generator_put_content(melt_ptr_t ppl_p, ppl_Generator_t gen) { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_GENERATOR) return; - ((struct meltspecial_st *)ppl_p)->val.sp_generator = gen; + ((struct meltspecialpplgenerator_st *)ppl_p)->val.sp_generator = gen; } @@ -3048,7 +2023,7 @@ melt_ppl_generator_system_content(melt_ptr_t ppl_p) { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_GENERATOR_SYSTEM) return NULL; - return ((struct meltspecial_st *)ppl_p)->val.sp_generator_system; + return ((struct meltspecialpplgeneratorsystem_st *)ppl_p)->val.sp_generator_system; } /* put the content of a boxed PPL generator system */ @@ -3057,7 +2032,7 @@ melt_ppl_generator_system_put_content(melt_ptr_t ppl_p, ppl_Generator_System_t g { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_GENERATOR_SYSTEM) return; - ((struct meltspecial_st *)ppl_p)->val.sp_generator_system = gensys; + ((struct meltspecialpplgeneratorsystem_st *)ppl_p)->val.sp_generator_system = gensys; } @@ -3067,7 +2042,7 @@ melt_ppl_polyhedron_content(melt_ptr_t ppl_p) { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_POLYHEDRON) return NULL; - return ((struct meltspecial_st *)ppl_p)->val.sp_polyhedron; + return ((struct meltspecialpplpolyhedron_st *)ppl_p)->val.sp_polyhedron; } /* put the content of a boxed PPL polyhedron */ @@ -3076,7 +2051,7 @@ melt_ppl_polyhedron_put_content(melt_ptr_t ppl_p, ppl_Polyhedron_t poly) { if (melt_magic_discr(ppl_p) != MELTOBMAG_SPECPPL_POLYHEDRON) return; - ((struct meltspecial_st *)ppl_p)->val.sp_polyhedron = poly; + ((struct meltspecialpplpolyhedron_st *)ppl_p)->val.sp_polyhedron = poly; } @@ -3821,7 +2796,7 @@ melt_get_file(melt_ptr_t file_p) return NULL; magic = melt_magic_discr (file_p); if (magic == MELTOBMAG_SPEC_FILE || magic == MELTOBMAG_SPEC_RAWFILE) - return ((struct meltspecial_st*)file_p)->val.sp_file; + return ((struct meltspecialfile_st*)file_p)->val.sp_file; return NULL; } |