More fun with VMs

Jecel Assumpcao Jr jecel at merlintec.com
Wed Mar 22 14:46:21 UTC 2006


Dan,

> Lazy Activation

I included a slightly related idea in a 4 bit Smalltalk:

http://www.merlintec.com:8080/Hardware/dietST

This had an "enter" bytecode for explicitly creating a new context and a
"grabArg" bytecode from moving stuff from the sender's bytecode to the
newly created one. The idea was that the compiler would generate the
bytecodes for this as late in a method as possible (in the best cases -
never). This was inspired by the Smalltalks that defer the creation of
temporary variables until their first assignment. This static solution
is not as powerful as your dynamic one, but it does have a few things in
common.

This project only got as far as a SmaCC compiler for these bytecodes in
Squeak, so I never got any dynamic statistics for this;

> Cloned Activation

This is what I did in NeoLogo:

http://www.merlintec.com/pegasus2000/e_neologo.html

NeoLogo was just a paper design but this feature was also present in the
"SuperLogo" which I implemented in 1983 in TI99/4A Extended BASIC. It
worked great and actually makes the run time simpler at the cost of
slightly complicating the parser. Self actually explains method
activation in this way to the users (though the implementation is
radically different) because it is easier to understand than the
traditional schemes.

-- Jecel



More information about the Squeak-dev mailing list