- /* If we know the dynamic type, we can replace the Sel by a constant. */
- ptr = get_Sel_ptr(field_ptr); /* The address we select from. */
- dyn_tp = get_dynamic_type(ptr); /* The runtime type of ptr. */
-
- if (dyn_tp != firm_unknown_type) {
- ir_entity *loaded_ent;
-
- /* We know which method will be called, no dispatch necessary. */
- loaded_ent = resolve_ent_polymorphy(dyn_tp, ent);
- /* called_ent may not be description: has no Address/Const to Call! */
- assert(get_entity_peculiarity(loaded_ent) != peculiarity_description);
-
- new_node = copy_const_value(get_irn_dbg_info(n), get_atomic_ent_value(loaded_ent));
- DBG_OPT_POLY(field_ptr, new_node);
-
- return new_node;