pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:2345:    * Returns resulting offset in p->program.    */   static INT32 decode_portable_bytecode(struct decode_data *data, INT32 string_no)   {    struct program *p = Pike_compiler->new_program;    struct pike_string *bytecode;    struct pike_string *current_file=NULL;    INT_TYPE current_line = 0;    int e;    ONERROR err; +  extern int store_portable_bytecode;       debug_malloc_touch(p);    if ((string_no < 0) || (string_no >= p->num_strings)) {    decode_error(data, NULL,    "Bad bytecode string number: %d (expected 0 - %d).\n",    string_no, p->num_strings-1);    }       bytecode = p->strings[string_no]; -  +     if (bytecode->len % 3) {    decode_error(data, NULL, "Bad bytecode string length: "    "%td (expected multiple of 3).\n", bytecode->len);    }       init_bytecode();       SET_ONERROR(err, exit_bytecode, NULL);       switch(bytecode->size_shift) {
pike.git/src/encode.c:2438:    "byte code.\n"); \    } else       EMIT_BYTECODE(STR0, EMIT_BYTECODE2);    break;   #undef SIGNED_CHAR   #undef EMIT_BYTECODE   #undef EMIT_BYTECODE2    }    UNSET_ONERROR(err); +  if(!store_portable_bytecode) +  { +  fprintf(stderr, "free bytecode %d %d\n", bytecode->len<<bytecode->size_shift, bytecode->refs); +  free_string(bytecode); +  p->strings[string_no] = empty_pike_string; +  empty_pike_string->refs++; +  }    return assemble(1);   }      static void decode_value2(struct decode_data *data)      #ifdef PIKE_DEBUG   #undef decode_value2   #define decode_value2(X) do { struct svalue *_=Pike_sp; decode_value2_(X); if(Pike_sp!=_+1) Pike_fatal("decode_value2 failed!\n"); } while(0)   #endif