pike.git / src / peep.c

version» Context lines:

pike.git/src/peep.c:168:      /**** Bytecode Generator *****/      INT32 assemble(int store_linenumbers)   {    INT32 entry_point;    INT32 max_label=-1,tmp;    INT32 *labels, *jumps, *uses, *aliases;    ptrdiff_t e, length;    p_instr *c; - #ifdef PIKE_PORTABLE_BYTECODE +     struct pike_string *tripples = NULL; - #endif /* PIKE_PORTABLE_BYTECODE */ +    #ifdef PIKE_DEBUG    INT32 max_pointer=-1;    int synch_depth = 0;    size_t fun_start = Pike_compiler->new_program->num_program;   #endif    int relabel;    int reoptimize = relabel = !(debug_options & NO_PEEP_OPTIMIZING);    struct lex *lex;    CHECK_COMPILER();    lex = &THIS_COMPILATION->lex;
pike.git/src/peep.c:202: Inside #if defined(PIKE_DEBUG)
   dump_instr(c+e);    fprintf(stderr,"\n");    if (c[e].opcode == F_SYNCH_MARK) synch_depth++;    }    if (synch_depth) {    Pike_fatal("Unbalanced sync_mark/pop_sync_mark: %d\n", synch_depth);    }    }   #endif    - #ifdef PIKE_PORTABLE_BYTECODE +     /* No need to do this for constant evaluations. */    if (store_linenumbers) {    p_wchar2 *current_tripple;    struct pike_string *previous_file = NULL;    INT_TYPE previous_line = 0;    ptrdiff_t num_linedirectives = 0;       /* Count the number of F_FILENAME/F_LINE pseudo-ops we need to add. */    for (e=0; e < length; e++) {    if (c[e].file != previous_file) {
pike.git/src/peep.c:274: Inside #if defined(PIKE_DEBUG)
   if (current_tripple != STR2(tripples) + 3*(length + num_linedirectives)) {    Pike_fatal("Tripple length mismatch %d != %d 3*(%d + %d)\n",    current_tripple - STR2(tripples),    3*(length + num_linedirectives),    length, num_linedirectives);    }   #endif /* PIKE_DEBUG */    tripples = end_shared_string(tripples);    }    - #endif /* PIKE_PORTABLE_BYTECODE */ -  +     for(e=0;e<length;e++,c++) {    if(c->opcode == F_LABEL) {    if(c->arg > max_label)    max_label = c->arg;    }   #ifdef PIKE_DEBUG    else if (instrs[c->opcode - F_OFFSET].flags & I_POINTER) {    if (c->arg > max_pointer)    max_pointer = c->arg;    }
pike.git/src/peep.c:472:    c=(p_instr *)instrbuf.s.str;    length=instrbuf.s.len / sizeof(p_instr);       for(e=0;e<=max_label;e++) labels[e]=jumps[e]=-1;         #ifdef START_NEW_FUNCTION    START_NEW_FUNCTION(store_linenumbers);   #endif    - #ifdef PIKE_PORTABLE_BYTECODE +    #ifdef ALIGN_PIKE_FUNCTION_BEGINNINGS    while( ( (((INT32) PIKE_PC)+4) & (ALIGN_PIKE_JUMPS-1)))    ins_byte(0);   #endif       if (store_linenumbers) {    ins_data(store_prog_string(tripples));    free_string(tripples);    } else {    ins_data(0);    } - #else - #ifdef ALIGN_PIKE_FUNCTION_BEGINNINGS -  while( ( ((INT32) PIKE_PC) & (ALIGN_PIKE_JUMPS-1))) -  ins_byte(0); - #endif - #endif /* PIKE_PORTABLE_BYTECODE */ +        entry_point = PIKE_PC;      #ifdef PIKE_DEBUG    synch_depth = 0;   #endif    FLUSH_CODE_GENERATOR_STATE();    for(e=0;e<length;e++)    {   #ifdef PIKE_DEBUG