pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: encode.c,v 1.186 2004/05/19 09:19:34 grubba Exp $ + || $Id: encode.c,v 1.187 2004/09/06 11:43:44 grubba Exp $   */      #include "global.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "mapping.h"
pike.git/src/encode.c:25:   #include "fsort.h"   #include "threads.h"   #include "stuff.h"   #include "version.h"   #include "bignum.h"   #include "pikecode.h"   #include "pike_types.h"   #include "opcodes.h"   #include "peep.h"    - RCSID("$Id: encode.c,v 1.186 2004/05/19 09:19:34 grubba Exp $"); + RCSID("$Id: encode.c,v 1.187 2004/09/06 11:43:44 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 { debug_malloc_touch(data); if (data->debug>=N) {X;} } while (0)
pike.git/src/encode.c:1578:    for(d=0;d<p->num_constants;d++)    {   #ifdef PIKE_PORTABLE_BYTECODE    if (((p->constants[d].sval.type == T_FUNCTION) &&    (p->constants[d].sval.subtype == FUNCTION_BUILTIN)) ||    (p->constants[d].sval.type == T_TYPE)) {    /* Already encoded above. */    continue;    }   #endif /* PIKE_PORTABLE_BYTECODE */ +  +  EDB(4, fprintf(stderr, "Encoding constant #%d.\n", d));    /* value */    encode_value2(&p->constants[d].sval, data, 0);       /* name */    if (p->constants[d].name) {    str_sval.u.string = p->constants[d].name;    encode_value2(&str_sval, data, 0);    } else {    push_int(0);    encode_value2(Pike_sp-1, data, 0);
pike.git/src/encode.c:4070:    *    * This must be done after the program has been ended.    */    for (e=0; e<local_num_constants; e++) {    struct program_constant *constant = p->constants+e;    if ((constant->sval.type != T_INT) ||    (constant->sval.subtype != NUMBER_UNDEFINED)) {    /* Already initialized. */    continue;    } +  +  EDB(4, fprintf(stderr, "Decoding constant #%d.\n", e)); +     /* value */    decode_value2(data);    /* name */    decode_value2(data);    if (Pike_sp[-1].type == T_STRING) {    constant->name = Pike_sp[-1].u.string;    } else if ((Pike_sp[-1].type == T_INT) &&    !Pike_sp[-1].u.integer) {    constant->name = NULL;    } else {