15 lines
613 B
Plaintext
Executable file
15 lines
613 B
Plaintext
Executable file
:t entry= ( name len entry -- f )
|
|
dup wordname swap wordlen <rot = BZ_ [ ( p1 - fail ) patchpt ]
|
|
[ ( l1 ) target @ ] over b@ dup BZ_ [ ( p2 - success ) patchpt ]
|
|
over b@ = BZ_ [ ( p3 - fail ) patchpt ]
|
|
2inc GOTO_ [ ( l1 ) <rot w>t ]
|
|
( fail ) [ patch!t swap patch!t ] drop drop 0 return
|
|
( success ) [ patch!t ] drop drop 1 ;
|
|
|
|
:t lookup ( name -- cp meta | name 0 )
|
|
dup strlen over dictbucket
|
|
[ target @ ] @ dup . dup BZ_ [ patchpt ]
|
|
3dup entry= BZ_ [ swap w>t ]
|
|
( entry found ) >rot drop drop dup codepointer swap wordflags @ return
|
|
( end of list ) [ patch!t ] drop drop 0 ;
|