pike.git / src / peep.c

version» Context lines:

pike.git/src/peep.c:10:   #include "lex.h"   #include "pike_memory.h"   #include "peep.h"   #include "dmalloc.h"   #include "stuff.h"   #include "bignum.h"   #include "opcodes.h"   #include "builtin_functions.h"   #include "constants.h"    - RCSID("$Id: peep.c,v 1.52 2001/07/09 12:50:18 grubba Exp $"); + RCSID("$Id: peep.c,v 1.53 2001/07/09 14:19:16 grubba 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:353:    if(store_linenumbers)    store_linenumber(c->line, c->file);       switch(c->opcode)    {    case F_NOP:    case F_NOTREACHED:    case F_START_FUNCTION:    break;    case F_ALIGN: + #ifndef HAVE_COMPUTED_GOTO    while(PC % c->arg) add_to_program(0); -  + #endif /* HAVE_COMPUTED_GOTO */    break;       case F_BYTE:   #ifdef HAVE_COMPUTED_GOTO    add_to_program((void *)(ptrdiff_t)(unsigned char)(c->arg));   #else /* !HAVE_COMPUTED_GOTO */    add_to_program((unsigned char)(c->arg));   #endif /* HAVE_COMPUTED_GOTO */    break;   
pike.git/src/peep.c:440:    {    int tmp2=labels[e];       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 HAVE_COMPUTED_GOTO +  tmp = (int)(ptrdiff_t)(Pike_compiler->new_program->program[jumps[e]]); +  Pike_compiler->new_program->program[jumps[e]] = +  (PIKE_OPCODE_T)(ptrdiff_t)(tmp2 - jumps[e]); +  jumps[e] = tmp; + #else /* !HAVE_COMPUTED_GOTO */    tmp=read_int(jumps[e]);    upd_int(jumps[e], tmp2 - jumps[e]);    jumps[e]=tmp; -  + #endif /* HAVE_COMPUTED_GOTO */    }    }       free((char *)labels);    free((char *)jumps);    free((char *)uses);          exit_bytecode();   }