PIPS
newgen-local.h
Go to the documentation of this file.
1 /*
2 
3  $Id: newgen-local.h 23065 2016-03-02 09:05:50Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 
25 /* mapping.h inclusion
26  *
27  * I do that because this file was previously included in genC.h,
28  * but the macros defined here use ri types (statement, entity...).
29  * three typedef are also included here. ri.h is a prerequisit for
30  * mapping.h.
31  *
32  * FC, Feb 21, 1994
33  */
34 
35 #define STATEMENT_ORDERING_UNDEFINED (-1)
36 
37 /* these macros are obsolete! newgen functions (->) should be used
38  * instead
39  */
40 #ifndef STATEMENT_MAPPING_INCLUDED
41 #define STATEMENT_MAPPING_INCLUDED
43 #define MAKE_STATEMENT_MAPPING() \
44  (statement_mapping) hash_table_make(hash_pointer, 0)
45 #define FREE_STATEMENT_MAPPING(map) \
46  (hash_table_free((hash_table) (map)))
47 #define SET_STATEMENT_MAPPING(map, stat, val) \
48  hash_put((hash_table) (map), (char *)(stat), (char *)(val))
49 #define GET_STATEMENT_MAPPING(map, stat) \
50  hash_get((hash_table) (map), (char *) (stat))
51 #define STATEMENT_MAPPING_COUNT(map) \
52  hash_table_entry_count((hash_table) map)
53 #define STATEMENT_MAPPING_MAP(s, v, code, h) \
54  HASH_MAP(s, v, code, h)
55 /*
56  * this warrant BA Macro Compatibility:
57  */
58 #define DEFINE_CURRENT_MAPPING(name, type) \
59  GENERIC_CURRENT_MAPPING(name, type, statement)
60 #endif
61 
62 #ifndef ENTITY_MAPPING_INCLUDED
63 #define ENTITY_MAPPING_INCLUDED
65 #define MAKE_ENTITY_MAPPING() \
66  ((entity_mapping) hash_table_make(hash_pointer, 0))
67 #define FREE_ENTITY_MAPPING(map) \
68  (hash_table_free((hash_table) (map)))
69 #define SET_ENTITY_MAPPING(map, ent, val) \
70  hash_put((hash_table) (map), (char *)(ent), (char *)(val))
71 #define GET_ENTITY_MAPPING(map, ent) \
72  hash_get((hash_table) (map), (char *)(ent))
73 #define ENTITY_MAPPING_COUNT(map) \
74  hash_table_entry_count((hash_table) map)
75 #define ENTITY_MAPPING_MAP(s, v, code, h) \
76  HASH_MAP(s, v, code, h)
77 #endif
78 
79 #ifndef CONTROL_MAPPING_INCLUDED
80 #define CONTROL_MAPPING_INCLUDED
82 #define MAKE_CONTROL_MAPPING() \
83  ((control_mapping) hash_table_make(hash_pointer, 0))
84 #define FREE_CONTROL_MAPPING(map) \
85  (hash_table_free((hash_table) (map)))
86 #define SET_CONTROL_MAPPING(map, cont, val) \
87  hash_put((hash_table) (map), (char *)(cont), (char *)(val))
88 #define GET_CONTROL_MAPPING(map, cont) \
89  hash_get((hash_table) (map), (char *)(cont))
90 #define CONTROL_MAPPING_COUNT(map) \
91  hash_table_entry_count((hash_table) map)
92 #define CONTROL_MAPPING_MAP(s, v, code, h) \
93  HASH_MAP(s, v, code, h)
94 #endif
hash_table entity_mapping
Definition: newgen-local.h:64
hash_table statement_mapping
these macros are obsolete! newgen functions (->) should be used instead
Definition: newgen-local.h:42
hash_table control_mapping
Definition: newgen-local.h:81