pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:8670:       if(e && p->inherits[e].prog)    gc_mark_program_as_referenced(p->inherits[e].prog);    }      #if defined (PIKE_DEBUG) || defined (DO_PIKE_CLEANUP)    for (e = p->num_identifiers - 1; e >= 0; e--)    gc_mark_type_as_referenced (p->identifiers[e].type);   #endif    +  for (e = p->num_annotations-1; e >= 0; e--) { +  if (p->annotations[e]) +  gc_mark_array_as_referenced(p->annotations[e]); +  }    } GC_LEAVE;   }      void real_gc_cycle_check_program(struct program *p, int weak)   {    GC_CYCLE_ENTER(p, T_PROGRAM, weak) {    int e;       if (!(p->flags & PROGRAM_AVOID_CHECK))    {
pike.git/src/program.c:8692:       for(e = p->num_inherits - 1; e >= 0; e--)    {    if(p->inherits[e].parent)    gc_cycle_check_object(p->inherits[e].parent, 0);       if(e && p->inherits[e].prog)    gc_cycle_check_program(p->inherits[e].prog, 0);    }    +  for (e = p->num_annotations - 1; e >= 0; e--) { +  if (p->annotations[e]) +  gc_cycle_check_array(p->annotations[e], 0); +  } +     /* Strong ref follows. It must be last. */    if(p->parent)    gc_cycle_check_program(p->parent, 0);    }    } GC_CYCLE_LEAVE;   }      static void gc_check_program(struct program *p)   {    int e;
pike.git/src/program.c:8753: Inside #if defined (PIKE_DEBUG) || defined (DO_PIKE_CLEANUP)
   for(e = p->num_identifiers - 1; e >= 0; e--)    debug_gc_check (p->identifiers[e].name,    " as identifier name in a program");    }       for(e = p->num_identifiers - 1; e >= 0; e--)    debug_gc_check (p->identifiers[e].type,    " as identifier type in a program");   #endif    +  for (e = p->num_annotations - 1; e >= 0; e--) { +  if (p->annotations[e]) +  debug_gc_check(p->annotations[e], " as annotations in a program"); +  }    } GC_LEAVE;   }      unsigned gc_touch_all_programs(void)   {    unsigned n = 0;    struct program *p;    if (first_program && first_program->prev)    Pike_fatal("Error in program link list.\n");    for (p = first_program; p; p = p->next) {
pike.git/src/program.c:8850:    free_object(p->inherits[e].parent);    p->inherits[e].parent=0;    }    if(e && p->inherits[e].prog)    {    free_program(p->inherits[e].prog);    p->inherits[e].prog=0;    }    }    +  for (e = 0; e < p->num_annotations; e++) { +  do_free_array(p->annotations[e]); +  p->annotations[e] = NULL; +  } +     gc_free_extra_ref(p);    SET_NEXT_AND_FREE(p, free_program);   #ifdef PIKE_DEBUG    if (first) gc_internal_program = next;   #endif    }else{    next=p->next;   #ifdef PIKE_DEBUG    first = 0;   #endif