Optimizing Squeak

Helge Horch Helge.Horch at munich.netsurf.de
Thu Feb 25 04:50:12 UTC 1999

At 14:09 24.02.99 -0800, John wrote:
>Note that part of Smalltalk/V's impressive speed for a simple interpreter was
>based on a carefully designed bytecode set. I've never been able to find out
>much about this bytecode set.

Don't. Make. Me. Fire. Up. V/DOS.

I used to know someone who had too much time on his hands in 1988. So I
don't think that the bytecode set was *so* unusual. It might have amounted
to the following:

1.) push opcodes: 0, 1, byteOop, wordOop, nil, false, true, receiver, 5
fixed stack offsets, byte-indexed stack offset, symbol, ivar 1 to 4, ivar
byte-indexed, literalReference, Block with 0/1/byte #args and skip, selector;

2.) pop opcodes: 2 fixed stack offsets, byte-indexed stack offset, ivar
1-2, ivar byte-indexed, stack byte-indexed, literalReference;

3.) sends: value, value:, x, y, +, -, ==, <, <=, >, =, //, \\, bitAnd:,
bitShift:, @, anySelector with 0/1/2/n args, sendToSuper;

4.) jumps: on false/true/unconditional, respective offsets

5.) misc: drop, dup, ret tos, ret receiver.

I was told that the a86 code was impressive, bytecodes not being indexed
but direct offsets into code.

No, it was in a different country. And besides, the wench is dead.

>which would explain why they hid the compiler classes from the user.

Thanks, Dejanews: http://www.dejanews.com/getdoc.xp?AN=185791543

In other words, sometime in 1996 Eric Clayberg revealed the secret behind
the classes with the funny names.


P.S. Anyone wanting to part with his copy of METHODS or Widgets/V-Mac?

More information about the Squeak-dev mailing list