int i;
- init_firm ();
+ init_firm (NULL);
set_optimize(1);
set_opt_inline (1);
owner is the global type. */
owner = get_glob_type();
/* Main has zero parameters and one result. */
- proc_main = new_type_method(id_from_str("main", 4), 0, 1);
+ proc_main = new_type_method(id_from_str("OO_INLINE_EXAMPLE_main", 22), 0, 1);
/* The result type is int. */
set_method_res_type(proc_main, 0, prim_t_int);
/* The entity for main. */
- proc_main_e = new_entity (owner, id_from_str ("main", 4), proc_main);
+ proc_main_e = new_entity (owner, id_from_str ("OO_INLINE_EXAMPLE_main", 22), proc_main);
/** Build code for procedure main. **/
/* We need one local variable (for "o"). */
set_irp_main_irg(main_irg);
/* Make the constants. They are independent of a block. */
- c2 = new_Const (mode_Is, tarval_from_long (mode_Is, 2));
- c5 = new_Const (mode_Is, tarval_from_long (mode_Is, 5));
+ c2 = new_Const (mode_Is, new_tarval_from_long (2, mode_Is));
+ c5 = new_Const (mode_Is, new_tarval_from_long (5, mode_Is));
/* There is only one block in main, it contains the allocation and the calls. */
/* Allocate the defined object and generate the type information. */
set_value(0, self);
par1 = new_Proj(get_irg_args(c_irg), mode_Is, 1);
set_value(1, par1);
- set_value(2, new_Const (mode_Is, tarval_from_long (mode_Is, 0)));
+ set_value(2, new_Const (mode_Is, new_tarval_from_long (0, mode_Is)));
x = new_Jmp();
mature_block (get_irg_current_block(c_irg));
/* generate a block for the loop header and the conditional branch */
r = new_immBlock ();
add_in_edge (r, x);
- x = new_Cond (new_Proj(new_Cmp(new_Const (mode_Is, tarval_from_long (mode_Is, 0)),
- new_Const (mode_Is, tarval_from_long (mode_Is, 0))),
+ x = new_Cond (new_Proj(new_Cmp(new_Const (mode_Is, new_tarval_from_long (0, mode_Is)),
+ new_Const (mode_Is, new_tarval_from_long (0, mode_Is))),
mode_b, Eq));
- /* x = new_Cond (new_Proj(new_Cmp(new_Const (mode_Is, tarval_from_long (mode_Is, 0)),
+ /* x = new_Cond (new_Proj(new_Cmp(new_Const (mode_Is, new_tarval_from_long (0, mode_Is)),
get_value(1, mode_Is)),
mode_b, Eq));*/
f = new_Proj (x, mode_X, 0);