pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:18:   #include "pike_error.h"   #include "operators.h"   #include "builtin_functions.h"   #include "module_support.h"   #include "fsort.h"   #include "threads.h"   #include "stuff.h"   #include "version.h"   #include "bignum.h"    - RCSID("$Id: encode.c,v 1.93 2002/04/15 15:53:02 grubba Exp $"); + RCSID("$Id: encode.c,v 1.94 2002/04/17 16:27:30 grubba Exp $");      /* #define ENCODE_DEBUG */      /* Use the old encoding method for programs. */   #define OLD_PIKE_ENCODE_PROGRAM      #ifdef ENCODE_DEBUG   /* Pass a nonzero integer as the third arg to encode_value,    * encode_value_canonic and decode_value to activate this debug. */   #define EDB(N,X) do if (data->debug>=N) {X;} while (0)
pike.git/src/encode.c:119:      #define TAG_AGAIN 15   #define TAG_MASK 15   #define TAG_NEG 16   #define TAG_SMALL 32   #define SIZE_SHIFT 6   #define MAX_SMALL (1<<(8-SIZE_SHIFT))   #define COUNTER_START -MAX_SMALL      /* Entries used to encode the identifier_references table. */ + #define ID_ENTRY_RAW -2   #define ID_ENTRY_EOT -1   #define ID_ENTRY_VARIABLE 0   #define ID_ENTRY_FUNCTION 1   #define ID_ENTRY_CONSTANT 2   #define ID_ENTRY_INHERIT 3      struct encode_data   {    int canonic;    struct object *codec;
pike.git/src/encode.c:856:    code_number( p->PIKE_CONCAT(num_,Z), data);   #include "program_areas.h"       /* Byte-code method    *    * (Forward compatibility)    */    code_number(0, data);       /* program */ -  for(d=0; d<p->num_program; d++) { -  code_number(p->program[d], data); -  } +  adddata2(p->program, p->num_program);       /* relocations */    for(d=0; d<p->num_relocations; d++) {    code_number(p->relocations[d], data);    }       /* linenumbers */ -  for(d=0; d<p->num_linenumbers; d++) { -  code_number(p->linenumbers[d], data); -  } +  adddata2(p->linenumbers, p->num_linenumbers);       {    struct svalue str_sval;    str_sval.type = T_STRING;    str_sval.subtype = 0;    /* strings */    for(d=0;d<p->num_strings;d++) {    str_sval.u.string = p->strings[d];    encode_value2(&str_sval, data);    }
pike.git/src/encode.c:954:    {    int inherit_num = 1;    struct svalue str_sval;    str_sval.type = T_STRING;    str_sval.subtype = 0;       EDB(2,    fprintf(stderr, "%*sencode: encoding references\n",    data->depth, ""));    + #ifdef ENCODE_DEBUG +  data->depth += 2; + #endif +     /* NOTE: d is incremented by hand inside the loop. */    for (d=0; d < p->num_identifier_references;)    {    int d_max = p->num_identifier_references;       /* Find insertion point of next inherit. */    if (inherit_num < p->num_inherits) {    d_max = p->inherits[inherit_num].identifier_ref_offset;    }       /* Fix locally defined identifiers. */    for (; d < d_max; d++) {    struct reference *ref = p->identifier_references + d;    struct inherit *inh = INHERIT_FROM_PTR(p, ref);    struct identifier *id = ID_FROM_PTR(p, ref);    -  +  /* Skip identifiers that haven't been overloaded. */ +  if (ref->id_flags & ID_INHERITED) continue; +     EDB(3, -  fprintf(stderr, "%*s identifier_flags: %4x\n", -  data->depth, "", id->identifier_flags)); +  fprintf(stderr, +  "%*sencoding identifier ref %d: %4x \"%s\"\n", +  data->depth, "", d, +  id->identifier_flags, +  id->name->str));    -  /* Skip identifiers that haven't been overloaded. */ -  if (inh->inherit_level) continue; + #ifdef ENCODE_DEBUG +  data->depth += 2; + #endif       /* Variable, constant or function. */ -  if (IDENTIFIER_IS_CONSTANT(id->identifier_flags)) { +  +  if (ref->inherit_offset) { +  int ref_no = -1; +  /* Explicit reference to inherited symbol. */ +  +  EDB(3, +  fprintf(stderr, "%*sencode: encoding raw reference\n", +  data->depth, "")); +  +  code_number(ID_ENTRY_RAW, data); +  code_number(ref->id_flags, data); +  +  /* inherit_offset */ +  code_number(ref->inherit_offset, data); +  +  /* identifier_offset */ +  /* Find the corresponding identifier reference +  * in the inherit. */ +  { +  struct program *p2 = p->inherits[ref->inherit_offset].prog; +  int i; +  for (i=0; i < p2->num_identifier_references; i++) { +  struct reference *ref2 = p2->identifier_references + i; +  if (!(ref2->inherit_offset) && +  (ref2->identifier_offset == ref->identifier_offset)) { +  ref_no = i; +  break; +  } +  } +  } +  if (ref_no == -1) { +  Pike_error("Failed to reverse explicit reference\n"); +  } +  code_number(ref_no, data); +  } else if (IDENTIFIER_IS_CONSTANT(id->identifier_flags)) {    /* Constant */    EDB(3, -  fprintf(stderr, "%*s encode: encoding constant\n", +  fprintf(stderr, "%*sencode: encoding constant\n",    data->depth, ""));       code_number(ID_ENTRY_CONSTANT, data);    code_number(ref->id_flags, data);       /* name */    str_sval.u.string = id->name;    encode_value2(&str_sval, data);       /* offset */
pike.git/src/encode.c:1005:    str_sval.u.string = id->type;    str_sval.type = T_TYPE;    encode_value2(&str_sval, data);    str_sval.type = T_STRING;       /* run-time type */    code_number(id->run_time_type, data);    } else if (IDENTIFIER_IS_PIKE_FUNCTION(id->identifier_flags)) {    /* Pike function */    EDB(3, -  fprintf(stderr, "%*s encode: encoding function\n", +  fprintf(stderr, "%*sencode: encoding function\n",    data->depth, ""));       code_number(ID_ENTRY_FUNCTION, data);    code_number(ref->id_flags, data);       /* name */    str_sval.u.string = id->name;    encode_value2(&str_sval, data);       /* type */    ref_push_string(id->type);    Pike_sp[-1].type = T_TYPE;    encode_value2(Pike_sp-1, data);    pop_stack();       /* func_flags (aka identifier_flags) */    code_number(id->identifier_flags, data);       /* func */ -  code_number(p->identifiers[d].func.offset, data); +  code_number(id->func.offset, data);       /* opt_flags */    code_number(id->opt_flags, data);    } else if (id->identifier_flags & IDENTIFIER_C_FUNCTION) {    /* C Function */    /* Not supported. */    Pike_error("Cannot encode functions implemented in C "    "(identifier='%s').\n",    p->identifiers[d].name->str);    } else {    /* Variable */    EDB(3, -  fprintf(stderr, "%*s encode: encoding variable\n", +  fprintf(stderr, "%*sencode: encoding variable\n",    data->depth, ""));       code_number(ID_ENTRY_VARIABLE, data);    code_number(ref->id_flags, data);       /* name */    str_sval.u.string = id->name;    encode_value2(&str_sval, data);       /* type */    ref_push_string(id->type);    Pike_sp[-1].type = T_TYPE;    encode_value2(Pike_sp-1, data);    pop_stack();    }       /* Identifier reference number */    code_number(d, data); -  +  + #ifdef ENCODE_DEBUG +  data->depth -= 2; + #endif    }       /* Encode next inherit. */    if (inherit_num < p->num_inherits) {    /* Inherit */    INT16 inherit_flags_change = 0;    struct inherit *inh = p->inherits + inherit_num;    struct reference *ref = p->identifier_references + d;    int i;       EDB(3, -  fprintf(stderr, "%*s encode: encoding inherit\n", +  fprintf(stderr, "%*sencode: encoding inherit\n",    data->depth, ""));    -  + #ifdef ENCODE_DEBUG +  data->depth += 2; + #endif +     code_number(ID_ENTRY_INHERIT, data);       /* Calculate id_flags */    for (i = 0; i < inh->prog->num_identifier_references; i++) {    /* Ignore overloaded identifiers. */    if (ref[i].inherit_offset) {    inherit_flags_change |= ref[i].id_flags ^    inh->prog->identifier_references[i].id_flags;    }    } -  +  EDB(5, +  fprintf(stderr, "%*sraw inherit_flags: %04x\n", +  data->depth, "", inherit_flags_change));    inherit_flags_change &= ~(ID_HIDDEN|ID_INHERITED);    code_number(inherit_flags_change, data);    -  +  EDB(5, +  fprintf(stderr, "%*sinherit_flags: %04x\n", +  data->depth, "", inherit_flags_change)); +  +  /* Identifier reference level at insertion. */ +  code_number(d_max, data); +     /* name */    str_sval.u.string = inh->name;    encode_value2(&str_sval, data);       /* prog */    ref_push_program(inh->prog);    encode_value2(Pike_sp-1, data);    pop_stack();       /* parent */
pike.git/src/encode.c:1113:    /* parent_identifier */    code_number(inh->parent_identifier, data);       /* parent_offset */    code_number(inh->parent_offset, data);       /* Number of identifier references. */    code_number(inh->prog->num_identifier_references, data);       inherit_num += inh->prog->num_inherits; +  + #ifdef ENCODE_DEBUG +  data->depth -= 2; + #endif    }    }    /* End-marker */    code_number(ID_ENTRY_EOT, data); -  +  + #ifdef ENCODE_DEBUG +  data->depth -= 2; + #endif    }       /* Encode the constant values table. */    {    struct svalue str_sval;    str_sval.type = T_STRING;    str_sval.subtype = 0;       /* constants */    for(d=0;d<p->num_constants;d++)
pike.git/src/encode.c:1596:    DECODE("decode_value2");      #ifdef ENCODE_DEBUG    if(data->debug)    {    if((what & TAG_MASK ) == TAG_AGAIN)    fprintf(stderr, "%*sDecoding TAG_AGAIN from <%d>\n",    data->depth, "", num);       else -  if(data->debug < 2) +  if(data->debug > 1)    fprintf(stderr, "%*sDecoding to <%d>: TAG%d (%d)\n",    data->depth, "", data->counter.u.integer ,    what & TAG_MASK, num);    }   #endif       check_stack(1);       switch(what & TAG_MASK)    {
pike.git/src/encode.c:1921:    default:    Pike_error("Function coding not compatible.\n");    break;    }    if(data->pickyness && Pike_sp[-1].type != T_FUNCTION)    Pike_error("Failed to decode function.\n");    break;          case TAG_PROGRAM: +  EDB(3, +  fprintf(stderr, "%*s TAG_PROGRAM(%d)\n", +  data->depth, "", num));    switch(num)    {    case 0:    {    struct svalue *prog_code;       tmp=data->counter;    data->counter.u.integer++;    decode_value2(data);   
pike.git/src/encode.c:1955:    Pike_error("Failed to decode program \"%s\".\n",    prog_code->u.string->str);    }    Pike_error("Failed to decode program.\n");    }    /* Remove the extra entry from the stack. */    stack_swap();    pop_stack();    break;    } +     case 1:    {    int d;    size_t size=0;    char *dat;    struct program *p;    ONERROR err1, err2, err3;      #ifdef _REENTRANT    ONERROR err;
pike.git/src/encode.c:1980:    SET_ONERROR(err3, zap_unfinished_program, p);       debug_malloc_touch(p);    tmp.type=T_PROGRAM;    tmp.u.program=p;    EDB(2,fprintf(stderr, "%*sDecoding a program to <%d>: ",    data->depth, "", data->counter.u.integer);    print_svalue(stderr, &tmp);    fputc('\n', stderr););    mapping_insert(data->decoded, & data->counter, &tmp); +  tmp = data->counter;    data->counter.u.integer++;    p->refs--;       decode_value2(data);    f_version(0);    if(!is_eq(Pike_sp-1,Pike_sp-2))    Pike_error("Cannot decode programs encoded with other pike version.\n");    pop_n_elems(2);       debug_malloc_touch(p);
pike.git/src/encode.c:2330:    ONERROR err;    int byteorder;    int bytecode_method;    int entry_type;    INT16 id_flags;    INT16 p_flags;   #define FOO(NUMTYPE,Y,NAME) \    NUMTYPE PIKE_CONCAT(local_num_, NAME) = 0;   #include "program_areas.h"    + #ifdef ENCODE_DEBUG +  data->depth += 2; + #endif +     /* Decode byte-order. */    decode_number(byteorder, data);    -  +  EDB(4, +  fprintf(stderr, "%*sByte order:%d\n", +  data->depth, "", byteorder)); +     if ((byteorder != PIKE_BYTEORDER)   #if (PIKE_BYTEORDER == 1234)    && (byteorder != 4321)   #else   #if (PIKE_BYTEORDER == 4321)    && (byteorder != 1234)   #endif   #endif    ) {    Pike_error("Unsupported byte-order. Native:%d Encoded:%d\n",
pike.git/src/encode.c:2355:       /* Decode flags. */    decode_number(p_flags,data);    p_flags &= ~(PROGRAM_FINISHED | PROGRAM_OPTIMIZED |    PROGRAM_FIXED | PROGRAM_PASS_1_DONE);    p_flags |= PROGRAM_AVOID_CHECK;       /* Start the new program. */    low_start_new_program(NULL, NULL, 0, NULL);    p = Pike_compiler->new_program; -  push_program(p); +        p->flags = p_flags;    -  +  /* Kludge to get end_first_pass() to free the program. */ +  Pike_compiler->num_parse_error++; +     SET_ONERROR(err, end_first_pass, 0);       debug_malloc_touch(p); -  +     tmp.type=T_PROGRAM;    tmp.u.program=p;    EDB(2,fprintf(stderr, "%*sDecoding a program to <%d>: ",    data->depth, "", data->counter.u.integer);    print_svalue(stderr, &tmp);    fputc('\n', stderr););    mapping_insert(data->decoded, & data->counter, &tmp); -  +  tmp = data->counter;    data->counter.u.integer++;       debug_malloc_touch(p);       /* Check the version. */    decode_value2(data);    f_version(0);    if(!is_eq(Pike_sp-1,Pike_sp-2))    Pike_error("Cannot decode programs encoded with other pike version.\n");    pop_n_elems(2);
pike.git/src/encode.c:2393:   #define FOO(X,Y,NAME) decode_number(PIKE_CONCAT(local_num_, NAME), data);   #include "program_areas.h"       /* Byte-code method */    decode_number(bytecode_method, data);    if (bytecode_method) {    Pike_error("Unsupported byte-code method: %d\n", bytecode_method);    }       /* Decode program */ +  if (data->ptr + (int)local_num_program >= data->len) { +  Pike_error("Failed to decode program. (string too short)\n"); +  }    for (e=0; e<(int)local_num_program; e++) {    unsigned INT8 opcode; -  decode_number(opcode, data); +  opcode = *(data->data + data->ptr++);    add_to_program(opcode);    }       /* Decode relocations */    for (e=0; e<(int)local_num_relocations; e++) {    size_t reloc;    decode_number(reloc, data);    if (reloc >= local_num_program-4) {    Pike_error("Bad relocation: %d >= %d\n",    reloc, local_num_program);
pike.git/src/encode.c:2427:    tmp1 = p->program[reloc];    tmp2 = p->program[reloc+1];    p->program[reloc] = p->program[reloc+3];    p->program[reloc+1] = p->program[reloc+2];    p->program[reloc+3] = tmp1;    p->program[reloc+2] = tmp2;    }    }       /* Decode linenumbers */ +  if (data->ptr + (int)local_num_linenumbers >= data->len) { +  Pike_error("Failed to decode linenumbers. (string too short)\n"); +  }    for (e=0; e<local_num_linenumbers; e++) {    char lineno_info; -  decode_number(lineno_info, data); +  lineno_info = *(data->data + data->ptr++);    add_to_linenumbers(lineno_info);    }       /* identifier_index & variable_index are created by    * fixate_program() and optimize_program().    */       /* Decode strings */    for (e=0; e<local_num_strings; e++) {    decode_value2(data);
pike.git/src/encode.c:2465:    constant.sval.subtype = NUMBER_UNDEFINED;    constant.sval.u.integer = 0;       for(e=0;e<local_num_constants;e++) {    add_to_constants(constant);    }    }       /* Decode identifier_references, inherits and identifiers. */    decode_number(entry_type, data); +  EDB(4, +  fprintf(stderr, "%*sDecoding identifier references.\n", +  data->depth, "")); + #ifdef ENCODE_DEBUG +  data->depth+=2; + #endif    while (entry_type != ID_ENTRY_EOT) {    decode_number(id_flags, data);    switch(entry_type) { -  +  case ID_ENTRY_RAW: +  { +  int no; +  int ref_no; +  struct reference ref; +  +  /* id_flags */ +  ref.id_flags = id_flags; +  +  /* inherit_offset */ +  decode_number(ref.inherit_offset, data); +  +  /* identifier_offset */ +  /* Actually the id ref number from the inherited program */ +  decode_number(ref_no, data); +  ref.identifier_offset = p->inherits[ref.inherit_offset].prog-> +  identifier_references[ref_no].identifier_offset; +  +  /* Expected identifier reference number */ +  decode_number(no, data); +  +  if (no != +  Pike_compiler->new_program->num_identifier_references) { +  Pike_error("Bad identifier reference offset: %d != %d\n", no, +  Pike_compiler->new_program-> +  num_identifier_references); +  } +  +  add_to_identifier_references(ref); +  } +  break; +     case ID_ENTRY_VARIABLE:    {    int no;       /* name */    decode_value2(data);    if (Pike_sp[-1].type != T_STRING) {    Pike_error("Bad variable name (not a string)\n");    }       /* type */    decode_value2(data);    if (Pike_sp[-1].type != T_TYPE) {    Pike_error("Bad variable type (not a type)\n");    }       /* Expected identifier offset */    decode_number(no, data);    -  +  EDB(5, +  fprintf(stderr, +  "%*sdefine_variable(\"%s\", X, 0x%04x)\n", +  data->depth, "", +  Pike_sp[-2].u.string->str, id_flags)); +     /* Alters    *    * storage, variable_index, identifiers and    * identifier_references    */    if (no != define_variable(Pike_sp[-2].u.string,    Pike_sp[-1].u.string,    id_flags)) {    Pike_error("Bad variable identifier offset: %d\n", no);    }
pike.git/src/encode.c:2520:    if (Pike_sp[-1].type != T_STRING) {    Pike_error("Bad function name (not a string)\n");    }       /* type */    decode_value2(data);    if (Pike_sp[-1].type != T_TYPE) {    Pike_error("Bad function type (not a type)\n");    }    -  /* func_flags */ +  /* func_flags (aka identifier_flags) */    decode_number(func_flags, data);       /* func */    decode_number(func.offset, data);       /* opt_flags */    decode_number(opt_flags, data);       /* FIXME:    * Verify validity of func_flags, func.offset & opt_flags    */       /* Expected identifier offset */    decode_number(no, data);    -  +  EDB(5, +  fprintf(stderr, +  "%*sdefine_function(\"%s\", X, 0x%04x, 0x%04x,\n" +  "%*s 0x%04x, 0x%04x)\n", +  data->depth, "", +  Pike_sp[-2].u.string->str, id_flags, func_flags, +  data->depth, "", +  func.offset, opt_flags)); +     /* Alters    *    * identifiers, identifier_references    */    if (no != define_function(Pike_sp[-2].u.string,    Pike_sp[-1].u.string,    id_flags, func_flags,    &func, opt_flags)) {    Pike_error("Bad function identifier offset: %d\n", no);    }
pike.git/src/encode.c:2607:    /* id_flags */    ref.id_flags = id_flags;       /* identifier_offset */    ref.identifier_offset =    Pike_compiler->new_program->num_identifiers;       /* ref.inherit_offset */    ref.inherit_offset = 0;    +  EDB(5, +  fprintf(stderr, +  "%*sdefining constant(\"%s\", X, 0x%04x)\n", +  data->depth, "", +  Pike_sp[-2].u.string->str, id_flags)); +     /* Alters    *    * identifiers, identifier_references    */    add_to_identifiers(id);    Pike_sp -= 2;       add_to_identifier_references(ref);    }    break;    case ID_ENTRY_INHERIT:    {    struct program *prog;    struct object *parent = NULL;    int parent_identifier;    int parent_offset;    struct pike_string *name = NULL;    int no;    -  +  decode_number(no, data); +  if (no != +  Pike_compiler->new_program->num_identifier_references) { +  Pike_error("Bad inherit identifier offset: %d\n", no); +  } +     /* name */    decode_value2(data);    if (Pike_sp[-1].type == T_STRING) {    name = Pike_sp[-1].u.string;    } else if ((Pike_sp[-1].type != T_INT) ||    Pike_sp[-1].u.integer) {    Pike_error("Bad function name (not a string)\n");    }       /* prog */
pike.git/src/encode.c:2665:    /* parent_offset */    decode_number(parent_offset, data);       /* Expected number of identifier references. */    decode_number(no, data);       if (prog->num_identifier_references != no) {    Pike_error("Bad number of identifiers in inherit: %d\n", no);    }    +  EDB(5, +  fprintf(stderr, +  "%*slow_inherit(..., \"%s\")\n", +  data->depth, "", +  name?name->str:"NULL")); +     /* Alters    *    * storage, inherits and identifier_references    */    low_inherit(prog, parent, parent_identifier,    parent_offset + 42, id_flags, name);       pop_n_elems(3);    }    break;    default:    Pike_error("Unsupported id entry type: %d\n", entry_type);    }    decode_number(entry_type, data);    }    -  + #ifdef ENCODE_DEBUG +  data->depth-=2; + #endif +     UNSET_ONERROR(err);    -  +  /* De-kludge to get end_first_pass() to free the program. */ +  Pike_compiler->num_parse_error--; +  +  EDB(5, +  { +  int d; +  +  fprintf(stderr, +  "%*sdecode: Reference table:\n" +  "%*s ####: Flags Inherit Identifier\n", +  data->depth, "", data->depth, ""); +  for (d=0; d < p->num_identifier_references; d++) { +  struct reference *ref = p->identifier_references + d; +  +  fprintf(stderr, "%*s %4d: %5x %7d %7d\n", +  data->depth, "", +  d, ref->id_flags, ref->inherit_offset, +  ref->identifier_offset); +  } +  fprintf(stderr, "\n" +  "%*sdecode: Inherit table:\n" +  "%*s ####: Level id_level offset\n", +  data->depth, "", data->depth, ""); +  for (d=0; d < p->num_inherits; d++) { +  struct inherit *inh = p->inherits + d; +  +  fprintf(stderr, "%*s %4d: %5d %8d %6d\n", +  data->depth, "", +  d, inh->inherit_level, inh->identifier_level, +  inh->storage_offset); +  } +  fprintf(stderr, "\n" +  "%*sdecode: Identifier table:\n" +  "%*s ####: Flags Offset Type Name\n", +  data->depth, "", data->depth, ""); +  for (d=0; d < p->num_identifiers; d++) { +  struct identifier *id = p->identifiers + d; +  +  fprintf(stderr, "%*s %4d: %5x %6d %4d \"%s\"\n", +  data->depth, "", +  d, id->identifier_flags, id->func.offset, +  id->run_time_type, id->name->str); +  } +  fprintf(stderr, "\n" +  "%*sdecode: Variable table:\n" +  "%*s ####: Index\n", +  data->depth, "", data->depth, ""); +  for (d = 0; d < p->num_variable_index; d++) { +  fprintf(stderr, "%*s %4d: %5d\n", +  data->depth, "", +  d, p->variable_index[d]); +  } +  fprintf(stderr, "\n" +  "%*sdecode: Constant table:\n" +  "%*s ####: Type Name\n", +  data->depth, "", data->depth, ""); +  for (d = 0; d < p->num_constants; d++) { +  struct program_constant *c = p->constants + d; +  fprintf(stderr, "%*s %4d: %4d %s%s%s\n", +  data->depth, "", +  d, c->sval.type, +  c->name?"\"":"",c->name?c->name->str:"NULL",c->name?"\"":""); +  } +  fprintf(stderr, "\n"); +  }); +     /* Fixate & optimize    *    * lfuns and identifier_index    */ -  end_first_pass(2); +  if (!(p = end_first_pass(2))) { +  Pike_error("Failed to decode program.\n"); +  } +  push_program(p);       /* Verify... */   #define FOO(NUMTYPE,Y,NAME) \    if (PIKE_CONCAT(local_num_, NAME) != p->PIKE_CONCAT(num_,NAME)) { \    Pike_error("Value mismatch for num_" TOSTR(NAME) ": %d != %d\n", \    PIKE_CONCAT(local_num_, NAME), \    p->PIKE_CONCAT(num_, NAME)); \    }   #include "program_areas.h"   
pike.git/src/encode.c:2719:    constant->name = Pike_sp[-1].u.string;    } else if ((Pike_sp[-1].type == T_INT) &&    !Pike_sp[-1].u.integer) {    constant->name = NULL;    } else {    Pike_error("Non strings in string table.\n");    }    constant->sval = Pike_sp[-2];    Pike_sp -= 2;    } +  + #ifdef ENCODE_DEBUG +  data->depth -= 2; + #endif    }    break;       default:    Pike_error("Cannot decode program encoding type %d\n",num);    }    break;       default:    Pike_error("Failed to restore string. (Illegal type)\n");