Branch: Tag:

2001-01-24

2001-01-24 08:17:45 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

stack_size -> Pike_stack_size

Rev: src/interpret.c:1.183
Rev: src/interpret.h:1.76
Rev: src/interpreter.h:1.55
Rev: src/main.c:1.110
Rev: src/modules/Java/jvm.c:1.32
Rev: src/threads.c:1.150
Rev: src/threads.h:1.111

5:   \*/   /**/   #include "global.h" - RCSID("$Id: interpret.c,v 1.182 2001/01/12 02:09:28 mast Exp $"); + RCSID("$Id: interpret.c,v 1.183 2001/01/24 08:17:27 hubbe Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"
82:    * (much simpler than letting it point at the last used value.)    */   PMOD_EXPORT struct Pike_interpreter Pike_interpreter; - PMOD_EXPORT int stack_size = EVALUATOR_STACK_SIZE; + PMOD_EXPORT int Pike_stack_size = EVALUATOR_STACK_SIZE;         /* mark stack, used to store markers into the normal stack */
90:      void push_sp_mark(void)   { -  if(Pike_mark_sp == Pike_interpreter.mark_stack + stack_size) +  if(Pike_mark_sp == Pike_interpreter.mark_stack + Pike_stack_size)    Pike_error("No more mark stack!\n");    *Pike_mark_sp++=Pike_sp;   }
165:       Pike_interpreter.evaluator_stack_malloced=0;    mark_stack_malloced=0; -  Pike_interpreter.evaluator_stack=MMALLOC(stack_size,struct svalue); -  Pike_interpreter.mark_stack=MMALLOC(stack_size, struct svalue *); +  Pike_interpreter.evaluator_stack=MMALLOC(Pike_stack_size,struct svalue); +  Pike_interpreter.mark_stack=MMALLOC(Pike_stack_size, struct svalue *);    if((char *)MAP_FAILED == (char *)Pike_interpreter.evaluator_stack) Pike_interpreter.evaluator_stack=0;    if((char *)MAP_FAILED == (char *)Pike_interpreter.mark_stack) Pike_interpreter.mark_stack=0;   #else
177:   use_malloc:    if(!Pike_interpreter.evaluator_stack)    { -  Pike_interpreter.evaluator_stack=(struct svalue *)xalloc(stack_size*sizeof(struct svalue)); +  Pike_interpreter.evaluator_stack=(struct svalue *)xalloc(Pike_stack_size*sizeof(struct svalue));    Pike_interpreter.evaluator_stack_malloced=1;    }       if(!Pike_interpreter.mark_stack)    { -  Pike_interpreter.mark_stack=(struct svalue **)xalloc(stack_size*sizeof(struct svalue *)); +  Pike_interpreter.mark_stack=(struct svalue **)xalloc(Pike_stack_size*sizeof(struct svalue *));    mark_stack_malloced=1;    }   
1637: Inside #if defined(PIKE_DEBUG)
      debug_check_stack();    -  if(Pike_sp > &(Pike_interpreter.evaluator_stack[stack_size])) +  if(Pike_sp > &(Pike_interpreter.evaluator_stack[Pike_stack_size]))    fatal("Svalue stack overflow. "    "(%ld entries on stack, stack_size is %ld entries)\n",    PTRDIFF_T_TO_LONG(Pike_sp - Pike_interpreter.evaluator_stack), -  PTRDIFF_T_TO_LONG(stack_size)); +  PTRDIFF_T_TO_LONG(Pike_stack_size));    -  if(Pike_mark_sp > &(Pike_interpreter.mark_stack[stack_size])) +  if(Pike_mark_sp > &(Pike_interpreter.mark_stack[Pike_stack_size]))    fatal("Mark stack overflow.\n");       if(Pike_mark_sp < Pike_interpreter.mark_stack)
1660: Inside #if defined(PIKE_DEBUG)
   s=*m;    }    -  if(s > &(Pike_interpreter.evaluator_stack[stack_size])) +  if(s > &(Pike_interpreter.evaluator_stack[Pike_stack_size]))    fatal("Mark stack exceeds svalue stack\n");       for(f=Pike_fp;f;f=f->next)
1668: Inside #if defined(PIKE_DEBUG)
   if(f->locals)    {    if(f->locals < Pike_interpreter.evaluator_stack || -  f->locals > &(Pike_interpreter.evaluator_stack[stack_size])) +  f->locals > &(Pike_interpreter.evaluator_stack[Pike_stack_size]))    fatal("Local variable pointer points to Finspång.\n");    -  if(f->args < 0 || f->args > stack_size) +  if(f->args < 0 || f->args > Pike_stack_size)    fatal("FEL FEL FEL! HELP!! (corrupted pike_frame)\n");    }    }
1711: Inside #if defined(USE_MMAP_FOR_STACK)
  #ifdef USE_MMAP_FOR_STACK    if(!Pike_interpreter.evaluator_stack_malloced)    { -  munmap((char *)Pike_interpreter.evaluator_stack, stack_size*sizeof(struct svalue)); +  munmap((char *)Pike_interpreter.evaluator_stack, Pike_stack_size*sizeof(struct svalue));    Pike_interpreter.evaluator_stack=0;    }    if(!mark_stack_malloced)    { -  munmap((char *)Pike_interpreter.mark_stack, stack_size*sizeof(struct svalue *)); +  munmap((char *)Pike_interpreter.mark_stack, Pike_stack_size*sizeof(struct svalue *));    Pike_interpreter.mark_stack=0;    }   #endif
1743:    free_all_pike_frame_blocks();   #endif   } +