Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | merge novem |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dgp-refactor |
Files: | files | file ages | folders |
SHA1: |
cc8a52a0732fe968968ae60541c6ed56 |
User & Date: | dgp 2015-03-24 18:38:19 |
Context
2015-03-31
| ||
02:48 | First sketch implementation of a Hash Array Map Trie (HAMT). check-in: b719efb9dd user: dgp tags: dgp-refactor | |
2015-03-24
| ||
18:38 | merge novem check-in: cc8a52a073 user: dgp tags: dgp-refactor | |
18:37 | merge trunk; purge TCL_HASH_KEY_STORE_HASH customization. That was a migration crutch to help code ... check-in: 237cb01cf9 user: dgp tags: novem | |
15:18 | merge novem check-in: 408dde56d0 user: dgp tags: dgp-refactor | |
Changes
Deleted compat/limits.h.
|
| < < < < < < < < < < < < < < < < < < < < < < |
Changes to generic/tcl.h.
︙ | ︙ | |||
248 249 250 251 252 253 254 | # define TCL_WIDE_INT_TYPE long long # define TCL_LL_MODIFIER "ll" # else /* ! _WIN32 && ! __GNUC__ */ /* * Don't know what platform it is and configure hasn't discovered what is * going on for us. Try to guess... */ | < < < | | | | | < | | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | # define TCL_WIDE_INT_TYPE long long # define TCL_LL_MODIFIER "ll" # else /* ! _WIN32 && ! __GNUC__ */ /* * Don't know what platform it is and configure hasn't discovered what is * going on for us. Try to guess... */ # include <limits.h> # if (INT_MAX < LONG_MAX) # define TCL_WIDE_INT_IS_LONG 1 # else # define TCL_WIDE_INT_TYPE long long # endif # endif /* _WIN32 */ #endif /* !TCL_WIDE_INT_TYPE & !TCL_WIDE_INT_IS_LONG */ #ifdef TCL_WIDE_INT_IS_LONG # undef TCL_WIDE_INT_TYPE # define TCL_WIDE_INT_TYPE long #endif /* TCL_WIDE_INT_IS_LONG */ |
︙ | ︙ | |||
940 941 942 943 944 945 946 | typedef unsigned (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr); typedef int (Tcl_CompareHashKeysProc) (void *keyPtr, Tcl_HashEntry *hPtr); typedef Tcl_HashEntry * (Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr, void *keyPtr); typedef void (Tcl_FreeHashEntryProc) (Tcl_HashEntry *hPtr); | < < < < < < < < < < < < < < < < < < | 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 | typedef unsigned (Tcl_HashKeyProc) (Tcl_HashTable *tablePtr, void *keyPtr); typedef int (Tcl_CompareHashKeysProc) (void *keyPtr, Tcl_HashEntry *hPtr); typedef Tcl_HashEntry * (Tcl_AllocHashEntryProc) (Tcl_HashTable *tablePtr, void *keyPtr); typedef void (Tcl_FreeHashEntryProc) (Tcl_HashEntry *hPtr); /* * Structure definition for an entry in a hash table. No-one outside Tcl * should access any of these fields directly; use the macros defined below. */ struct Tcl_HashEntry { Tcl_HashEntry *nextPtr; /* Pointer to next entry in this hash bucket, * or NULL for end of chain. */ Tcl_HashTable *tablePtr; /* Pointer to table containing entry. */ void *hash; /* Hash value, stored as pointer to ensure * that the offsets of the fields in this * structure are not changed. */ ClientData clientData; /* Application stores something here with * Tcl_SetHashValue. */ union { /* Key has one of these forms: */ char *oneWordValue; /* One-word value for key. */ Tcl_Obj *objPtr; /* Tcl_Obj * key value. */ int words[1]; /* Multiple integer words for key. The actual * size will be as large as necessary for this |
︙ | ︙ | |||
2216 2217 2218 2219 2220 2221 2222 | Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); #if defined(_WIN32) && defined(UNICODE) TCLAPI void Tcl_MainExW(int argc, wchar_t **argv, Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); #endif TCLAPI const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp, const char *version, int exact); | < < | 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 | Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); #if defined(_WIN32) && defined(UNICODE) TCLAPI void Tcl_MainExW(int argc, wchar_t **argv, Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); #endif TCLAPI const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp, const char *version, int exact); TCLAPI void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); /* *---------------------------------------------------------------------------- * Include the public function declarations that are accessible via the stubs * table. */ |
︙ | ︙ |
Changes to generic/tclHash.c.
︙ | ︙ | |||
317 318 319 320 321 322 323 | */ if (typePtr->compareKeysProc) { Tcl_CompareHashKeysProc *compareKeysProc = typePtr->compareKeysProc; for (hPtr = tablePtr->buckets[index]; hPtr != NULL; hPtr = hPtr->nextPtr) { | < < < < | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | */ if (typePtr->compareKeysProc) { Tcl_CompareHashKeysProc *compareKeysProc = typePtr->compareKeysProc; for (hPtr = tablePtr->buckets[index]; hPtr != NULL; hPtr = hPtr->nextPtr) { if (hash != PTR2UINT(hPtr->hash)) { continue; } if (compareKeysProc((void *) key, hPtr)) { if (newPtr) { *newPtr = 0; } return hPtr; } } } else { for (hPtr = tablePtr->buckets[index]; hPtr != NULL; hPtr = hPtr->nextPtr) { if (hash != PTR2UINT(hPtr->hash)) { continue; } if (key == hPtr->key.oneWordValue) { if (newPtr) { *newPtr = 0; } return hPtr; } } |
︙ | ︙ | |||
364 365 366 367 368 369 370 | } else { hPtr = ckalloc(sizeof(Tcl_HashEntry)); hPtr->key.oneWordValue = (char *) key; hPtr->clientData = 0; } hPtr->tablePtr = tablePtr; | < < < < < < | 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | } else { hPtr = ckalloc(sizeof(Tcl_HashEntry)); hPtr->key.oneWordValue = (char *) key; hPtr->clientData = 0; } hPtr->tablePtr = tablePtr; hPtr->hash = UINT2PTR(hash); hPtr->nextPtr = tablePtr->buckets[index]; tablePtr->buckets[index] = hPtr; tablePtr->numEntries++; /* * If the table has exceeded a decent size, rebuild it with many more * buckets. */ |
︙ | ︙ | |||
412 413 414 415 416 417 418 | Tcl_DeleteHashEntry( Tcl_HashEntry *entryPtr) { register Tcl_HashEntry *prevPtr; const Tcl_HashKeyType *typePtr; Tcl_HashTable *tablePtr; Tcl_HashEntry **bucketPtr; | < < < < < < | 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | Tcl_DeleteHashEntry( Tcl_HashEntry *entryPtr) { register Tcl_HashEntry *prevPtr; const Tcl_HashKeyType *typePtr; Tcl_HashTable *tablePtr; Tcl_HashEntry **bucketPtr; int index; tablePtr = entryPtr->tablePtr; if (tablePtr->keyType == TCL_STRING_KEYS) { typePtr = &tclStringHashKeyType; } else if (tablePtr->keyType == TCL_ONE_WORD_KEYS) { typePtr = &tclOneWordHashKeyType; } else if (tablePtr->keyType == TCL_CUSTOM_TYPE_KEYS || tablePtr->keyType == TCL_CUSTOM_PTR_KEYS) { typePtr = tablePtr->typePtr; } else { typePtr = &tclArrayHashKeyType; } if (typePtr->hashKeyProc == NULL || typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) { index = RANDOM_INDEX(tablePtr, PTR2INT(entryPtr->hash)); } else { index = PTR2UINT(entryPtr->hash) & tablePtr->mask; } bucketPtr = &tablePtr->buckets[index]; if (*bucketPtr == entryPtr) { *bucketPtr = entryPtr->nextPtr; } else { for (prevPtr = *bucketPtr; ; prevPtr = prevPtr->nextPtr) { if (prevPtr == NULL) { Tcl_Panic("malformed bucket chain in Tcl_DeleteHashEntry"); |
︙ | ︙ | |||
1058 1059 1060 1061 1062 1063 1064 | /* * Rehash all of the existing entries into the new bucket array. */ for (oldChainPtr = oldBuckets; oldSize > 0; oldSize--, oldChainPtr++) { for (hPtr = *oldChainPtr; hPtr != NULL; hPtr = *oldChainPtr) { *oldChainPtr = hPtr->nextPtr; | < < < < < < < < < < < < < < < < < < < < < | 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 | /* * Rehash all of the existing entries into the new bucket array. */ for (oldChainPtr = oldBuckets; oldSize > 0; oldSize--, oldChainPtr++) { for (hPtr = *oldChainPtr; hPtr != NULL; hPtr = *oldChainPtr) { *oldChainPtr = hPtr->nextPtr; if (typePtr->hashKeyProc == NULL || typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) { index = RANDOM_INDEX(tablePtr, PTR2INT(hPtr->hash)); } else { index = PTR2UINT(hPtr->hash) & tablePtr->mask; } hPtr->nextPtr = tablePtr->buckets[index]; tablePtr->buckets[index] = hPtr; } } /* * Free up the old bucket array, if it was dynamically allocated. */ |
︙ | ︙ |
Changes to unix/configure.
︙ | ︙ | |||
3325 3326 3327 3328 3329 3330 3331 | : else cat >>confdefs.h <<\_ACEOF #define NO_VALUES_H 1 _ACEOF | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 | : else cat >>confdefs.h <<\_ACEOF #define NO_VALUES_H 1 _ACEOF fi if test "${ac_cv_header_stdlib_h+set}" = set; then echo "$as_me:$LINENO: checking for stdlib.h" >&5 echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 if test "${ac_cv_header_stdlib_h+set}" = set; then |
︙ | ︙ |
Changes to unix/tcl.m4.
︙ | ︙ | |||
2154 2155 2156 2157 2158 2159 2160 | # none # # Results: # # Defines some of the following vars: # NO_DIRENT_H # NO_VALUES_H | < | 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 | # none # # Results: # # Defines some of the following vars: # NO_DIRENT_H # NO_VALUES_H # NO_STDLIB_H # NO_STRING_H # NO_SYS_WAIT_H # NO_DLFCN_H # HAVE_SYS_PARAM_H # # HAVE_STRING_H ? |
︙ | ︙ | |||
2194 2195 2196 2197 2198 2199 2200 | if test $tcl_cv_dirent_h = no; then AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?]) fi AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])]) AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])]) | < < < | 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 | if test $tcl_cv_dirent_h = no; then AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?]) fi AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])]) AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])]) AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) if test $tcl_ok = 0; then AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?]) fi |
︙ | ︙ |
Changes to unix/tclConfig.h.in.
︙ | ︙ | |||
120 121 122 123 124 125 126 | /* Do we have nl_langinfo()? */ #undef HAVE_LANGINFO /* Define to 1 if you have the <libkern/OSAtomic.h> header file. */ #undef HAVE_LIBKERN_OSATOMIC_H | < < < | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | /* Do we have nl_langinfo()? */ #undef HAVE_LANGINFO /* Define to 1 if you have the <libkern/OSAtomic.h> header file. */ #undef HAVE_LIBKERN_OSATOMIC_H /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if you have the `lseek64' function. */ #undef HAVE_LSEEK64 /* Define to 1 if you have the <memory.h> header file. */ |
︙ | ︙ | |||
306 307 308 309 310 311 312 | /* Do we have getwd() */ #undef NO_GETWD /* Do we have a usable 'isnan'? */ #undef NO_ISNAN | < < < | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | /* Do we have getwd() */ #undef NO_GETWD /* Do we have a usable 'isnan'? */ #undef NO_ISNAN /* Do we have memmove()? */ #undef NO_MEMMOVE /* Do we have realpath() */ #undef NO_REALPATH /* Do we have <stdlib.h>? */ |
︙ | ︙ |
Changes to unix/tclUnixPort.h.
︙ | ︙ | |||
140 141 142 143 144 145 146 | #endif #ifndef NO_SYS_WAIT_H # include <sys/wait.h> #endif #if HAVE_INTTYPES_H # include <inttypes.h> #endif | < < < | < | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | #endif #ifndef NO_SYS_WAIT_H # include <sys/wait.h> #endif #if HAVE_INTTYPES_H # include <inttypes.h> #endif #include <limits.h> #if HAVE_STDINT_H # include <stdint.h> #endif #ifdef HAVE_UNISTD_H # include <unistd.h> #else # include "../compat/unistd.h" |
︙ | ︙ |