- ent = new_entity ((type *)owner,
- id_from_str (METHODNAME, strlen(METHODNAME)),
- (type *)proc_main);
-
-#define RES_NAME "int"
- typ = new_type_primitive(id_from_str(RES_NAME, strlen(RES_NAME)), mode_i);
- set_method_param_type(proc_main, 0, (type*)typ);
- set_method_res_type(proc_main, 0, (type*)typ);
-
- /* Generates start and end blocks and nodes and a first, initial block */
- irg = new_ir_graph (ent, 2);
-
- /* The value position used for a: */
+ /* The entity for the procedure */
+ ent = new_entity (owner,
+ new_id_from_chars (METHODNAME, strlen(METHODNAME)),
+ proc_main);
+ /* The type int. This type is necessary to model the result and parameters
+ the procedure. */
+#define PRIM_NAME "int"
+ typ = new_type_primitive(new_id_from_chars(PRIM_NAME, strlen(PRIM_NAME)), mode_Is);
+ /* The parameter and result types of the procedure. */
+ set_method_param_type(proc_main, 0, typ);
+ set_method_res_type(proc_main, 0, typ);
+
+ /** The code of the procedure **/
+
+ /* Generates start and end blocks and nodes, and a first, initial block */
+#define NRLOCS 2
+ irg = new_ir_graph (ent, NRLOCS);
+
+ /* The value position used for: */