Slava,
I see that read-local takes a variable name (a 'local'), the sequence of
variables, and generates the code in 'building' to access the right item on
the retain stack. Let's say we have:
[| a b c | a b + c + ]
'b' expands into code which pulls the second item out of the retain stack. One
downside is that the generated code is pretty wild looking. The cool thing is
that the code is pretty wild looking. :-) Anywho... since b is just a word
(along with a and c), would it be possible to define it as such:
: b ( -- value ) r> r> dup swap >r swap >r ;
I know that this is normally bad because the retain words aren't balanced, but
you mentioned that it's OK to do on inline words. The generated code would
look a little nicer I think. Something like:
[ >r >r >r
a b + c +
r> r> r> 3drop ]
Ed
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk