Branch: Tag:

2003-03-14

2003-03-14 15:57:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved dmalloc.

Rev: src/apply_low.h:1.16
Rev: src/array.c:1.138
Rev: src/backend.cmod:1.38
Rev: src/bignum.c:1.34
Rev: src/block_alloc.h:1.63
Rev: src/builtin_functions.c:1.479
Rev: src/code/ia32.c:1.25
Rev: src/cpp.c:1.115
Rev: src/encode.c:1.169
Rev: src/error.c:1.102
Rev: src/gc.c:1.209
Rev: src/interpret.c:1.295
Rev: src/interpret.h:1.131
Rev: src/interpret_functions.h:1.141
Rev: src/iterators.cmod:1.35
Rev: src/las.c:1.330
Rev: src/mapping.c:1.163
Rev: src/modules/Image/orient.c:1.24
Rev: src/modules/Image/phase.h:1.6
Rev: src/modules/Java/jvm.c:1.60
Rev: src/modules/SANE/sane.c:1.17
Rev: src/modules/_Roxen/roxen.c:1.33
Rev: src/multiset.c:1.69
Rev: src/object.c:1.228
Rev: src/opcodes.c:1.143
Rev: src/operators.c:1.172
Rev: src/pike_types.c:1.211
Rev: src/post_modules/Shuffler/Shuffler.cmod:1.23
Rev: src/post_modules/Shuffler/a_source_pikestring.c:1.8
Rev: src/post_modules/Shuffler/a_source_system_memory.c:1.9
Rev: src/post_modules/Shuffler/b_source_normal_file.c:1.8
Rev: src/post_modules/Shuffler/c_source_stream.c:1.7
Rev: src/post_modules/Shuffler/d_source_pikestream.c:1.6
Rev: src/post_modules/Shuffler/e_source_block_pikestream.c:1.2
Rev: src/preprocessor.h:1.58
Rev: src/program.c:1.486
Rev: src/signal_handler.c:1.249
Rev: src/stralloc.c:1.153
Rev: src/stralloc.h:1.73
Rev: src/svalue.c:1.161
Rev: src/threads.c:1.211

2:   || 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.168 2003/02/24 19:03:03 mast Exp $ + || $Id: encode.c,v 1.169 2003/03/14 15:53:09 grubba Exp $   */      #include "global.h"
27:   #include "bignum.h"   #include "pikecode.h"    - RCSID("$Id: encode.c,v 1.168 2003/02/24 19:03:03 mast Exp $"); + RCSID("$Id: encode.c,v 1.169 2003/03/14 15:53:09 grubba Exp $");      /* #define ENCODE_DEBUG */   
683:    /* This doesn't let bignums through. That's necessary as    * long as they aren't handled deterministically by the    * sort function. */ -  /* They should be hanled deterministically now - Hubbe */ +  /* They should be handled deterministically now - Hubbe */    Pike_error("Canonical encoding requires basic types in indices.\n");    }    order = get_switch_order(Pike_sp[-2].u.array);
1434:    } else {    push_int(0);    encode_value2(Pike_sp-1, data); +  dmalloc_touch_svalue(Pike_sp-1);    Pike_sp--;    }    }
1637:    push_constant_text(".");    f_divide(2);    f_reverse(1); +  dmalloc_touch_svalue(Pike_sp-1);    Pike_sp--;    x=Pike_sp->u.array->size;    push_array_items(Pike_sp->u.array);
1993:    * safely decrease this reference here. Thus it will be automatically \    * freed if something goes wrong. \    */ \ -  VAR->refs--; \ +  sub_ref(VAR); \    } \    data->counter.u.integer++; \   }while(0)
2398:   #endif    pop_n_elems(2);    *Pike_sp++ = func; +  dmalloc_touch_svalue(Pike_sp-1);    break;    }    }
2503:    placeholder=Pike_sp[-1].u.object;    if(placeholder->prog != null_program)    Pike_error("Placeholder object is not a null_program clone!\n"); +  dmalloc_touch_svalue(Pike_sp-1);    Pike_sp--;    }else{    pop_stack();
2720:    if(Pike_sp[-1].type != T_PROGRAM ||    Pike_sp[-1].u.program != p)    Pike_error("Program decode failed!\n"); -  p->refs--; +  sub_ref(p);    }       if(data->pass > 1)
2831:    assign_svalue(& p->constants[d].sval , Pike_sp -1 );    pop_stack();    }else{ +  dmalloc_touch_svalue(Pike_sp-1);    p->constants[d].sval=*--Pike_sp;    }    dmalloc_touch_svalue(Pike_sp);
3104:    Pike_error("Bad type for parent program (%s)\n",    get_name_of_type(Pike_sp[-1].type));    } +  dmalloc_touch_svalue(Pike_sp-1);    Pike_sp--;       /* Decode lengths. */
3162:    Pike_error("Non strings in string table.\n");    }    add_to_strings(Pike_sp[-1].u.string); +  dmalloc_touch_svalue(Pike_sp-1);    Pike_sp--;    }   
3417:    }       add_to_identifiers(id); +  dmalloc_touch_svalue(Pike_sp-1); +  dmalloc_touch_svalue(Pike_sp-2);    Pike_sp -= 2;    }    break;
3547:    Pike_error("Name of constant is not a string.\n");    }    constant->sval = Pike_sp[-2]; +  dmalloc_touch_svalue(Pike_sp-1); +  dmalloc_touch_svalue(Pike_sp-2);    Pike_sp -= 2;    }   
4012:   {    struct pike_string *s;    struct object *codec; +  struct pike_frame *new_frame;      #ifdef ENCODE_DEBUG    int debug;