Wed Aug 19 09:25:54 CEST 2009
PF compiler: SC < PF ?
Since it needs to construct the right data types, which ultimately tie
into the memory manager through finalizers, it looks like the linear
memory manager needs to be part of the Scheme's machine state if we
want to create linear code..
So no, this doesn't work..
What might work is to do it the other way around: have PF state be an
extension of SC state, so all Scheme code can run on the PF machine,
_and_ use the PF compiler words, but not vice versa.
Indeed: the `sc' struct only has the global registers and symbol cache
in addition to the `ex' struct. This can be easily changed.
In order for this to work, the linear data needs to be well
separated. Let's make a separate LCONS data structure.
Ok, almost done. ex_bang_reverse was not polymorphic, and it wasn't
completely clear where to do the graph -> lin conversion.
NONLIN -> LIN conversion should happen in pf_ functions, while px_
functions operate on nonlinear structures. They can depend on linear
structures, as long as they don't link them to anything. I.e. inplace
update is allowed, and some kinds of folding.