pike.git / src / peep.c

version» Context lines:

pike.git/src/peep.c:17:   #include "peep.h"   #include "stuff.h"   #include "bignum.h"   #include "opcodes.h"   #include "builtin_functions.h"   #include "constants.h"   #include "interpret.h"   #include "pikecode.h"   #include "pike_compiler.h"    - #ifdef PIKE_DEBUG +    static int hasarg(int opcode)   {    return instrs[opcode-F_OFFSET].flags & I_HASARG;   }      static int hasarg2(int opcode)   {    return instrs[opcode-F_OFFSET].flags & I_HASARG2;   }   
pike.git/src/peep.c:40: Inside #if defined(PIKE_DEBUG)
   if(!p) return;    fprintf(stderr,"%s",get_token_name(p->opcode));    if(hasarg(p->opcode))    {    fprintf(stderr,"(%d",p->arg);    if(hasarg2(p->opcode))    fprintf(stderr,",%d",p->arg2);    fprintf(stderr,")");    }   } - #endif +          static int asm_opt(void);      /* Output buffer. The optimization eye is at the end of the buffer. */   struct byte_buffer instrbuf;   long num_instrs = 0;         void init_bytecode(void)
pike.git/src/peep.c:485:    }       entry_point = PIKE_PC;      #ifdef PIKE_DEBUG    synch_depth = 0;   #endif    FLUSH_CODE_GENERATOR_STATE();    for(e=0;e<length;e++)    { - #ifdef PIKE_DEBUG - # ifdef DISASSEMBLE_CODE + #ifdef DISASSEMBLE_CODE    size_t opcode_start = PIKE_PC; - # endif -  + #endif + #ifdef PIKE_DEBUG    if (c != (((p_instr *)buffer_ptr(&instrbuf))+e)) {    Pike_fatal("Instruction loop deviates. "    "0x%04"PRINTPTRDIFFT"x != 0x%04"PRINTPTRDIFFT"x\n",    e, c - ((p_instr *)buffer_ptr(&instrbuf)));    } -  if(((a_flag > 2) && store_linenumbers) || + #endif +  if( + #ifdef PIKEDEBUG +  ((a_flag > 2) && store_linenumbers) ||    (a_flag > 3) || -  + #endif    (lex->pragmas & ID_DISASSEMBLE))    { -  + #ifdef PIKE_DEBUG    if (c->opcode == F_POP_SYNCH_MARK) synch_depth--;    fprintf(stderr, "===%4ld %4lx %*s", (long)c->line,    (unsigned long)PIKE_PC, synch_depth, ""); -  + #else +  fprintf(stderr, "===%4ld %4lx ", (long)c->line, (unsigned long)PIKE_PC); + #endif    dump_instr(c);    fprintf(stderr,"\n"); -  + #ifdef PIKE_DEBUG    if (c->opcode == F_SYNCH_MARK) synch_depth++; -  } +    #endif -  +  }       if(store_linenumbers) {    store_linenumber(c->line, dmalloc_touch_named(struct pike_string *,    c->file,    "store_line"));   #ifdef PIKE_DEBUG    if (c->opcode < F_MAX_OPCODE)    ADD_COMPILED(c->opcode);   #endif /* PIKE_DEBUG */    }
pike.git/src/peep.c:686:    ins_f_byte(c->opcode);    break;      #ifdef PIKE_DEBUG    default:    Pike_fatal("Unknown instruction type.\n");   #endif    }    }    - #if defined(PIKE_DEBUG) && defined(DISASSEMBLE_CODE) + #ifdef DISASSEMBLE_CODE    if((lex->pragmas & ID_DISASSEMBLE) && PIKE_PC > opcode_start)    {    DISASSEMBLE_CODE(Pike_compiler->new_program->program + opcode_start,    (PIKE_PC - opcode_start)*sizeof(PIKE_OPCODE_T));    }   #endif      #ifdef PIKE_DEBUG    if (instrs[c->opcode - F_OFFSET].flags & I_HASPOINTER) {    if ((e+1 >= length) || (c[1].opcode != F_POINTER)) {