Fri Jun 5 13:10:31 CEST 2009
don't lift everything
Ok I see what the problem is: I'm trying to implement _all_ of a .f
file describing the compiler as a compile-time entitiy. That is the
mistake. The compile-time functionality usually does _not_ contain
any conditional code, so straight-line execution is enough.
Can this be made more precise?
The phase separation bootstrapper for metacircular Forth compilers can
be made a lot simpler if it makes the assumption that immediate words,
implemented in terms of other code _do not_ use any immediate words
themselves directly or indirectly through their dependencies. In
other words: the .f file should be expressable in two phases.
The reason for this is that control words are incompatible with purely
compositional semantics of the scat language. It wouldn't be
impossible to unroll more phases, but this would require phase 1
(scat) to support assumptions made about code threading, which isn't
The primitives "doLIT", "branch" and "?branch" are reflective: they
know about threaded code and change the nature of the interpreter.