Sat Jan 23 07:15:13 CET 2010

Encoding `let' non-tail calls as SC primitives

Again, the essence: while walking the list of expressions to be
evaluated in a `let' form, two means of dispatch are necessary:

   - P: the operation is primitive and can compute a value immediately
     without modifying the current continuation.

   - N: the operation nests.

Is it possible to represent the N form as a P form, or does this need
to be encoded explicitly?

The fundamental dissonance is that this then yields 3 kinds of C
functions to implement machine behaviour:

   _vm:  creates context (CALL)
   _kf:  consumes context (RETURN)
   ex:   avoids creation/consumption of context (CALL+RETURN)

The main problem being that ex (functions) cannot represent _vm nor
_kf which are "function yin & yang".

I.e. the constraint to use C function semantics for most of the
structure of libprim requires that at some point a decision is made to
either use the C call semantics (the C stack), or the VM call
semantics (the continuation stack).