>>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:

>> A TIL doesn't have to be machine code. A first pass for a port that does
>> the TIL inner loop in C, should be quite portable. 

DS> Okay, now I'm confused. I was under the impression that doing a TIL really
DS> required getting down 'n dirty with assembly-level jmps and jsrs, the
DS> alternative being the op-loop we've got now, more or less.

DS> Or are you thinking of having the op functions just goto the start of the
DS> next one on the list? I'd think you'd blow your stack reasonably soon that
DS> way. (Why do I sense my reading list is about to get larger?)
 
Err, no. Think of it this way.

A TIL level sub

        ^TIL header code        # ptr to real Function
        ^funcA                  # Start of a til function
        ^funcB                  # start of a til function
        ^funcC

So all pointers point at a real function. In the lowest level case, it
is pure machine code to be executed. If it is a TIL level sub, the
pointer is to a routine that pushes the current TIL program counter 
and reenters the inner loop.

This is with an inner loop. The dispatching could be sped up at the
cost of space by converting the pointers into real calls, and replacing
calls to push functions with real pushes.

<chaim>
-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to