Optimizing Squeak

Dwight Hughes dwighth at ipa.net
Tue Feb 23 06:13:51 UTC 1999


Travis Griggs wrote:

> I follow these threads with rapt attention, but I have to admit my ignorance on what is meant by "translate to threaded code". I know what byte codes are, I know what native code is, and how the JIT stuff does it's dynamic cacheing, but what the heck is "threaded code." Please excuse my ignorance. Either I'm a big idiot, or there's a bunch of other idiots out there for not asking. :)
> 

Fundamentally, in threaded code, the execution tokens are the addresses
of the interpretive routines, either directly (direct threaded code) or
indirectly through a jump table (token threaded code). So the core of
the interpreter dispatch loop becomes trivial -- and very fast. Threaded
tokens are usually a machine word long. There are an assortment of
variants on these schemes, as can be seen here:

http://www.complang.tuwien.ac.at/forth/threaded-code.html

-- Dwight





More information about the Squeak-dev mailing list