pike.git / src / peep.c

version» Context lines:

pike.git/src/peep.c:788:   #endif /* PIKE_DEBUG */       exit_bytecode();       return entry_point;   }      /**** Peephole optimizer ****/      static void do_optimization(int topop, int topush, ...); - static INLINE int opcode(int offset); - static INLINE int argument(int offset); - static INLINE int argument2(int offset); + static inline int opcode(int offset); + static inline int argument(int offset); + static inline int argument2(int offset);      #include "peep_engine.c"      #ifndef PEEP_STACK_SIZE   #define PEEP_STACK_SIZE 256   #endif      /* Stack holding pending instructions.    * Note that instructions must be pushed in reverse order.    */   static long stack_depth = 0;   static p_instr instrstack[PEEP_STACK_SIZE];      int remove_clear_locals=0x7fffffff;   static ptrdiff_t eye, len;   static p_instr *instructions;      /* insopt{0,1,2} push an instruction on instrstack. */    - static INLINE p_instr *insopt2(int f, INT32 a, INT32 b, + static inline p_instr *insopt2(int f, INT32 a, INT32 b,    INT_TYPE cl, struct pike_string *cf)   {    p_instr *p;      #ifdef PIKE_DEBUG    if(!hasarg2(f) && b)    Pike_fatal("hasarg2(%d /*%s */) is wrong!\n",f,get_f_name(f));   #endif       p = instrstack + stack_depth++;
pike.git/src/peep.c:837:    p->opcode=f;    p->line=cl;    copy_shared_string(p->file, dmalloc_touch_named(struct pike_string *,    cf, "insopt2"));    p->arg=a;    p->arg2=b;       return p;   }    - static INLINE p_instr *insopt1(int f, INT32 a, INT_TYPE cl, + static inline p_instr *insopt1(int f, INT32 a, INT_TYPE cl,    struct pike_string *cf)   {   #ifdef PIKE_DEBUG    if(!hasarg(f) && a)    Pike_fatal("hasarg(%d /* %s */) is wrong!\n",f,get_f_name(f));   #endif       return insopt2(f,a,0,cl, cf);   }    - static INLINE p_instr *insopt0(int f, INT_TYPE cl, struct pike_string *cf) + static inline p_instr *insopt0(int f, INT_TYPE cl, struct pike_string *cf)   {   #ifdef PIKE_DEBUG    if(hasarg(f))    Pike_fatal("hasarg(%d /* %s */) is wrong!\n",f,get_f_name(f));   #endif    return insopt2(f,0,0,cl, cf);   }      #ifdef PIKE_DEBUG   static void debug(void)
pike.git/src/peep.c:878: Inside #if defined(PIKE_DEBUG)
   if(!p[-1].file)    Pike_fatal("No file name on last instruction!\n");    }   }   #else   #define debug()   #endif         /* Offset from the end of instrbuf backwards. */ - static INLINE p_instr *instr(int offset) + static inline p_instr *instr(int offset)   {    if (offset >= num_instrs) return NULL;    return ((p_instr *)low_make_buf_space(0, &instrbuf)) - (offset + 1);   }    - static INLINE int opcode(int offset) + static inline int opcode(int offset)   {    p_instr *a;    a=instr(offset);    if(a) return a->opcode;    return -1;   }    - static INLINE int argument(int offset) + static inline int argument(int offset)   {    p_instr *a;    a=instr(offset);    if(a) return a->arg;    return -1;   }    - static INLINE int argument2(int offset) + static inline int argument2(int offset)   {    p_instr *a;    a=instr(offset);    if(a) return a->arg2;    return -1;   }      static int advance(void)   {    p_instr *p;