2 \ ** ficl/softwords/ficlclass.fr
3 \ Classes to model ficl data structures in objects
5 \ John Sadler 14 Sep 1998
12 object subclass c-word
14 c-2byte obj: .hashcode
22 : get-name ( inst class -- c-addr u )
24 my=[ .pName get-ptr ] -rot
28 : next ( inst class -- link-inst class )
33 2dup --> get-name type cr
38 \ ** C - W O R D L I S T
41 \ get-current c-wordlist --> ref current
43 \ current --> .hash --> ?
44 \ current --> .hash --> next --> ?
46 object subclass c-wordlist
47 c-wordlist ref: .parent
50 c-word ref: .hash ( first entry in hash table )
53 --> get-name ." ficl wordlist " type cr ;
55 : pop 2drop previous ;
56 : set-current drop set-current ;
57 : get-name drop wid-get-name ;
59 this my=[ .size get ] 0 do
60 i this my=[ .hash index ] ( 2list-head )
62 2dup --> get-name type space
69 \ : named-wid wordlist postpone c-wordlist metaclass => ref ;
72 \ ** C - F I C L S T A C K
73 object subclass c-ficlstack
77 c-4byte obj: .stackBase
83 --> .sp --> .addr --> prev --> get ;