Machine-Code Reflection (RFC)

btanksley@hifn.com btanksley@hifn.com
Mon, 5 Jun 2000 14:14:57 -0700


From: Joseph Bowers [mailto:jbowers@perspex.com]

>How might reflexive machine code be handled? There is going
>to have to be a little bit present, and it seems kind of sad
>to have some involate core at the center of the system. I suppose
>something like

One common way, and my favorite, is to compile to some kind of bytecode or
wordcode, and use a dynamic optimiser to convert that to machine-code as
needed.  When code modification happens, it happens to the bytecode, and
when it's over the machine code can be deleted (or more accurately, the
bytecode can be tagged as unoptimised, so the next time it's executed it'll
be recompiled).

>Joe

-Billy