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.249 2008/01/19 17:06:50 grubba Exp $ + || $Id: encode.c,v 1.250 2008/01/26 22:34:19 mast 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:437:    debug_malloc_touch(p);    if(p->flags & PROGRAM_FIXED) return; /* allow natural zapping */    if(p->parent)    {    free_program(p->parent);    p->parent=0;    }    for(e=0;e<p->num_constants;e++)    {    free_svalue(& p->constants[e].sval); -  p->constants[e].sval.type=T_INT; +  mark_free_svalue (&p->constants[e].sval);    }       for(e=0;e<p->num_inherits;e++)    {    if(p->inherits[e].parent)    {    free_object(p->inherits[e].parent);    p->inherits[e].parent=0;    }    if(e)
pike.git/src/encode.c:1840: Inside #if defined(ENCODE_DEBUG)
   * other uses in the future. */    BIT_VOID | BIT_INT,   #endif    0);       initialize_buf(&data->buf);    data->canonic = 1;    data->encoded=allocate_mapping(128);    data->delayed = allocate_array (0);    data->counter.type=T_INT; +  data->counter.subtype=NUMBER_NUMBER;    data->counter.u.integer=COUNTER_START;      #ifdef ENCODE_DEBUG    data->debug = args > 2 ? Pike_sp[2-args].u.integer : 0;    data->depth = -2;   #endif       if(args > 1 && Pike_sp[1-args].type == T_OBJECT)    {    if (Pike_sp[1-args].subtype) {
pike.git/src/encode.c:3049:    p->NAME = (TYPE *)mexec_alloc(p->PIKE_CONCAT(num_, NAME) * \    sizeof(p->NAME[0]));   #endif /* PIKE_USE_MACHINE_CODE */   #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \    size=DO_ALIGN(size, ALIGNOF(TYPE)); \    p->NAME=(TYPE *)(dat+size); \    size+=p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0]);   #include "program_areas.h"       for(e=0;e<p->num_constants;e++) -  p->constants[e].sval.type=T_INT; +  mark_free_svalue (&p->constants[e].sval);       debug_malloc_touch(dat);    debug_malloc_touch(p);       p->total_size=size + sizeof(struct program);       p->flags |= PROGRAM_OPTIMIZED;    }       {
pike.git/src/encode.c:4450:    }   }      #if TWO_PASS_DECODE_WORKS   /* Run pass2 */   int re_decode(struct decode_data *data, int ignored)   {    JMP_BUF recovery;    struct svalue orig_thrown;    move_svalue (&orig_thrown, &throw_value); -  throw_value.type = T_INT; +  mark_free_svalue (&throw_value);       if (SETJMP (recovery)) {    UNSETJMP (recovery);    call_handle_error();    move_svalue (&throw_value, &orig_thrown);    free_decode_data (data, 0, 1);    return 0;    }       else {