31.7.2000 Chris
Fixed a bug, caused by the recursive use in type.h and entity.h.
Deleted the _TYPE_TYPEDEF_ and inserted the _ENTITY_TYPEDEF_ instead.
+ Fixed a problem in if_while testprogram, so it now works.
20.7.2000 Goetz
Fixed bug in optimize(). Returned Null instead n if
{
ir_graph *irg;
type_class *owner;
+ type_method *proc_main;
entity *ent;
ir_node *b, *x, *r, *t, *f;
init_firm ();
+#define METHODNAME "main"
+#define NRARGS 0
+#define NRES 0
+
+ proc_main = new_type_method(id_from_str(METHODNAME, strlen(METHODNAME)),
+ NRARGS, NRES);
owner = new_type_class (id_from_str ("IF_WHILE_EXAMPLE", 16));
- ent = new_entity ((type *)owner, id_from_str ("main", 4), NULL);
+ ent = new_entity ((type *)owner, id_from_str ("main", 4), (type *)proc_main);
/* Generates start and end blocks and nodes and a first, initial block */
irg = new_ir_graph (ent, 4);