But to realize this powerful development environment, Dreams and the tree-stacks will have to co-exist in the same Forth system. This presents difficulties more profound than one would imagine. When the control environment changes due to a multi-tasking context switch, we have seen how to handle the Dreams object binding environment, but what happens when a THROW is caught by an earlier CATCH? The status of the binding environment must have been saved at the CATCH in order for the THROW to properly restore it. A brute force solution would be to save a copy of the token translation table for every CATCH or other such control point. This would rapidly get out of hand, both for the time to make the copy, and for the memory that it would consume.
A central point to the architecture of our Dreams Forth system being developed is a mechanism to keep track of this binding environment along with the stacks associated with it for every flow of control that is active. The structure that results is similar to the shallow binding mechanism used in many Lisp systems [All78, Sec.3.11, pp 149-153]. It should still permit the hardware speed-up by using a hardware token translation table, and also the hardware implementation of the tree-structured stacks. We are now looking into the feasibility of implementing the shallow binding mechanism in a programmable gate array.