version 1.15, 1996/07/16 20:57:10
|
version 1.17, 1996/11/15 21:19:29
|
Line 103 Create hashsearch-map ( -- wordlist-map
|
Line 103 Create hashsearch-map ( -- wordlist-map
|
HashTable Hashlen cells erase THEN |
HashTable Hashlen cells erase THEN |
HashIndex @ over ! 1 HashIndex +! |
HashIndex @ over ! 1 HashIndex +! |
HashIndex @ Hashlen >= |
HashIndex @ Hashlen >= |
IF clearhash |
IF HashTable >r clearhash |
1 hashbits 1+ dup to hashbits lshift to hashlen |
1 hashbits 1+ dup to hashbits lshift to hashlen |
HashTable free |
r> free >r 0 to HashTable |
addall |
addall r> throw |
THEN ; |
THEN ; |
|
|
: (initvoc) ( addr -- ) |
: (initvoc) ( addr -- ) |
cell+ dup @ 0< IF drop EXIT THEN |
cell+ dup @ 0< IF drop EXIT THEN |
insRule @ >r insRule off hash-alloc |
dup 2 cells - @ hashsearch-map <> IF drop EXIT THEN |
3 cells - hashsearch-map over cell+ ! dup |
insRule @ >r insRule off hash-alloc 3 cells - dup |
BEGIN @ dup WHILE 2dup swap (reveal REPEAT |
BEGIN @ dup WHILE 2dup swap (reveal REPEAT |
2drop r> insRule ! ; |
2drop r> insRule ! ; |
|
|
' (initvoc) ' 'initvoc >body ! |
' (initvoc) IS 'initvoc |
|
|
\ Hash-Find 01jan93py |
\ Hash-Find 01jan93py |
|
|
addall \ Baum aufbauen |
: make-hash |
\ Baumsuche ist installiert. |
Root hashsearch-map context @ cell+ ! |
|
Forth hashsearch-map context @ cell+ ! |
|
addall \ Baum aufbauen |
|
; |
|
|
|
make-hash \ Baumsuche ist installiert. |
|
|
: hash-cold ( -- ) Defers 'cold |
: hash-cold ( -- ) Defers 'cold |
HashPointer off 0 TO HashTable HashIndex off |
HashPointer off 0 TO HashTable HashIndex off |