pike.git / src / peep.c

version» Context lines:

pike.git/src/peep.c:12:   #include "peep.h"   #include "dmalloc.h"   #include "stuff.h"   #include "bignum.h"   #include "opcodes.h"   #include "builtin_functions.h"   #include "constants.h"   #include "interpret.h"   #include "pikecode.h"    - RCSID("$Id: peep.c,v 1.68 2001/08/15 16:40:47 marcus Exp $"); + RCSID("$Id: peep.c,v 1.69 2001/08/16 18:49:46 marcus 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:131:    fatal("update_arg outside known space.\n");   #endif    p=(p_instr *)instrbuf.s.str;    p[instr].arg=arg;   }      #ifndef FLUSH_CODE_GENERATOR_STATE   #define FLUSH_CODE_GENERATOR_STATE()   #endif    -  +    /**** Bytecode Generator *****/      void assemble(void)   {    INT32 d,max_label,tmp;    INT32 *labels, *jumps, *uses;    ptrdiff_t e, length;    p_instr *c;    int reoptimize=!(debug_options & NO_PEEP_OPTIMIZING);   #ifdef PIKE_DEBUG
pike.git/src/peep.c:321:    break;       default:    switch(instrs[c->opcode - F_OFFSET].flags)    {    case I_ISJUMP:   #ifdef INS_F_JUMP    tmp=INS_F_JUMP(c->opcode);    if(tmp != -1)    { -  upd_pointer(tmp, jumps[c->arg]); +  UPDATE_F_JUMP(tmp, jumps[c->arg]);    jumps[c->arg]=~tmp;    break;    }   #endif       ins_f_byte(c->opcode);       case I_ISPOINTER:   #ifdef PIKE_DEBUG    if(c->arg > max_label || c->arg < 0) fatal("Jump to unknown label?\n");
pike.git/src/peep.c:400:    while(jumps[e]!=-1)    {   #ifdef PIKE_DEBUG    if(labels[e]==-1)    fatal("Hyperspace error: unknown jump point %ld at %d (pc=%x).\n",    PTRDIFF_T_TO_LONG(e), labels[e], jumps[e]);   #endif   #ifdef INS_F_JUMP    if(jumps[e] < 0)    { -  tmp = read_pointer(~jumps[e]); +  tmp = READ_F_JUMP(~jumps[e]);    UPDATE_F_JUMP(~jumps[e], tmp2);    jumps[e]=tmp;    continue;    }   #endif       tmp = read_pointer(jumps[e]);    upd_pointer(jumps[e], tmp2 - jumps[e]);    jumps[e]=tmp;    }