Branch: Tag:

2003-04-02

2003-04-02 19:22:44 by Martin Stjernholm <mast@lysator.liu.se>

Extended all integer argument types shorter than int to int since that's
more efficient.

Rev: src/constants.c:1.47
Rev: src/constants.h:1.30
Rev: src/docode.c:1.164
Rev: src/docode.h:1.18
Rev: src/dynamic_buffer.c:1.23
Rev: src/dynamic_buffer.h:1.18
Rev: src/encode.c:1.171
Rev: src/gc.c:1.216
Rev: src/global.h:1.85
Rev: src/las.c:1.334
Rev: src/las.h:1.62
Rev: src/multiset.c:1.71
Rev: src/pike_memory.c:1.145
Rev: src/pike_memory.h:1.44
Rev: src/pike_search.c:1.14
Rev: src/pike_search.h:1.7
Rev: src/pike_types.c:1.214
Rev: src/pike_types.h:1.86
Rev: src/port.h:1.50
Rev: src/program.c:1.497
Rev: src/program.h:1.181
Rev: src/program_areas.h:1.13
Rev: src/rbtree.h:1.10
Rev: src/svalue.h:1.118

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.170 2003/03/28 23:54:24 mast Exp $ + || $Id: encode.c,v 1.171 2003/04/02 19:22:43 mast Exp $   */      #include "global.h"
27:   #include "bignum.h"   #include "pikecode.h"    - RCSID("$Id: encode.c,v 1.170 2003/03/28 23:54:24 mast Exp $"); + RCSID("$Id: encode.c,v 1.171 2003/04/02 19:22:43 mast Exp $");      /* #define ENCODE_DEBUG */   
979: Inside #if defined(OLD_PIKE_ENCODE_PROGRAM)
   encode_value2(Pike_sp-1,data); /**/    pop_stack();    - #define FOO(X,Y,Z) \ -  code_number( p->PIKE_CONCAT(num_,Z), data); + #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ +  code_number( p->PIKE_CONCAT(num_,NAME), data);   #include "program_areas.h"       code_number(PIKE_BYTECODE_METHOD, data);
1112:    pop_stack();       /* num_* */ - #define FOO(X,Y,Z) \ -  code_number( p->PIKE_CONCAT(num_,Z), data); + #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ +  code_number( p->PIKE_CONCAT(num_,NAME), data);   #include "program_areas.h"       /* Byte-code method
2576:       debug_malloc_touch(p);    - #define FOO(X,Y,Z) \ -  decode_number( p->num_##Z, data); + #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ +  decode_number( p->PIKE_CONCAT(num_,NAME), data);   #include "program_areas.h"          if(data->pass == 1)    { - #define FOO(NUMTYPE,TYPE,NAME) \ + #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \    size=DO_ALIGN(size, ALIGNOF(TYPE)); \    size+=p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0]);   #include "program_areas.h"
2592:    debug_malloc_touch(dat);    MEMSET(dat,0,size);    size=0; - #define FOO(NUMTYPE,TYPE,NAME) \ + #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]);
3036:    int entry_type;    INT16 id_flags;    INT16 p_flags; - #define FOO(NUMTYPE,Y,NAME) \ + #define FOO(NUMTYPE,Y,ARGTYPE,NAME) \    NUMTYPE PIKE_CONCAT(local_num_, NAME) = 0;   #include "program_areas.h"   
3121:    Pike_sp--;       /* Decode lengths. */ - #define FOO(X,Y,NAME) decode_number(PIKE_CONCAT(local_num_, NAME), data); + #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ +  decode_number(PIKE_CONCAT(local_num_, NAME), data);   #include "program_areas.h"       /* Byte-code method */
3537:    push_program(p);       /* Verify... */ - #define FOO(NUMTYPE,Y,NAME) \ + #define FOO(NUMTYPE,TYPE,ARGTYPE,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), \