Mon Nov 16 17:52:40 CET 2009

compile "display lists"

Similar to opengl, it's probably possible to observe the calls into
leaf to simply record all primitive calls to compile them to threaded
code.  Adding the proper inspection points (all leaf calls go through
a broker?) will make this possible.

Essentially, the broker is an RPC mechanism: the client (EX/SC/PF)
calls into LEAF through an observable channel:

      EX <-> RPC <-> LEAF

Ignoring side effects, replacing the sequence of calls generated by EX
by a flat script should produce the same result.  However, this
doesn't capture loops efficiently.  Maybe some combinators could be
added to the RPC mechanism?

In general: simply recording shouldn't be so difficult.
Parameterizing the representation however is not so easy.

Also, it would probably work better with statically allocated objects:
given a pool of objects, record all operations that go between.

Maybe starting with a generic prototype would help?  Return int for
errors + only operate on leaf objects.