May I offer an alternative. Why do an interpreter? 

I remember reading good things about Threaded Interpreters
(e.g. Forth) So why not do a TIL? Compile it to machine calls/jumps.
Should be much faster than the inner run loop.

This would fit in with Dan and Nick's keep it in cache.

So there could be several different runtime stages.

On machines where perl knows how to assemble machine instructions do it
in raw executable code.

On machines where perl doesn't know how to. Write an small assembler language
stub that does the Threaded code.

On those machines where we can't even do that. Interpret the threaded code
in C.

<chaim>


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

DS> I was thinking that, since the compiler has most of the information, a 
DS> "type check" opcode could be used, and inserted only where needed. If, for 
DS> example, you had:

DS>    my ($foo, $bar);
DS>    my ($here, $there) : Place;

DS>    $foo = $bar;
DS>    $here = $there;

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

Reply via email to