|
From: Andre R. <and...@us...> - 2004-11-24 20:48:45
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15457/Common/headers Modified Files: Tag: New_Tables_Experiment-branch frontierdefs.h lang.h langinternal.h Log Message: Retired flv10tables pre-processor definition. Code that was ifdef'd for it has been permanently enabled. We are going to make more changes soon that require the new code, but ifdef'ing the new stuff as well would be too complex. Index: lang.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/lang.h,v retrieving revision 1.4.2.6 retrieving revision 1.4.2.7 diff -C2 -d -r1.4.2.6 -r1.4.2.7 *** lang.h 21 Nov 2004 20:15:25 -0000 1.4.2.6 --- lang.h 24 Nov 2004 20:48:17 -0000 1.4.2.7 *************** *** 448,456 **** byte ctlocks: 8; - #ifdef flv10tables - unsigned long hashval; /*2004-11-10 aradke: cache of hashfunction(hashkey)*/ - - #endif byte hashkey []; /*the identifier of this table element, lives in extension of record*/ --- 448,452 ---- *************** *** 463,491 **** ! #ifdef flv10tables ! ! typedef hdlhashnode **hdlhashbucketarray; ! ! typedef unsigned long tyhashval; ! #define ctinitiallogsize 4 /*(2 ** 4) = 16 buckets*/ ! ! #define nthhashbucket(ht,i) ((*((**(ht)).hbuckets))[i]) ! ! #define gethashbucketcount(ht) (1 << (**(ht)).logsize) ! ! #define hashtobucketindex(ht,hash) ((hash) & ((**ht).bucketmask)) ! #else ! #define ctbuckets 11 /*should be a prime number?*/ ! ! #define nthhashbucket(ht,i) ((**(ht)).hashbucket[i]) ! ! #define gethashbucketcount(ht) ctbuckets ! ! #define hashtobucketindex(ht,hash) hash /*already handled in hash function*/ ! #endif --- 459,473 ---- ! typedef hdlhashnode **hdlhashbucketarray; ! typedef unsigned long tyhashval; ! #define ctinitiallogsize 4 /*(2 ** 4) = 16 buckets*/ ! #define nthhashbucket(ht,i) ((*((**(ht)).hbuckets))[i]) ! #define gethashbucketcount(ht) (1 << (**(ht)).logsize) ! ! #define hashtobucketindex(ht,hash) ((hash) & ((**ht).bucketmask)) *************** *** 495,500 **** typedef struct tyhashtable { - #ifdef flv10tables - hdlhashbucketarray hbuckets; /*handle to an array of hash node handles*/ --- 477,480 ---- *************** *** 505,514 **** unsigned long ctnodes; /*number of nodes in the table*/ - #else - - hdlhashnode hashbucket [ctbuckets]; - - #endif - #ifdef fltablesortorderisarray --- 485,488 ---- Index: frontierdefs.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/frontierdefs.h,v retrieving revision 1.2.2.4 retrieving revision 1.2.2.5 diff -C2 -d -r1.2.2.4 -r1.2.2.5 *** frontierdefs.h 15 Nov 2004 20:52:08 -0000 1.2.2.4 --- frontierdefs.h 24 Nov 2004 20:48:16 -0000 1.2.2.5 *************** *** 76,80 **** #undef lazythis_optimization #undef langexternalfind_optimization - #define flv10tables 1 /* 2004-11-10 aradke: for new hash table implementation [EXPERIMENTAL] */ #define flrecyclehashnodes 1 /* 2004-11-11 aradke: enable to recycle hashnodes instead of disposing [EXPERIMENTAL] */ #define flrecyclehashbuckets 1 /* 2004-11-14 aradke: enable to recylce hash bucket arrays [EXPERIMENTAL] */ --- 76,79 ---- Index: langinternal.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/langinternal.h,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** langinternal.h 10 Nov 2004 17:21:46 -0000 1.3.2.1 --- langinternal.h 24 Nov 2004 20:48:17 -0000 1.3.2.2 *************** *** 416,424 **** extern boolean hashflushcache (long *); /*langhash.h*/ ! #ifdef flv10tables ! extern unsigned long hashfunction (const bigstring); /* 2004-11-10 aradke */ ! #else ! extern short hashfunction (const bigstring); ! #endif extern boolean hashresolvevalue (hdlhashtable, hdlhashnode); --- 416,420 ---- extern boolean hashflushcache (long *); /*langhash.h*/ ! extern unsigned long hashfunction (const bigstring); /* 2004-11-10 aradke */ extern boolean hashresolvevalue (hdlhashtable, hdlhashnode); |