[gforth] / gforth / hash.fs  

gforth: gforth/hash.fs

Diff for /gforth/hash.fs between version 1.7 and 1.8

version 1.7, Wed Dec 21 14:26:24 1994 UTC version 1.8, Thu Jan 19 19:43:46 1995 UTC
Line 29 
Line 29 
   
   
 : hash-find ( addr len wordlist -- nfa / false )  : hash-find ( addr len wordlist -- nfa / false )
     $C + @ >r      [ 3 cells ] Literal + @ >r
     2dup hash r> xor cells HashTable @ + @ (hashfind) ;      2dup hash r> xor cells HashTable @ + @ (hashfind) ;
   
 \ hash vocabularies                                    16jul94py  \ hash vocabularies                                    16jul94py
Line 37 
Line 37 
 : lastlink! ( addr link -- )  : lastlink! ( addr link -- )
   BEGIN  dup @ dup  WHILE  nip  REPEAT  drop ! ;    BEGIN  dup @ dup  WHILE  nip  REPEAT  drop ! ;
   
 : (reveal ( addr voc -- )  $C + dup @ 0< IF  2drop EXIT  THEN  : (reveal ( addr voc -- )  [ 3 cells ] Literal + dup @ 0< IF  2drop EXIT  THEN
   @ over cell+ count $1F and Hash xor cells >r    @ over cell+ count $1F and Hash xor cells >r
   HashPointer 8 $400 NewFix    HashPointer 2 Cells $400 NewFix
   tuck cell+ ! r> HashTable @ + insRule @    tuck cell+ ! r> HashTable @ + insRule @
   IF  dup @ 2 pick ! !  ELSE  lastlink!  THEN  revealed on ;    IF  dup @ 2 pick ! !  ELSE  lastlink!  THEN  revealed on ;
   


Generate output suitable for use with a patch program
Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help