PIPS
dbase.c File Reference
#include "all.h"
+ Include dependency graph for dbase.c:

Go to the source code of this file.

Functions

comp_desc_set list_to_comp_secs (list l_eff)
 list-comp_desc conversion functions
More...
 
list comp_desc_set_to_list (comp_desc_set cset)
 
statement_mapping listmap_to_compsecs_map (statement_mapping l_map)
 
statement_mapping comp_secs_map_to_listmap (statement_mapping compsecs_map)
 
list comp_regions_dup (list l_reg)
 REGIONS AND LISTS OF REGIONS MANIPULATION
More...
 
comp_desc comp_region_dup (comp_desc reg)
 
list comp_region_add_to_regions (comp_desc reg, list l_reg)
 void region_add_to_regions(region reg, list l_reg) input : a region and a list of regions. More...
 

Function Documentation

◆ comp_desc_set_to_list()

list comp_desc_set_to_list ( comp_desc_set  cset)
Parameters
csetset

Definition at line 40 of file dbase.c.

42 {
43  list l_res = comp_desc_set_comp_descs(cset);
44  return l_res;
45 }
#define comp_desc_set_comp_descs(x)
Definition: compsec.h:213
The structure used to build lists in NewGen.
Definition: newgen_list.h:41

References comp_desc_set_comp_descs.

Referenced by comp_secs_map_to_listmap(), and get_any_comp_regions_text().

+ Here is the caller graph for this function:

◆ comp_region_add_to_regions()

list comp_region_add_to_regions ( comp_desc  reg,
list  l_reg 
)

void region_add_to_regions(region reg, list l_reg) input : a region and a list of regions.

output : nothing. modifies : l_reg. comment : adds reg at the end of l_reg.

Parameters
regeg
l_reg_reg

Definition at line 111 of file dbase.c.

112 {
113  return gen_nconc(l_reg, CONS(COMP_DESC, reg, NIL));
114 }
#define COMP_DESC(x)
COMP_DESC.
Definition: compsec.h:146
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
Definition: list.c:344

References COMP_DESC, CONS, gen_nconc(), and NIL.

Referenced by comp_regions_dup().

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

◆ comp_region_dup()

comp_desc comp_region_dup ( comp_desc  reg)

debug_region_consistency(reg);

work around persistency of comp_desc reference

Parameters
regeg

Definition at line 95 of file dbase.c.

96 {
97  comp_desc new_reg;
98 
99  /* debug_region_consistency(reg); */
100  new_reg = copy_comp_desc(reg);
101  /* work around persistency of comp_desc reference */
103  return(new_reg);
104 }
comp_desc copy_comp_desc(comp_desc p)
COMP_DESC.
Definition: compsec.c:60
reference copy_reference(reference p)
REFERENCE.
Definition: ri.c:2047
#define comp_desc_reference(x)
Definition: compsec.h:177

References comp_desc_reference, copy_comp_desc(), and copy_reference().

Referenced by comp_regions_dup().

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

◆ comp_regions_dup()

list comp_regions_dup ( list  l_reg)

REGIONS AND LISTS OF REGIONS MANIPULATION

list comp_regions_dup(list l_reg) input : a list of comp_regions. output : a new list of regions, in which each region of the initial list is duplicated. modifies : nothing.

Parameters
l_reg_reg

Definition at line 82 of file dbase.c.

83 {
84  list l_reg_dup = NIL;
85 
86  MAP(COMP_DESC, reg,
87  {
88  comp_desc reg_dup = comp_region_dup(reg);
89  l_reg_dup = comp_region_add_to_regions(reg_dup, l_reg_dup);
90  }, l_reg);
91 
92  return(l_reg_dup);
93 }
list comp_region_add_to_regions(comp_desc reg, list l_reg)
void region_add_to_regions(region reg, list l_reg) input : a region and a list of regions.
Definition: dbase.c:111
comp_desc comp_region_dup(comp_desc reg)
Definition: dbase.c:95
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
Definition: newgen_list.h:226

References COMP_DESC, comp_region_add_to_regions(), comp_region_dup(), MAP, and NIL.

Referenced by comp_regions_of_statement().

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

◆ comp_secs_map_to_listmap()

statement_mapping comp_secs_map_to_listmap ( statement_mapping  compsecs_map)
Parameters
compsecs_mapompsecs_map

Definition at line 60 of file dbase.c.

62 {
64 
65  STATEMENT_MAPPING_MAP(s,val,{
66  hash_put((hash_table) l_map, (char *) s, (char *) comp_desc_set_to_list((comp_desc_set) val));
67  }, compsecs_map);
68 
69  return l_map;
70 }
list comp_desc_set_to_list(comp_desc_set cset)
Definition: dbase.c:40
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
Definition: hash.c:364
#define MAKE_STATEMENT_MAPPING()
Definition: newgen-local.h:43
#define STATEMENT_MAPPING_MAP(s, v, code, h)
Definition: newgen-local.h:53

References comp_desc_set_to_list(), hash_put(), MAKE_STATEMENT_MAPPING, and STATEMENT_MAPPING_MAP.

Referenced by get_any_comp_regions_text().

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

◆ list_to_comp_secs()

comp_desc_set list_to_comp_secs ( list  l_eff)

list-comp_desc conversion functions

dbase.c



Parameters
l_eff_eff

Definition at line 33 of file dbase.c.

35 {
36  comp_desc_set res = make_comp_desc_set(l_eff);
37  return res;
38 }
comp_desc_set make_comp_desc_set(list a)
Definition: compsec.c:138

References make_comp_desc_set().

Referenced by listmap_to_compsecs_map().

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

◆ listmap_to_compsecs_map()

statement_mapping listmap_to_compsecs_map ( statement_mapping  l_map)
Parameters
l_map_map

Definition at line 47 of file dbase.c.

49 {
50  statement_mapping comp_secs_map = MAKE_STATEMENT_MAPPING();
51 
53  {
54  hash_put((hash_table) comp_secs_map, (char *) s, (char *) list_to_comp_secs((list) val));
55  }, l_map);
56 
57  return comp_secs_map;
58 }
comp_desc_set list_to_comp_secs(list l_eff)
list-comp_desc conversion functions
Definition: dbase.c:33

References hash_put(), list_to_comp_secs(), MAKE_STATEMENT_MAPPING, and STATEMENT_MAPPING_MAP.

Referenced by comp_regions().

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