예제 #1
0
파일: ia32_pic.c 프로젝트: 8l/libfirm
static ir_entity *create_pic_symbol(be_main_env_t *be, ir_entity *entity)
{
	ident     *old_id = get_entity_ld_ident(entity);
	ident     *id     = new_id_fmt("%s$non_lazy_ptr", old_id);
	ir_type   *e_type = get_entity_type(entity);
	ir_type   *type   = new_type_pointer(e_type);
	ir_type   *parent = be->pic_symbols_type;
	ir_entity *ent    = new_entity(parent, old_id, type);
	set_entity_ld_ident(ent, id);
	set_entity_visibility(ent, ir_visibility_private);

	return ent;
}
예제 #2
0
void gcji_add_java_lang_class_fields(ir_type *type)
{
	assert(type == type_java_lang_class);
	ir_type *ref_java_lang_class = new_type_pointer(type_java_lang_class);
	add_compound_member(type, "next_or_version", ref_java_lang_class);
	add_compound_member(type, "name", type_reference);
	add_compound_member(type, "accflags", type_ushort);
	add_compound_member(type, "superclass", ref_java_lang_class);
	add_compound_member(type, "constants.size", type_int);
	add_compound_member(type, "constants.tags", type_reference);
	add_compound_member(type, "constants.data", type_reference);
	add_compound_member(type, "methods", type_reference);
	add_compound_member(type, "method_count", type_short);
	add_compound_member(type, "vtable_method_count", type_short);
	add_compound_member(type, "fields", type_reference);
	add_compound_member(type, "size_in_bytes", type_int);
	add_compound_member(type, "field_count", type_short);
	add_compound_member(type, "static_field_count", type_short);
	add_compound_member(type, "vtable", type_reference);
	add_compound_member(type, "otable", type_reference);
	add_compound_member(type, "otable_syms", type_reference);
	add_compound_member(type, "atable", type_reference);
	add_compound_member(type, "atable_syms", type_reference);
	add_compound_member(type, "itable", type_reference);
	add_compound_member(type, "itable_syms", type_reference);
	add_compound_member(type, "catch_classes", type_reference);
	add_compound_member(type, "interfaces", type_reference);
	add_compound_member(type, "loader", type_reference);
	add_compound_member(type, "interface_count", type_short);
	add_compound_member(type, "state", type_byte);
	add_compound_member(type, "thread", type_reference);
	add_compound_member(type, "depth", type_short);
	add_compound_member(type, "ancestors", type_reference);
	add_compound_member(type, "idt", type_reference);
	add_compound_member(type, "arrayclass", type_reference);
	add_compound_member(type, "protectionDomain", type_reference);
	add_compound_member(type, "assertion_table", type_reference);
	add_compound_member(type, "hack_signers", type_reference);
	add_compound_member(type, "chain", type_reference);
	add_compound_member(type, "aux_info", type_reference);
	add_compound_member(type, "engine", type_reference);
	add_compound_member(type, "reflection_data", type_reference);
}