Slava,
Here's your idea about marking words:
: mark-words ( vocab -- ) words [ t "unloaded" set-word-prop ] each ;
: check-def ( quot -- )
[ word? ] subset
[ "unloaded" word-prop ] find nip
dup [ throw ] [ drop ] if ;
: define ( word def primitive -- )
over check-def
pick f "unloaded" set-word-prop
pick changed-word
pick unxref-word
pick set-word-primitive
over set-word-def
dup update-xt
xref-word ;
So before reloading a vocabulary foo, this is done:
"foo" mark-words
Then the rest of the file is parsed as usual. The ':' word calls define which
takes care of checking the definition for references to "unloaded"
words. 'define' then resets the "unloaded" flag.
The above words work on some simple cases that I tried. What do you think?
Ed
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk