PIPS
genC.h File Reference
#include <stdio.h>
#include <stdint.h>
#include <strings.h>
#include <stdarg.h>
#include "newgen_assert.h"
#include "newgen_types.h"
#include "newgen_set.h"
#include "newgen_list.h"
#include "newgen_stack.h"
#include "newgen_string_buffer.h"
#include "newgen_auto_string.h"
#include <memory.h>
#include "newgen_map.h"
#include "newgen_array.h"
#include "newgen_generic_mapping.h"
#include "newgen_generic_stack.h"
#include "newgen_generic_function.h"
+ Include dependency graph for genC.h:

Go to the source code of this file.

Data Structures

union  gen_chunk
 A gen_chunk is used to store every object. More...
 

Macros

#define NEWGEN
 
#define GEN_HEADER   (1)
 include <sys/stdtypes.h> More...
 
#define GEN_HEADER_SIZE   (sizeof(gen_chunk)*GEN_HEADER)
 
#define gen_chunk_undefined   ((gen_chunk *)(-16))
 
#define gen_chunk_undefined_p(c)   ((c)==gen_chunk_undefined)
 
#define chunk_undefined   gen_chunk_undefined
 obsolete More...
 
#define chunk_undefined_p(c)   gen_chunk_undefined_p(c)
 
#define UNIT(x)   "You don't want to take the value of a unit type, do you?"
 
#define BOOL(x)   ((x).b)
 
#define CHAR(x)   ((x).c)
 
#define INT(x)   ((x).i)
 
#define FLOAT(x)   ((x).f)
 
#define STRING(x)   ((x).s)
 
#define CONSP(x)   ((x).l)
 
#define SETP(x)   ((x).t)
 
#define CHUNK(x)   ((x).p)
 
#define HASH(x)   ((x).h)
 
#define CHUNKP(x)   ((x).p)
 
#define LIST(x)   ((x).l)
 
#define SET(x)   ((x).t)
 
#define VOID_STAR(x)   ((x).e)
 
#define UNIT_TYPE   "You don't want a unit type, do you?"
 for the MAP macro to handle simple types correctly. More...
 
#define BOOL_TYPE   bool
 
#define CHAR_TYPE   char
 
#define INT_TYPE   int
 
#define FLOAT_TYPE   float
 
#define STRING_TYPE   string
 
#define VOID_STAR_TYPE   void *
 
#define bool_TYPE   bool
 
#define char_TYPE   char
 
#define int_TYPE   int
 
#define float_TYPE   float
 
#define string_TYPE   string
 
#define BOOL_CAST(x)   BOOL(x)
 
#define CHAR_CAST(x)   CHAR(x)
 
#define INT_CAST(x)   INT(x)
 
#define FLOAT_CAST(x)   FLOAT(x)
 
#define STRING_CAST(x)   STRING(x)
 
#define VOID_STAR_CAST(x)   VOID_STAR(x)
 
#define bool_CAST(x)   BOOL(x)
 
#define char_CAST(x)   CHAR(x)
 
#define int_CAST(x)   INT(x)
 
#define float_CAST(x)   FLOAT(x)
 
#define string_CAST(x)   STRING(x)
 
#define CONSP_TYPE   list
 
#define LIST_TYPE   list
 
#define SETP_TYPE   set
 
#define SET_TYPE   set
 
#define CHUNK_TYPE   gen_chunkp
 
#define CHUNKP_TYPE   gen_chunkp
 
#define HASH_TYPE   hash_table
 
#define consp_TYPE   list
 
#define list_TYPE   list
 
#define setp_TYPE   set
 
#define set_TYPE   set
 
#define chunk_TYPE   gen_chunkp
 
#define chunkp_TYPE   gen_chunkp
 
#define hash_TYPE   hash_table
 
#define CONSP_CAST(x)   LIST(x)
 
#define LIST_CAST(x)   LIST(x)
 
#define SETP_CAST(x)   SET(x)
 
#define SET_CAST(x)   SET(x)
 
#define CHUNK_CAST(x)   CHUNK(x)
 
#define CHUNKP_CAST(x)   CHUNKP(x)
 
#define HASH_CAST(x)   HASH_TABLE(x)
 
#define consp_CAST(x)   LIST(x)
 
#define list_CAST(x)   LIST(x)
 
#define setp_CAST(x)   SET(x)
 
#define set_CAST(x)   SET(x)
 
#define chunk_CAST(x)   CHUNK(x)
 
#define chunkp_CAST(x)   CHUNKP(x)
 
#define hash_CAST(x)   HASH_TABLE(x)
 
#define BOOL_NEWGEN_DOMAIN   (bool_domain)
 utils for typed cons More...
 
#define CHAR_NEWGEN_DOMAIN   (char_domain)
 
#define INT_NEWGEN_DOMAIN   (int_domain)
 
#define FLOAT_NEWGEN_DOMAIN   (float_domain)
 
#define STRING_NEWGEN_DOMAIN   (string_domain)
 
#define bool_NEWGEN_DOMAIN   (bool_domain)
 
#define char_NEWGEN_DOMAIN   (char_domain)
 
#define int_NEWGEN_DOMAIN   (int_domain)
 
#define float_NEWGEN_DOMAIN   (float_domain)
 
#define string_NEWGEN_DOMAIN   (string_domain)
 
#define LIST_NEWGEN_DOMAIN   (-1) /**means unknown type... */
 
#define GEN_DBG_TRAV_LEAF   1
 
#define GEN_DBG_TRAV_SIMPLE   2
 
#define GEN_DBG_TRAV_OBJECT   4
 
#define GEN_DBG_CHECK   8
 
#define GEN_DBG_RECURSE   16
 
#define GEN_DBG_TRAV    (GEN_DBG_TRAV_LEAF|GEN_DBG_TRAV_SIMPLE|GEN_DBG_TRAV_OBJECT)
 
#define gen_get_ancestor_type(i, o)   gen_get_ancestor(i,o)
 
#define gen_start_recurse_ancestor_tracking()   /**NOPE */
 
#define gen_stop_recurse_ancestor_tracking()   /**NOPE */
 
#define gen_recurse(start, domain_number, flt, rwt)    gen_recurse((start),(domain_number),((bool (*)(void*))(flt)),((void (*)(void*))(rwt)))
 
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)    gen_context_recurse((start),(ctxt),(domain_number),((bool (*)(void*,void*))(flt)),((void (*)(void*,void*))(rwt)))
 
#define MEMORY_INCLUDED
 Since C is not-orthogonal (chunk1 == chunk2 is prohibited), this one is needed. More...
 
#define gen_equal(lhs, rhs)   (memcmp((lhs),(rhs))==0)
 
#define GEN_CHECK(e, t)   (e)
 GEN_CHECK can be used to test run-time coherence of Newgen values. More...
 
#define GEN_CHECK_ALLOC   0
 
#define NEWGEN_CHECK_TYPE(dom, item)
 this macro does about the same as gen_check, but inlined and safer. More...
 

Typedefs

typedef union gen_chunk gen_chunk
 A gen_chunk is used to store every object. More...
 
typedef union gen_chunkgen_chunkp
 
typedef void *() gen_extract_func_t(const gen_chunk)
 

Enumerations

enum  internal_type {
  unit_domain = 0 , bool_domain , char_domain , int_domain ,
  intptr_t_domain = int_domain , _int_domain = int_domain , float_domain , string_domain
}
 some other macros need the domain number to keep track of the type. More...
 

Functions

void gen_free GEN_PROTO ((gen_chunk *))
 recursion and utilities More...
 
int gen_free_tabulated GEN_PROTO ((int))
 exported type translation functions. More...
 
void gen_write GEN_PROTO ((FILE *, gen_chunk *))
 
int gen_write_tabulated GEN_PROTO ((FILE *, int))
 
void gen_read_spec GEN_PROTO ((char *,...))
 
gen_chunk *gen_read GEN_PROTO ((FILE *))
 
gen_chunk *gen_alloc GEN_PROTO ((int, int, int,...))
 
void gen_type_translation_reset GEN_PROTO ((void))
 
void gen_type_translation_read GEN_PROTO ((string))
 
void gen_init_external GEN_PROTO ((int, void *(*)(FILE *, int(*)(void)), void(*)(FILE *, void *), void(*)(void *), void *(*)(void *), int(*)(void *)))
 
gen_chunk *gen_check GEN_PROTO ((gen_chunk *, int))
 
bool gen_sharing_p GEN_PROTO ((gen_chunk *, gen_chunk *))
 
bool gen_true2 GEN_PROTO ((gen_chunk *, void *))
 
void gen_null GEN_PROTO ((void *))
 
void gen_null2 GEN_PROTO ((void *, void *))
 
void gen_multi_recurse GEN_PROTO ((void *,...))
 
void gen_context_multi_recurse GEN_PROTO ((void *, void *,...))
 
void gen_recurse (void *start, int domain_number, bool(*flt)(void *), void(*rwt)(void *))
 
void gen_context_recurse (void *start, void *context, int domain_number, bool(*flt)(void *, void *context), void(*rwt)(void *, void *context))
 
gen_chunkgen_get_recurse_previous_visited_object (void)
 Get the previously visited object. More...
 
gen_chunkgen_get_recurse_current_ancestor (void)
 Get the ancestor of the current object. More...
 
gen_chunkgen_get_recurse_ancestor (const void *)
 Get the first ancestor object encountered during the recursion for the given object. More...
 
gen_chunkgen_get_ancestor (int, const void *)
 return the first ancestor object found of the given type. More...
 
gen_chunkgen_get_current_object (void)
 return the current visited object, or NULL if not in a recursion. More...
 
gen_chunkgen_get_current_ancestor (int)
 Return current object of that type... More...
 
int current_shared_obj_table_size (void)
 for debug More...
 

Variables

int gen_debug
 Function interface for user applications. More...
 

Macro Definition Documentation

◆ BOOL

#define BOOL (   x)    ((x).b)

Definition at line 83 of file genC.h.

◆ BOOL_CAST

#define BOOL_CAST (   x)    BOOL(x)

Definition at line 113 of file genC.h.

◆ bool_CAST

#define bool_CAST (   x)    BOOL(x)

Definition at line 120 of file genC.h.

◆ BOOL_NEWGEN_DOMAIN

#define BOOL_NEWGEN_DOMAIN   (bool_domain)

utils for typed cons

Definition at line 174 of file genC.h.

◆ bool_NEWGEN_DOMAIN

#define bool_NEWGEN_DOMAIN   (bool_domain)

Definition at line 180 of file genC.h.

◆ BOOL_TYPE

#define BOOL_TYPE   bool

Definition at line 100 of file genC.h.

◆ bool_TYPE

#define bool_TYPE   bool

Definition at line 107 of file genC.h.

◆ CHAR

#define CHAR (   x)    ((x).c)

Definition at line 84 of file genC.h.

◆ CHAR_CAST

#define CHAR_CAST (   x)    CHAR(x)

Definition at line 114 of file genC.h.

◆ char_CAST

#define char_CAST (   x)    CHAR(x)

Definition at line 121 of file genC.h.

◆ CHAR_NEWGEN_DOMAIN

#define CHAR_NEWGEN_DOMAIN   (char_domain)

Definition at line 175 of file genC.h.

◆ char_NEWGEN_DOMAIN

#define char_NEWGEN_DOMAIN   (char_domain)

Definition at line 181 of file genC.h.

◆ CHAR_TYPE

#define CHAR_TYPE   char

Definition at line 101 of file genC.h.

◆ char_TYPE

#define char_TYPE   char

Definition at line 108 of file genC.h.

◆ CHUNK

#define CHUNK (   x)    ((x).p)

Definition at line 90 of file genC.h.

◆ CHUNK_CAST

#define CHUNK_CAST (   x)    CHUNK(x)

Definition at line 146 of file genC.h.

◆ chunk_CAST

#define chunk_CAST (   x)    CHUNK(x)

Definition at line 154 of file genC.h.

◆ CHUNK_TYPE

#define CHUNK_TYPE   gen_chunkp

Definition at line 130 of file genC.h.

◆ chunk_TYPE

#define chunk_TYPE   gen_chunkp

Definition at line 138 of file genC.h.

◆ chunk_undefined

#define chunk_undefined   gen_chunk_undefined

obsolete

Definition at line 79 of file genC.h.

◆ chunk_undefined_p

#define chunk_undefined_p (   c)    gen_chunk_undefined_p(c)

Definition at line 80 of file genC.h.

◆ CHUNKP

#define CHUNKP (   x)    ((x).p)

Definition at line 92 of file genC.h.

◆ CHUNKP_CAST

#define CHUNKP_CAST (   x)    CHUNKP(x)

Definition at line 147 of file genC.h.

◆ chunkp_CAST

#define chunkp_CAST (   x)    CHUNKP(x)

Definition at line 155 of file genC.h.

◆ CHUNKP_TYPE

#define CHUNKP_TYPE   gen_chunkp

Definition at line 131 of file genC.h.

◆ chunkp_TYPE

#define chunkp_TYPE   gen_chunkp

Definition at line 139 of file genC.h.

◆ CONSP

#define CONSP (   x)    ((x).l)

Definition at line 88 of file genC.h.

◆ CONSP_CAST

#define CONSP_CAST (   x)    LIST(x)

Definition at line 142 of file genC.h.

◆ consp_CAST

#define consp_CAST (   x)    LIST(x)

Definition at line 150 of file genC.h.

◆ CONSP_TYPE

#define CONSP_TYPE   list

Definition at line 126 of file genC.h.

◆ consp_TYPE

#define consp_TYPE   list

Definition at line 134 of file genC.h.

◆ FLOAT

#define FLOAT (   x)    ((x).f)

Definition at line 86 of file genC.h.

◆ FLOAT_CAST

#define FLOAT_CAST (   x)    FLOAT(x)

Definition at line 116 of file genC.h.

◆ float_CAST

#define float_CAST (   x)    FLOAT(x)

Definition at line 123 of file genC.h.

◆ FLOAT_NEWGEN_DOMAIN

#define FLOAT_NEWGEN_DOMAIN   (float_domain)

Definition at line 177 of file genC.h.

◆ float_NEWGEN_DOMAIN

#define float_NEWGEN_DOMAIN   (float_domain)

Definition at line 183 of file genC.h.

◆ FLOAT_TYPE

#define FLOAT_TYPE   float

Definition at line 103 of file genC.h.

◆ float_TYPE

#define float_TYPE   float

Definition at line 110 of file genC.h.

◆ GEN_CHECK

#define GEN_CHECK (   e,
 
)    (e)

GEN_CHECK can be used to test run-time coherence of Newgen values.

Definition at line 306 of file genC.h.

◆ GEN_CHECK_ALLOC

#define GEN_CHECK_ALLOC   0

Definition at line 307 of file genC.h.

◆ gen_chunk_undefined

#define gen_chunk_undefined   ((gen_chunk *)(-16))

Definition at line 74 of file genC.h.

◆ gen_chunk_undefined_p

#define gen_chunk_undefined_p (   c)    ((c)==gen_chunk_undefined)

Definition at line 75 of file genC.h.

◆ gen_context_recurse

#define gen_context_recurse (   start,
  ctxt,
  domain_number,
  flt,
  rwt 
)     gen_context_recurse((start),(ctxt),(domain_number),((bool (*)(void*,void*))(flt)),((void (*)(void*,void*))(rwt)))

Definition at line 285 of file genC.h.

◆ GEN_DBG_CHECK

#define GEN_DBG_CHECK   8

Definition at line 200 of file genC.h.

◆ GEN_DBG_RECURSE

#define GEN_DBG_RECURSE   16

Definition at line 201 of file genC.h.

◆ GEN_DBG_TRAV

Definition at line 203 of file genC.h.

◆ GEN_DBG_TRAV_LEAF

#define GEN_DBG_TRAV_LEAF   1

Definition at line 197 of file genC.h.

◆ GEN_DBG_TRAV_OBJECT

#define GEN_DBG_TRAV_OBJECT   4

Definition at line 199 of file genC.h.

◆ GEN_DBG_TRAV_SIMPLE

#define GEN_DBG_TRAV_SIMPLE   2

Definition at line 198 of file genC.h.

◆ gen_equal

#define gen_equal (   lhs,
  rhs 
)    (memcmp((lhs),(rhs))==0)

Definition at line 297 of file genC.h.

◆ gen_get_ancestor_type

#define gen_get_ancestor_type (   i,
 
)    gen_get_ancestor(i,o)

Definition at line 276 of file genC.h.

◆ GEN_HEADER

#define GEN_HEADER   (1)

include <sys/stdtypes.h>

The size of the management information inside each Newgen object (in gen_chunks)

Definition at line 45 of file genC.h.

◆ GEN_HEADER_SIZE

#define GEN_HEADER_SIZE   (sizeof(gen_chunk)*GEN_HEADER)

Definition at line 46 of file genC.h.

◆ gen_recurse

#define gen_recurse (   start,
  domain_number,
  flt,
  rwt 
)     gen_recurse((start),(domain_number),((bool (*)(void*))(flt)),((void (*)(void*))(rwt)))

Definition at line 283 of file genC.h.

◆ gen_start_recurse_ancestor_tracking

#define gen_start_recurse_ancestor_tracking ( )    /**NOPE */

Definition at line 279 of file genC.h.

◆ gen_stop_recurse_ancestor_tracking

#define gen_stop_recurse_ancestor_tracking ( )    /**NOPE */

Definition at line 280 of file genC.h.

◆ HASH

#define HASH (   x)    ((x).h)

Definition at line 91 of file genC.h.

◆ HASH_CAST

#define HASH_CAST (   x)    HASH_TABLE(x)

Definition at line 148 of file genC.h.

◆ hash_CAST

#define hash_CAST (   x)    HASH_TABLE(x)

Definition at line 156 of file genC.h.

◆ HASH_TYPE

#define HASH_TYPE   hash_table

Definition at line 132 of file genC.h.

◆ hash_TYPE

#define hash_TYPE   hash_table

Definition at line 140 of file genC.h.

◆ INT

#define INT (   x)    ((x).i)

Definition at line 85 of file genC.h.

◆ INT_CAST

#define INT_CAST (   x)    INT(x)

Definition at line 115 of file genC.h.

◆ int_CAST

#define int_CAST (   x)    INT(x)

Definition at line 122 of file genC.h.

◆ INT_NEWGEN_DOMAIN

#define INT_NEWGEN_DOMAIN   (int_domain)

Definition at line 176 of file genC.h.

◆ int_NEWGEN_DOMAIN

#define int_NEWGEN_DOMAIN   (int_domain)

Definition at line 182 of file genC.h.

◆ INT_TYPE

#define INT_TYPE   int

Definition at line 102 of file genC.h.

◆ int_TYPE

#define int_TYPE   int

Definition at line 109 of file genC.h.

◆ LIST

#define LIST (   x)    ((x).l)

Definition at line 93 of file genC.h.

◆ LIST_CAST

#define LIST_CAST (   x)    LIST(x)

Definition at line 143 of file genC.h.

◆ list_CAST

#define list_CAST (   x)    LIST(x)

Definition at line 151 of file genC.h.

◆ LIST_NEWGEN_DOMAIN

#define LIST_NEWGEN_DOMAIN   (-1) /**means unknown type... */

Definition at line 186 of file genC.h.

◆ LIST_TYPE

#define LIST_TYPE   list

Definition at line 127 of file genC.h.

◆ list_TYPE

#define list_TYPE   list

Definition at line 135 of file genC.h.

◆ MEMORY_INCLUDED

#define MEMORY_INCLUDED

Since C is not-orthogonal (chunk1 == chunk2 is prohibited), this one is needed.

Definition at line 294 of file genC.h.

◆ NEWGEN

#define NEWGEN

Definition at line 25 of file genC.h.

◆ NEWGEN_CHECK_TYPE

#define NEWGEN_CHECK_TYPE (   dom,
  item 
)
Value:
{ \
_int __type = dom, __itype; \
void * __item = (void *) item; \
message_assert("valid required domaine number", \
__type>0 && __type<MAX_DOMAIN); \
if (Domains[__type].domain && \
message_assert("some item", __item!=NULL); \
message_assert("item is defined", __item!=gen_chunk_undefined); \
__itype = ((gen_chunk*) __item)->i; \
if (__itype!=__type) { \
message_assert("valid item domain number", \
__itype>0 && __itype<MAX_DOMAIN); \
fprintf(stderr, "type error: expecting %s, got %s\n", \
Domains[__type].name, Domains[__itype].name); \
message_assert("check type", __itype==__type); \
} \
} \
/**else should I say something? Hmmm... */ \
}
#define gen_chunk_undefined
Definition: genC.h:74
struct gen_binding Domains[MAX_DOMAIN]
in build.c
Definition: genspec_yacc.c:114
@ CONSTRUCTED_DT
#define MAX_DOMAIN
MAX_DOMAIN is the maximum number of entries in the DOMAINS table.
A DOMAIN union describes the structure of a user type.
struct domain::@7 co
int type
EXTERNAL.
A gen_chunk is used to store every object.
Definition: genC.h:58

this macro does about the same as gen_check, but inlined and safer.

the item must be some newgen allocated structure.

Definition at line 313 of file genC.h.

◆ SET

#define SET (   x)    ((x).t)

Definition at line 94 of file genC.h.

◆ SET_CAST

#define SET_CAST (   x)    SET(x)

Definition at line 145 of file genC.h.

◆ set_CAST

#define set_CAST (   x)    SET(x)

Definition at line 153 of file genC.h.

◆ SET_TYPE

#define SET_TYPE   set

Definition at line 129 of file genC.h.

◆ set_TYPE

#define set_TYPE   set

Definition at line 137 of file genC.h.

◆ SETP

#define SETP (   x)    ((x).t)

Definition at line 89 of file genC.h.

◆ SETP_CAST

#define SETP_CAST (   x)    SET(x)

Definition at line 144 of file genC.h.

◆ setp_CAST

#define setp_CAST (   x)    SET(x)

Definition at line 152 of file genC.h.

◆ SETP_TYPE

#define SETP_TYPE   set

Definition at line 128 of file genC.h.

◆ setp_TYPE

#define setp_TYPE   set

Definition at line 136 of file genC.h.

◆ STRING

#define STRING (   x)    ((x).s)

Definition at line 87 of file genC.h.

◆ STRING_CAST

#define STRING_CAST (   x)    STRING(x)

Definition at line 117 of file genC.h.

◆ string_CAST

#define string_CAST (   x)    STRING(x)

Definition at line 124 of file genC.h.

◆ STRING_NEWGEN_DOMAIN

#define STRING_NEWGEN_DOMAIN   (string_domain)

Definition at line 178 of file genC.h.

◆ string_NEWGEN_DOMAIN

#define string_NEWGEN_DOMAIN   (string_domain)

Definition at line 184 of file genC.h.

◆ STRING_TYPE

#define STRING_TYPE   string

Definition at line 104 of file genC.h.

◆ string_TYPE

#define string_TYPE   string

Definition at line 111 of file genC.h.

◆ UNIT

#define UNIT (   x)    "You don't want to take the value of a unit type, do you?"

Definition at line 82 of file genC.h.

◆ UNIT_TYPE

#define UNIT_TYPE   "You don't want a unit type, do you?"

for the MAP macro to handle simple types correctly.

FC.

Definition at line 99 of file genC.h.

◆ VOID_STAR

#define VOID_STAR (   x)    ((x).e)

Definition at line 95 of file genC.h.

◆ VOID_STAR_CAST

#define VOID_STAR_CAST (   x)    VOID_STAR(x)

Definition at line 118 of file genC.h.

◆ VOID_STAR_TYPE

#define VOID_STAR_TYPE   void *

Definition at line 105 of file genC.h.

Typedef Documentation

◆ gen_chunk

typedef union gen_chunk gen_chunk

A gen_chunk is used to store every object.

It has to be able to store, at least, a (CHUNK *) and every inlinable value. To use a union is a trick to enable the assignment opereator and the ability of passing and returning them as values (for function): this requires a sufficiently clever compiler ! * Note that the field name of inlinable types have to begin with the same letter as the type itself (this can be fixed if necessary but why bother). This characteristic is used by the Newgen code generator.

◆ gen_chunkp

typedef union gen_chunk * gen_chunkp

◆ gen_extract_func_t

typedef void*() gen_extract_func_t(const gen_chunk)

Definition at line 72 of file genC.h.

Enumeration Type Documentation

◆ internal_type

some other macros need the domain number to keep track of the type.

they are provided here for the internal types.

Enumerator
unit_domain 

Should start at 1 to be able to iterate on them with gen_recurse() functions.

bool_domain 
char_domain 
int_domain 
intptr_t_domain 
_int_domain 
float_domain 
string_domain 

Definition at line 161 of file genC.h.

161  {
162  unit_domain = 0, /**< Should start at 1 to be able to iterate on them with
163  gen_recurse() functions */
164  bool_domain,
165  char_domain,
166  int_domain,
169  float_domain,
171 };
@ _int_domain
Definition: genC.h:168
@ int_domain
Definition: genC.h:166
@ unit_domain
Should start at 1 to be able to iterate on them with gen_recurse() functions.
Definition: genC.h:162
@ float_domain
Definition: genC.h:169
@ bool_domain
Definition: genC.h:164
@ intptr_t_domain
Definition: genC.h:167
@ char_domain
Definition: genC.h:165
@ string_domain
Definition: genC.h:170

Function Documentation

◆ current_shared_obj_table_size()

int current_shared_obj_table_size ( void  )

for debug

for debug

for FI and debugging purposes... FC

Definition at line 654 of file genClib.c.

655 {
657 }
static hash_table obj_table
The OBJ_TABLE maps objects to addresses within the arrays FIRST_SEEN and SEEN_ONCE.
Definition: genClib.c:648
int hash_table_own_allocated_memory(hash_table htp)
Definition: hash.c:869

References hash_table_own_allocated_memory(), and obj_table.

Referenced by rice_dependence_graph().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gen_context_recurse()

void gen_context_recurse ( void *  start,
void *  context,
int  domain_number,
bool(*)(void *, void *context flt,
void(*)(void *, void *context rwt 
)

◆ GEN_PROTO() [1/17]

void gen_read_spec GEN_PROTO ( (char *,...)  )

◆ GEN_PROTO() [2/17]

gen_chunk* gen_read GEN_PROTO ( (FILE *)  )

◆ GEN_PROTO() [3/17]

void gen_write GEN_PROTO ( (FILE *, gen_chunk *)  )

◆ GEN_PROTO() [4/17]

int gen_read_and_check_tabulated GEN_PROTO ( (FILE *, int )

◆ GEN_PROTO() [5/17]

bool gen_false GEN_PROTO ( (gen_chunk *)  )

recursion and utilities

◆ GEN_PROTO() [6/17]

bool gen_sharing_p GEN_PROTO ( (gen_chunk *, gen_chunk *)  )

◆ GEN_PROTO() [7/17]

gen_chunk* gen_check GEN_PROTO ( (gen_chunk *, int )

◆ GEN_PROTO() [8/17]

bool gen_false2 GEN_PROTO ( (gen_chunk *, void *)  )

◆ GEN_PROTO() [9/17]

int gen_tabulated_consistent_p GEN_PROTO ( (int )

exported type translation functions.

◆ GEN_PROTO() [10/17]

gen_chunk* gen_alloc GEN_PROTO ( (int, int, int,...)  )

◆ GEN_PROTO() [11/17]

void gen_init_external GEN_PROTO ( (int, void *(*)(FILE *, int(*)(void)), void(*)(FILE *, void *), void(*)(void *), void *(*)(void *), int(*)(void *))  )

◆ GEN_PROTO() [12/17]

void gen_type_translation_write GEN_PROTO ( (string )

◆ GEN_PROTO() [13/17]

void gen_recurse_stop GEN_PROTO ( (void *)  )

◆ GEN_PROTO() [14/17]

void *gen_NULL2 GEN_PROTO ( (void *, void *)  )

◆ GEN_PROTO() [15/17]

void gen_full_recurse GEN_PROTO ( (void *, void *,...)  )

◆ GEN_PROTO() [16/17]

void gen_multi_recurse GEN_PROTO ( (void *,...)  )

◆ GEN_PROTO() [17/17]

void gen_type_translation_default GEN_PROTO ( (void)  )

◆ gen_recurse()

void gen_recurse ( void *  start,
int  domain_number,
bool(*)(void *)  flt,
void(*)(void *)  rwt 
)

Variable Documentation

◆ gen_debug

int gen_debug
extern

Function interface for user applications.

Function interface for user applications.

If you set gen_debug dynamically with gdb, do not forget to set gen_debug_indent to a positive enough value to avoid problems when gen_trav_obj() moves upwards the point it was when gen_debug was set

Definition at line 69 of file genClib.c.

Referenced by do_loop_unroll_with_epilogue(), do_loop_unroll_with_prologue(), full_loop_unroll(), gen_consistent_p(), gen_trav_leaf(), gen_trav_obj(), gen_trav_simple(), init_gen_quick_recurse_tables(), initialize_DirectDomainsTable(), initialize_domain_DecisionTables(), and initialize_domain_DirectDomainsTable().