+#endif
+ /* Only the assertions: */
+ if (get_entity_peculiarity(method) == peculiarity_existent) {
+ if ((get_entity_visibility(method) == visibility_external_allocated)
+ && (NULL == get_entity_irg(method))) {
+ } else {
+ assert(get_entity_irg(method) != NULL);
+ }
+ }
+ if (get_entity_peculiarity(method) == peculiarity_inherited) {
+ entity *impl_ent = get_inherited_methods_implementation(method);
+ if (get_entity_visibility(impl_ent) == visibility_external_allocated) {
+ assert(get_entity_irg(impl_ent) == NULL);
+ } else {
+ assert(get_entity_irg(impl_ent) != NULL);
+ }
+ }
+
+ /* Add the implementation to the set if it contains an irg, else
+ remember that there are more methods called. */
+ /* @@@ We could also add unknown_entity, or the entities with the
+ unknown irgs. The first case would result in the exact same
+ behavior: all unknown irgs are represented by the one and only
+ unknown entity. If we add all entities, we known the number of
+ entities possibly called, and whether there are real unknown
+ entities, i.e, such not represented in the type description.
+ This would be better for an analysis: it could rule out more
+ cases. */
+ impl = method;
+ if (get_entity_peculiarity(method) == peculiarity_inherited)
+ impl = get_inherited_methods_implementation(method);
+
+ if (get_entity_peculiarity(method) != peculiarity_description) {
+ //if (get_entity_irg(impl)) {
+ eset_insert(set, impl);
+ ++(*size);
+ //} else {
+ /* GL: better: eset_insert(set, unknown_entity); */
+ //*open = true;
+ //}
+ }
+
+ /*- recursive descent -*/