Re: The IMMEDIATE mess



On 29 Aug 2006 10:11:14 -0700, "GerryJ"
<gerry@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
In a dual xt system, something like IF would work as follows;
: IF -14 throw compilation> ( xt of IF -- ) ... ; \ do IF when
compiling stuff
That's more or less what my system does. Every word has a pointer to a
semantics class, which contains, amongst other things, two methods
called interpret() and >compile()

There are only few words with dual semantics in standard Forth. How
many are in your system? It seems to me a waste of space to let nearly
every word "carry a useless xt around".


Andreas
-------
1 + 1 = 3, for large values of 1.
.



Relevant Pages

  • Re: The IMMEDIATE mess
    ... semantics class for each of these as it gives a way to get straight to ... the compiling code without having to test STATE (that is done by the ... pointer) in all colon definitions point to the same semantics class ... The exception is thrown in the interpret() method. ...
    (comp.lang.forth)
  • Re: The IMMEDIATE mess
    ... Every word has a pointer to a ... semantics class, which contains, amongst other things, two methods ... No it doesn't use an extra cell - see my reply to Andreas Kochenburger ...
    (comp.lang.forth)
  • Re: The IMMEDIATE mess
    ... semantics class, which contains, amongst other things, two methods ... 00 execute when interpreting, do not find when compiling. ... Interpreted control structures are a convenience. ...
    (comp.lang.forth)