pike.git / src / peep.c

version» Context lines:

pike.git/src/peep.c:167:      /**** 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; -  struct pike_string *tripples = NULL; +  struct pike_string *triples = NULL;   #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:223:    if (c[e].line != previous_line) {    previous_line = c[e].line;    num_linedirectives++;    }    }       /* fprintf(stderr, "length:%d directives:%d\n",    * length, num_linedirectives);    */    -  if (!(tripples = begin_wide_shared_string(3*(length+num_linedirectives), +  if (!(triples = begin_wide_shared_string(3*(length+num_linedirectives),    2))) {    Pike_fatal("Failed to allocate wide string of length %d 3*(%d + %d).\n",    3*(length+num_linedirectives), length, num_linedirectives);    }    previous_file = NULL;    previous_line = 0; -  current_tripple = STR2(tripples); +  current_tripple = STR2(triples);    for (e = 0; e < length; e++) {    if (c[e].file != previous_file) {    current_tripple[0] = F_FILENAME;    current_tripple[1] =    store_prog_string(dmalloc_touch_named(struct pike_string *,    c[e].file,    "store_prog_string"));    current_tripple[2] = 0;    current_tripple += 3;    previous_file = dmalloc_touch_named(struct pike_string *,
pike.git/src/peep.c:260:   #endif    current_tripple += 3;    previous_line = c[e].line;    }    current_tripple[0] = c[e].opcode;    current_tripple[1] = c[e].arg;    current_tripple[2] = c[e].arg2;    current_tripple += 3;    }   #ifdef PIKE_DEBUG -  if (current_tripple != STR2(tripples) + 3*(length + num_linedirectives)) { +  if (current_tripple != STR2(triples) + 3*(length + num_linedirectives)) {    Pike_fatal("Tripple length mismatch %d != %d 3*(%d + %d)\n", -  current_tripple - STR2(tripples), +  current_tripple - STR2(triples),    3*(length + num_linedirectives),    length, num_linedirectives);    }   #endif /* PIKE_DEBUG */ -  tripples = end_shared_string(tripples); +  triples = end_shared_string(triples);    }       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)
pike.git/src/peep.c:470: Inside #if defined(START_NEW_FUNCTION)
  #ifdef START_NEW_FUNCTION    START_NEW_FUNCTION(store_linenumbers);   #endif      #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); +  ins_data(store_prog_string(triples)); +  free_string(triples);    } else {    ins_data(0);    }       entry_point = PIKE_PC;      #ifdef PIKE_DEBUG    synch_depth = 0;   #endif    FLUSH_CODE_GENERATOR_STATE();