pike.git / src / peep.c

version» Context lines:

pike.git/src/peep.c:8:   #include "main.h"   #include "pike_error.h"   #include "lex.h"   #include "pike_memory.h"   #include "peep.h"   #include "dmalloc.h"   #include "stuff.h"   #include "bignum.h"   #include "opcodes.h"    - RCSID("$Id: peep.c,v 1.47 2002/04/12 09:30:12 grubba Exp $"); + RCSID("$Id: peep.c,v 1.48 2003/10/10 01:17:44 mast Exp $");      static void asm_opt(void);      dynamic_buffer instrbuf;      static int hasarg(int opcode)   {    return instrs[opcode-F_OFFSET].flags & I_HASARG;   }   
pike.git/src/peep.c:234:    while(reoptimize)    {    reoptimize=0;    for(e=0;e<=max_label;e++)    {    labels[e]=jumps[e]=-1;    uses[e]=0;    }       c=(p_instr *)instrbuf.s.str; +  length=instrbuf.s.len / sizeof(p_instr);    for(e=0;e<length;e++)    if(c[e].opcode == F_LABEL && c[e].arg>=0)    labels[c[e].arg]=DO_NOT_WARN((INT32)e);       for(e=0;e<length;e++)    {    if(instrs[c[e].opcode-F_OFFSET].flags & I_POINTER)    {    while(1)    {
pike.git/src/peep.c:277:    continue;       case TWOO(F_LAND,F_BRANCH_WHEN_ZERO):    c[e].opcode=F_BRANCH_WHEN_ZERO;    case TWOO(F_LAND,F_LAND):    c[e].arg=c[tmp].arg;    continue;       case TWOO(F_LOR, F_RETURN):    c[e].opcode=F_RETURN_IF_TRUE; -  break; +  goto pointer_opcode_done;       case TWOO(F_BRANCH, F_RETURN):    case TWOO(F_BRANCH, F_RETURN_0):    case TWOO(F_BRANCH, F_RETURN_1):    case TWOO(F_BRANCH, F_RETURN_LOCAL):    if(c[e].file) free_string(c[e].file);    c[e]=c[tmp];    if(c[e].file) add_ref(c[e].file); -  break; +  goto pointer_opcode_done;    }    break;    } -  + #ifdef PIKE_DEBUG +  if (c[e].arg < 0 || c[e].arg > max_label) +  fatal ("Invalid index into uses: %d\n", c[e].arg); + #endif    uses[c[e].arg]++;    } -  +  pointer_opcode_done:;    }       for(e=0;e<=max_label;e++)    {    if(!uses[e] && labels[e]>=0)    {    c[labels[e]].opcode=F_NOP;    reoptimize++;    }    }