+ /* check for inner functions:
+ * FIXME: need a way to get the argument position for the static link */
+ static_link_arg = 0;
+ for (mem_idx = get_class_n_members(frame_tp); mem_idx > 0;) {
+ ir_entity *ent = get_class_member(frame_tp, --mem_idx);
+ if (is_method_entity(ent)) {
+ ir_graph *inner_irg = get_entity_irg(ent);
+ ir_node *args;
+
+ assure_irg_properties(inner_irg, IR_GRAPH_PROPERTY_CONSISTENT_OUTS);
+ args = get_irg_args(inner_irg);
+ for (unsigned j = get_irn_n_outs(args); j-- > 0; ) {
+ ir_node *arg = get_irn_out(args, j);
+
+ if (get_Proj_proj(arg) == static_link_arg) {
+ for (unsigned k = get_irn_n_outs(arg); k-- > 0; ) {
+ ir_node *succ = get_irn_out(arg, k);
+
+ if (is_Sel(succ)) {
+ ir_entity *ent = get_Sel_entity(succ);
+
+ if (get_entity_owner(ent) == frame_tp) {
+ /* found an access to the outer frame */
+ set_entity_link(ent, ADDRESS_TAKEN);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+