Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #39543
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Macros based [CONTEXT]-EVALUATE |
| Date | 2015-06-03 14:01 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2015Jun3.160132@mips.complang.tuwien.ac.at> (permalink) |
| References | <2015Jun3.091211@mips.complang.tuwien.ac.at> <mkn0kt$u50$1@dont-email.me> |
"Alex McDonald" <blog@rivadpm.com> writes:
>on 03/06/2015 08:12:11, wrote:
>> The FIND limit influences dictionary
>> searches such that only words below the FIND limit are found (so that
>> later redefinitions of a word used inside the macro are not found).
>
>That won't work for systems where HERE (or a plurality of HEREs for multi
>section Forths) don't conform to a increments-thru-time model.
Yes, for systems where the header addresses don't increase
monotonically when defining a new word, the FIND limit would require a
separate mechanism, such as a defined-name counter. I do believe that
most Forth systems don't need to go for that, though.
>For
>instance, the dictionary in Win32Forth and others may be external; a
>library, an SQL database and so on.
With the names from a library, there is a point when they became part
of the FINDable words; that would be their counter.
>It may be relocated, optimised, built
>out of non-ascending lumps, garbage collected or even poofed out of
>existence for turnkeys.
Well, once the dictionary is "poofed out", FIND, EVALUATE and
EVALUATE-based macros will stop working anyway, so we don't need to
worry about the FIND limit then. The other cases can be covered with
a counter.
>As was made clear in the case of TRAVERSE-WORDLIST, about all we can
>reasonably ask is that definitions for the same name are returned in
>*time sequenced* order, not address order. "TRAVERSE- WORDLIST may visit
>words in any order, with one exception: words with the same name are
>called in the order newest-to-oldest (possibly with other words in
>between)."
Order variations in TRAVERSE-WORDLIST may occur even if the addresses
reflect the definition order, e.g., because it's easier to traverse a
hash table with external chaining one chain after another than in
address order. In that case the FIND limit is trivial to implement.
If the addresses don't reflect definition order, TRAVERSE-WORDLIST is
just as easy to implement, but the FIND limit needs additional
resources. So overall these two issues have little to do with each
other.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2015: http://www.mpeforth.com/euroforth2015/euroforth2015.htm
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Macros based [CONTEXT]-EVALUATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-06-03 07:12 +0000
Re: Macros based [CONTEXT]-EVALUATE "Alex McDonald" <blog@rivadpm.com> - 2015-06-03 14:50 +0100
Re: Macros based [CONTEXT]-EVALUATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-06-03 14:01 +0000
Re: Macros based [CONTEXT]-EVALUATE "Alex McDonald" <blog@rivadpm.com> - 2015-06-03 21:21 +0100
Re: Macros based [CONTEXT]-EVALUATE humptydumpty <ouatubi@gmail.com> - 2015-06-03 09:02 -0700
Re: Macros based [CONTEXT]-EVALUATE hughaguilar96@gmail.com - 2015-06-03 14:07 -0700
csiph-web