Adam Turoff wrote:
> when dealing with threaded bytecode is that the threading specifically
> eliminates the indirection in the name of speed.
Yes. Chaim was saying that for the functions that need indirection,
they could use stubs. You don't need to guess in advance which ones
need indirection because at run-time you can just copy the old code
to a new location and *write over* the old location with a "fetch pointer
and tail call" stub. All bytecode pointers stay the same -- they just
point to the stub now. The only restriction on this technique is that
the no sub body can be smaller than the indirection stub. (We could
easily make a single bytecode op that does a symbol table lookup
and tail call so I don't see any practical restrictions at all.)
- Ken