pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: program.c,v 1.496 2005/05/30 12:43:04 mast Exp $ + || $Id: program.c,v 1.497 2005/06/09 09:25:43 grubba Exp $   */      #include "global.h" - RCSID("$Id: program.c,v 1.496 2005/05/30 12:43:04 mast Exp $"); + RCSID("$Id: program.c,v 1.497 2005/06/09 09:25:43 grubba Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "language.h"   #include "lex.h"   #include "pike_macros.h"   #include "fsort.h"
pike.git/src/program.c:2019:    DOUBLEUNLINK(first_program, p);      #if defined(PIKE_USE_MACHINE_CODE) && defined(VALGRIND_DISCARD_TRANSLATIONS)    if(p->program) {    VALGRIND_DISCARD_TRANSLATIONS(p->program,    p->num_program*sizeof(p->program[0]));    }   #endif /* PIKE_USE_MACHINE_CODE && VALGRIND_DISCARD_TRANSLATIONS */    if(p->flags & PROGRAM_OPTIMIZED)    { -  if(p->program) { +    #ifdef PIKE_USE_MACHINE_CODE -  mexec_free(p->program); +  do { +  /* NOTE: Assumes all BAR's are before any FOO. */ + #define BAR(NUMTYPE,TYPE,NAME) \ +  if (p->NAME) mexec_free(p->NAME); + #define FOO(NUMTYPE,TYPE,NAME) \ +  if (p->NAME) { \ +  dmfree(p->NAME); \ +  break; \ +  } + #include "program_areas.h" +  } while(0);   #else /* PIKE_USE_MACHINE_CODE */ -  +  if(p->program) {    dmfree(p->program); - #endif /* PIKE_USE_MACHINE_CODE */ +     } -  + #endif /* PIKE_USE_MACHINE_CODE */   #define FOO(NUMTYPE,TYPE,NAME) p->NAME=0;   #include "program_areas.h"    }else{   #ifdef PIKE_USE_MACHINE_CODE   #define BAR(NUMTYPE,TYPE,NAME) \    if(p->NAME) { mexec_free((char *)p->NAME); p->NAME=0; }   #endif /* PIKE_USE_MACHINE_CODE */   #define FOO(NUMTYPE,TYPE,NAME) \    if(p->NAME) { dmfree((char *)p->NAME); p->NAME=0; }   #include "program_areas.h"