Branch: Tag:

2019-02-22

2019-02-22 15:20:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

GC: Moved gc_{check,recurse}_frame() to earlier in builtin.cmod.

67:   #define SET_ZONE(this, VAL) ((this)->extra.tm_zone = (VAL))   #endif    + static void gc_check_frame(struct pike_frame *f) + { +  if(f->flags & PIKE_FRAME_MALLOCED_LOCALS) +  { +  if(f->current_object) +  debug_gc_check (f->current_object, " as current_object in a frame"); +  if(f->current_program) +  debug_gc_check (f->current_program, " as current_program in a frame"); +  debug_gc_check_svalues (f->locals, f->num_locals, " in locals of a frame"); +  if(f->scope && !debug_gc_check (f->scope, " as scope frame of a frame")) +  gc_check_frame(f->scope); +  } + } +  + static void gc_recurse_frame(struct pike_frame *f) + { +  if(f->current_object) +  gc_recurse_object(f->current_object); +  if(f->current_program) +  gc_recurse_program(f->current_program); +  if(f->flags & PIKE_FRAME_MALLOCED_LOCALS) +  gc_recurse_svalues(f->locals,f->num_locals); +  if(f->scope) +  gc_recurse_frame(f->scope); + } +    DECLARATIONS      /*! @module System
5975:    }    }    -  static void gc_check_frame(struct pike_frame *f) -  { -  if(f->flags & PIKE_FRAME_MALLOCED_LOCALS) -  { -  if(f->current_object) -  debug_gc_check (f->current_object, " as current_object in trampoline frame"); -  if(f->current_program) -  debug_gc_check (f->current_program, " as current_program in trampoline frame"); -  debug_gc_check_svalues (f->locals, f->num_locals, " in locals of trampoline frame"); -  if(f->scope && !debug_gc_check (f->scope, " as scope frame of trampoline frame")) -  gc_check_frame(f->scope); -  } -  } -  +     GC_CHECK    {    if (THIS->trampoline.frame &&
5996:    gc_check_frame(THIS->trampoline.frame);    }    -  static void gc_recurse_frame(struct pike_frame *f) -  { -  if(f->current_object) gc_recurse_object(f->current_object); -  if(f->current_program) gc_recurse_program(f->current_program); -  if(f->flags & PIKE_FRAME_MALLOCED_LOCALS) -  gc_recurse_svalues(f->locals,f->num_locals); -  if(f->scope) gc_recurse_frame(f->scope); -  } -  +     GC_RECURSE    {    if (THIS->trampoline.frame) gc_recurse_frame(THIS->trampoline.frame);