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.457 2002/11/17 15:31:20 grubba Exp $ + || $Id: program.c,v 1.458 2002/11/19 12:31:49 grubba Exp $   */      #include "global.h" - RCSID("$Id: program.c,v 1.457 2002/11/17 15:31:20 grubba Exp $"); + RCSID("$Id: program.c,v 1.458 2002/11/19 12:31:49 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:799:    TYPE ARG) { \    if(state->malloc_size_program->PIKE_CONCAT(num_,NAME) == \    state->new_program->PIKE_CONCAT(num_,NAME)) { \    TYPE *tmp; \    state->malloc_size_program->PIKE_CONCAT(num_,NAME) *= 2; \    state->malloc_size_program->PIKE_CONCAT(num_,NAME)++; \    tmp = realloc((void *)state->new_program->NAME, \    sizeof(TYPE) * \    state->malloc_size_program-> \    PIKE_CONCAT(num_,NAME)); \ -  if(!tmp) Pike_fatal("Out of memory.\n"); \ +  if(!tmp) Pike_fatal("Out of memory.\n"); \    PIKE_CONCAT(RELOCATE_,NAME)(state->new_program, tmp); \    state->new_program->NAME=tmp; \    } \    state->new_program-> \    NAME[state->new_program->PIKE_CONCAT(num_,NAME)++]=(ARG); \   } \   void PIKE_CONCAT(add_to_,NAME) (TYPE ARG) { \    CHECK_FOO(NUMTYPE,TYPE,NAME); \    PIKE_CONCAT(low_add_to_,NAME) ( Pike_compiler, ARG ); \   }         #include "program_areas.h"       -  + #define add_to_program(ARG) do { \ +  debug_malloc_touch(Pike_compiler->new_program->program); \ +  add_to_program(ARG); \ +  } while(0) +    void ins_int(INT32 i, void (*func)(char tmp))   {    int e;    unsigned char *p = (unsigned char *)&i;    for(e=0;e<(long)sizeof(i);e++) {    func(p[e]);    }   }      void ins_short(INT16 i, void (*func)(char tmp))
pike.git/src/program.c:6995:   #endif      void make_program_executable(struct program *p)   {    mprotect((void *)p->program, p->num_program*sizeof(p->program[0]),    PROT_EXEC | PROT_READ | PROT_WRITE);   #ifdef FLUSH_INSTRUCTION_CACHE    FLUSH_INSTRUCTION_CACHE(p->program,    p->num_program*sizeof(p->program[0]));   #endif /* FLUSH_INSTRUCTION_CACHE */ + #ifdef VALGRIND_DISCARD_TRANSLATIONS +  VALGRIND_DISCARD_TRANSLATIONS(p->program, +  p->num_program*sizeof(p->program[0])); + #endif /* VALGRIND_DISCARD_TRANSLATIONS */   }   #endif