25 #include "pips_config.h"
210 #define INTEGER_DECL " INTEGER"
211 #define REAL_DECL " REAL"
212 #define COMPLEX_DECL " COMPLEX"
213 #define LOGICAL_DECL " LOGICAL"
214 #define DOUBLE_DECL " DOUBLE PRECISION"
215 #define CHARACTER_DECL " CHARACTER"
218 #define NEWLINE "\n *"
219 #define ENDLINE "\nC\n"
220 #define LINE_LENGHT 68
221 #define MARGIN_LENGHT 7
237 int counter = strlen(type_decl);
239 if(var_to_decl !=
NIL)
243 for(l = var_to_decl; l !=
NIL;)
271 new_decls, (
char *) NULL));
struct _newgen_struct_entity_ * entity
expression assign_tmp_to_exp(expression exp, Block *cb)
===========================================================================
hash_table MemToTmp
– codegen.c
void put_stmt_in_Block(statement new_stmt, Block *cb)
===========================================================================
void insert_new_declarations(char *mod_name)
===========================================================================
void store_expression(expression exp, Block *cb)
===========================================================================
static expression find_tmp_of_exp(expression exp)
===========================================================================
void insert_one_type_declaration(entity mod_entity, list var_to_decl, string type_decl)
===========================================================================
static statement current_stmt
list gen_nreverse(list cp)
reverse a list in place
#define NIL
The empty list (nil in Lisp)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#define CAR(pcons)
Get the value of the first element of a list.
void gen_free_list(list l)
free the spine of the list
#define CDR(pcons)
Get the list less its first element.
statement make_assign_statement(expression, expression)
void * hash_get(const hash_table htp, const void *key)
this function retrieves in the hash table pointed to by htp the couple whose key is equal to key.
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.
void * hash_del(hash_table htp, const void *key)
this function removes from the hash table pointed to by htp the couple whose key is equal to key.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define STATEMENT_NUMBER_UNDEFINED
default values
list integer_entities
Make a new variable entity which name is one letter prefix + one incrementing number.
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
code entity_code(entity e)
expression make_entity_expression(entity e, cons *inds)
basic basic_of_expression(expression)
basic basic_of_expression(expression exp): Makes a basic of the same basic as the expression "exp".
entity make_new_entity(basic, int)
bool entity_scalar_p(entity)
The concrete type of e is a scalar type.
#define syntax_reference(x)
#define reference_variable(x)
#define statement_ordering(x)
#define statement_label(x)
#define expression_undefined
#define code_decls_text(x)
#define statement_comments(x)
#define statement_number(x)
#define expression_syntax(x)
#define STATEMENT(x)
STATEMENT.
During the computation, the program has to deal with blocks of statements.
The structure used to build lists in NewGen.
#define exp
Avoid some warnings from "gcc -Wshadow".