- * is a constant entity. Ther dispatch table is also represented
- * by a class type that contains the two methods. There is one entity
+ * is a constant ir_entity. Ther dispatch table is also represented
+ * by a class ir_type that contains the two methods. There is one ir_entity
* of the dispatch table which is constant.
*
* Further the example shows the representation of a constant global
* of the dispatch table which is constant.
*
* Further the example shows the representation of a constant global
* int[4] arre = (7, 2, 13, 92);
**/
* int[4] arre = (7, 2, 13, 92);
**/
{
ident *Ci, *ai, *fi, *fti, *gi, *gti, *inti, *dipti, *diptpi, *diptpei, *diptei;
/* suffix i names identifiers */
{
ident *Ci, *ai, *fi, *fti, *gi, *gti, *inti, *dipti, *diptpi, *diptpei, *diptei;
/* suffix i names identifiers */
- type *Ct, *intt, *ft, *gt, *diptt, *diptpt;
+ ir_type *Ct, *intt, *ft, *gt, *diptt, *diptpt;
- entity *ae, *fe, *ge, *dipte, *diptpe; /* e names entities */
+ ir_entity *ae, *fe, *ge, *dipte, *diptpe; /* e names entities */
+ symconst_symbol sym;
/* Language defined types */
intt = new_type_primitive(inti, mode_Is);
/* Program defined types */
/* Language defined types */
intt = new_type_primitive(inti, mode_Is);
/* Program defined types */
/* Compiler defined types: dispatch table and pointer to it */
diptt = new_type_class(dipti);
diptpt = new_type_pointer(diptpi, diptt, mode_P);
/* Compiler defined types: dispatch table and pointer to it */
diptt = new_type_class(dipti);
diptpt = new_type_pointer(diptpi, diptt, mode_P);
/* parameters of methods */
set_method_param_type(gt, 0, intt);
/* parameters of methods */
set_method_param_type(gt, 0, intt);
dipte = new_entity(get_glob_type(), diptei, diptt);
diptpe = new_entity(Ct, diptpei, diptpt);
dipte = new_entity(get_glob_type(), diptei, diptt);
diptpe = new_entity(Ct, diptpei, diptpt);
set_entity_variability(diptpe, variability_constant);
set_atomic_ent_value(diptpe, n);
set_entity_variability(diptpe, variability_constant);
set_atomic_ent_value(diptpe, n);
set_entity_variability(dipte, variability_constant);
add_compound_ent_value(dipte, get_atomic_ent_value(fe), fe);
add_compound_ent_value(dipte, get_atomic_ent_value(ge), ge);
set_entity_variability(dipte, variability_constant);
add_compound_ent_value(dipte, get_atomic_ent_value(fe), fe);
add_compound_ent_value(dipte, get_atomic_ent_value(ge), ge);
arrei = new_id_from_chars("arr", strlen("arr"));
arrti = new_id_from_chars("arr_t", strlen("arr_t"));
arrei = new_id_from_chars("arr", strlen("arr"));
arrti = new_id_from_chars("arr_t", strlen("arr_t"));
intt = new_type_primitive(inti, mode_Is);
arrt = new_type_array(arrti, 1, intt);
set_array_bounds_int(arrt, 0, 0, 4);
arrelte = get_array_element_entity(arrt);
intt = new_type_primitive(inti, mode_Is);
arrt = new_type_array(arrti, 1, intt);
set_array_bounds_int(arrt, 0, 0, 4);
arrelte = get_array_element_entity(arrt);
arre = new_entity(get_glob_type(), arrei, arrt);
set_entity_variability(arre, variability_constant);
current_ir_graph = get_const_code_irg();
arre = new_entity(get_glob_type(), arrei, arrt);
set_entity_variability(arre, variability_constant);
current_ir_graph = get_const_code_irg();