Branch: Tag:

1999-02-10

1999-02-10 22:03:31 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

lots of minor optimizations..

Rev: src/builtin_functions.c:1.148
Rev: src/constants.c:1.14
Rev: src/constants.h:1.8
Rev: src/cpp.c:1.33
Rev: src/dynamic_load.c:1.34
Rev: src/module.c:1.10
Rev: src/modules/Gdbm/gdbmmod.c:1.7
Rev: src/modules/Gmp/mpz_glue.c:1.39
Rev: src/modules/Gz/zlibmod.c:1.23
Rev: src/modules/Image/colors.c:1.9
Rev: src/modules/Image/colortable.c:1.48
Rev: src/modules/Image/font.c:1.43
Rev: src/modules/Image/image.c:1.112
Rev: src/modules/Msql/msqlmod.c:1.10
Rev: src/modules/Mysql/mysql.c:1.26
Rev: src/modules/Mysql/result.c:1.15
Rev: src/modules/Odbc/odbc.c:1.14
Rev: src/modules/Odbc/odbc_result.c:1.17
Rev: src/modules/Oracle/oracle.c:1.16
Rev: src/modules/Perl/perlmod.c:1.6
Rev: src/modules/Pipe/pipe.c:1.30
Rev: src/modules/Postgres/pgresult.c:1.10
Rev: src/modules/Postgres/postgres.c:1.12
Rev: src/modules/Regexp/glue.c:1.14
Rev: src/modules/Ssleay/ssleay.c:1.11
Rev: src/modules/Yp/yp.c:1.16
Rev: src/modules/_Charset/charsetmod.c:1.9
Rev: src/modules/_Charset/iso2022.c:1.4
Rev: src/modules/_Crypto/cast.c:1.6
Rev: src/modules/_Crypto/cbc.c:1.14
Rev: src/modules/_Crypto/crypto.c:1.27
Rev: src/modules/_Crypto/des.c:1.13
Rev: src/modules/_Crypto/idea.c:1.13
Rev: src/modules/_Crypto/invert.c:1.8
Rev: src/modules/_Crypto/md2.c:1.6
Rev: src/modules/_Crypto/md5.c:1.12
Rev: src/modules/_Crypto/pipe.c:1.14
Rev: src/modules/_Crypto/rc4.c:1.9
Rev: src/modules/_Crypto/sha.c:1.15
Rev: src/modules/_Image_JPEG/image_jpeg.c:1.20
Rev: src/modules/_Image_TTF/image_ttf.c:1.11
Rev: src/modules/_Image_XFace/image_xface.c:1.6
Rev: src/modules/call_out/call_out.c:1.25
Rev: src/modules/files/efuns.c:1.64
Rev: src/modules/files/socket.c:1.42
Rev: src/modules/math/math.c:1.17
Rev: src/modules/spider/accesseddb.c:1.18
Rev: src/modules/spider/dumudp.c:1.43
Rev: src/modules/spider/spider.c:1.78
Rev: src/modules/spider/xml.c:1.7
Rev: src/modules/sprintf/sprintf.c:1.32
Rev: src/modules/system/nt.c:1.8
Rev: src/modules/system/passwords.c:1.24
Rev: src/modules/system/system.c:1.62
Rev: src/object.c:1.57
Rev: src/operators.c:1.47
Rev: src/pike_macros.h:1.12
Rev: src/pike_types.c:1.50
Rev: src/pike_types.h:1.17
Rev: src/program.c:1.110
Rev: src/program.h:1.51
Rev: src/security.c:1.11
Rev: src/signal_handler.c:1.106
Rev: src/stralloc.h:1.29
Rev: src/svalue.h:1.21
Rev: src/threads.c:1.89

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: pike_types.c,v 1.49 1998/11/22 11:03:10 hubbe Exp $"); + RCSID("$Id: pike_types.c,v 1.50 1999/02/10 21:46:48 hubbe Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"
87:   }      #ifdef PIKE_DEBUG - static void CHECK_TYPE(struct pike_string *s) + void check_type_string(struct pike_string *s)   {    if(debug_findstring(s) != s)    fatal("Type string not shared.\n");
98: Inside #if defined(PIKE_DEBUG)
   fatal("Length of type is wrong. (should be %d, is %d)\n",type_length(s->str),s->len);    }   } - #else - #define CHECK_TYPE(X) +    #endif      void init_types(void)
267:   void push_finished_type(struct pike_string *type)   {    int e; -  CHECK_TYPE(type); +  check_type_string(type);    for(e=type->len-1;e>=0;e--) push_type(type->str[e]);   }      void push_finished_type_backwards(struct pike_string *type)   {    int e; -  CHECK_TYPE(type); +  check_type_string(type);    MEMCPY(type_stackp, type->str, type->len);    type_stackp+=type->len;   }
289:    MEMCPY(s->str, type_stackp, len);    reverse(s->str, len, 1);    s=end_shared_string(s); -  CHECK_TYPE(s); +  check_type_string(s);    return s;   }   
1270:      int match_types(struct pike_string *a,struct pike_string *b)   { -  CHECK_TYPE(a); -  CHECK_TYPE(b); +  check_type_string(a); +  check_type_string(b);    clear_markers();    return 0!=low_match_types(a->str, b->str,0);   }
1460:    struct pike_string *index_type,    node *n)   { -  CHECK_TYPE(type); -  CHECK_TYPE(index_type); +  check_type_string(type); +  check_type_string(index_type);       return low_check_indexing(type->str, index_type->str, n);   }
1509:    */   int count_arguments(struct pike_string *s)   { -  CHECK_TYPE(s); +  check_type_string(s);       return low_count_arguments(s->str);   }
1517:   struct pike_string *check_call(struct pike_string *args,    struct pike_string *type)   { -  CHECK_TYPE(args); -  CHECK_TYPE(type); +  check_type_string(args); +  check_type_string(type);    clear_markers();    type_stack_mark();    max_correct_args=0;
1535:   INT32 get_max_args(struct pike_string *type)   {    INT32 ret,tmp=max_correct_args; -  CHECK_TYPE(type); +  check_type_string(type);    clear_markers();    type=check_call(function_type_string, type);    if(type) free_string(type);