Branch: Tag:

2008-01-26

2008-01-26 22:34:27 by Martin Stjernholm <mast@lysator.liu.se>

Eradicated all instances of setting type to T_INT without also setting the
subtype in an svalue. From now on one should either set the subtype or use
the new svalue type PIKE_T_FREE (see svalue.h).

Rev: src/OCPikeInterpreter.m:1.3
Rev: src/apply_low.h:1.32
Rev: src/array.c:1.198
Rev: src/array.h:1.71
Rev: src/bignum.c:1.42
Rev: src/builtin.cmod:1.193
Rev: src/builtin_functions.c:1.650
Rev: src/configure.in:1.1038
Rev: src/cpp.c:1.164
Rev: src/encode.c:1.250
Rev: src/error.c:1.151
Rev: src/interpret.c:1.385
Rev: src/interpret_functions.h:1.197
Rev: src/iterators.cmod:1.64
Rev: src/las.c:1.403
Rev: src/main.c:1.228
Rev: src/mapping.c:1.195
Rev: src/module.c:1.47
Rev: src/modules/Gmp/mpz_glue.c:1.170
Rev: src/modules/HTTPLoop/accept_and_parse.c:1.39
Rev: src/modules/HTTPLoop/requestobject.c:1.31
Rev: src/modules/Image/colortable.c:1.130
Rev: src/modules/Java/jvm.c:1.84
Rev: src/modules/Parser/html.c:1.178
Rev: src/modules/Parser/xml.cmod:1.97
Rev: src/modules/Postgres/postgres.c:1.55
Rev: src/modules/_math/math.c:1.87
Rev: src/modules/files/sendfile.c:1.78
Rev: src/modules/spider/spider.c:1.134
Rev: src/multiset.c:1.106
Rev: src/object.c:1.281
Rev: src/operators.c:1.226
Rev: src/pike_error.h:1.42
Rev: src/post_modules/Shuffler/Shuffler.cmod:1.45
Rev: src/post_modules/_ADT/circular_list.cmod:1.18
Rev: src/post_modules/_ADT/sequence.cmod:1.19
Rev: src/program.c:1.642
Rev: src/signal_handler.c:1.331
Rev: src/sscanf.c:1.170
Rev: src/svalue.c:1.234
Rev: src/svalue.h:1.149

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: mapping.c,v 1.194 2008/01/05 18:05:10 nilsson Exp $ + || $Id: mapping.c,v 1.195 2008/01/26 22:34:21 mast Exp $   */      #include "global.h"
190: Inside #if undefined(PIKE_MAPPING_KEYPAIR_LOOP)
   for(e=1;e<size;e++)    {    md->free_list[e-1].next = md->free_list + e; -  md->free_list[e-1].ind.type=T_INT; -  md->free_list[e-1].val.type=T_INT; +  mark_free_svalue (&md->free_list[e-1].ind); +  mark_free_svalue (&md->free_list[e-1].val);    }    md->free_list[e-1].next=0; -  md->free_list[e-1].ind.type=T_INT; -  md->free_list[e-1].val.type=T_INT; +  mark_free_svalue (&md->free_list[e-1].ind); +  mark_free_svalue (&md->free_list[e-1].val);   #endif /* !PIKE_MAPPING_KEYPAIR_LOOP */    md->ind_types = 0;    md->val_types = 0;
987:       FREE_KEYPAIR(md, k);    -  md->free_list->ind.type=T_INT; -  md->free_list->val.type=T_INT; +  mark_free_svalue (&md->free_list->ind); +  mark_free_svalue (&md->free_list->val);       md->size--;   #ifdef MAPPING_SIZE_DEBUG
1048:    free_svalue(& k->ind);    free_svalue(& k->val);    FREE_KEYPAIR(md, k); -  md->free_list->ind.type = T_INT; -  md->free_list->val.type = T_INT; +  mark_free_svalue (&md->free_list->ind); +  mark_free_svalue (&md->free_list->val);    md->size--;   #ifdef MAPPING_SIZE_DEBUG    if(m->data ==md)
1214:       if(!IS_DESTRUCTED (key) && (p=low_mapping_lookup(m,key)))    { + #if 0    if(p->type==T_INT)    p->subtype=NUMBER_NUMBER; -  + #endif       assign_svalue_no_free(dest, p);    }else{
1946:    Pike_interpreter.trace_level = 0;    if(SETJMP(catch)) {    free_svalue(&throw_value); -  throw_value.type = T_INT; +  mark_free_svalue (&throw_value);    }    else    sort_array_destructively(a);
2364:    } \    (*prev_)->next = k->next; \    FREE_KEYPAIR(MD, k); \ -  MD->free_list->ind.type = T_INT; \ -  MD->free_list->val.type = T_INT; \ +  mark_free_svalue (&MD->free_list->ind); \ +  mark_free_svalue (&MD->free_list->val); \    MD->size--; \    DO_IF_MAPPING_SIZE_DEBUG( \    if(M->data ==MD) \
2397:    { \    *prev=k->next; \    FREE_KEYPAIR(MD, k); \ -  MD->free_list->ind.type = T_INT; \ -  MD->free_list->val.type = T_INT; \ +  mark_free_svalue (&MD->free_list->ind); \ +  mark_free_svalue (&MD->free_list->val); \    MD->size--; \    DO_IF_MAPPING_SIZE_DEBUG( \    if(M->data ==MD) \