A fully late bound namespace proposal

Ralph Johnson johnson at cs.uiuc.edu
Thu Oct 4 13:30:31 UTC 2007


> Some versions of Smalltalk do something like this.  The bytecodes that
> get generated use the Association for the global as the literal, and
> send the #value message to read the global and the #value: message to
> write it.  However, I just looked at a Squeak method and it looks like
> Squeak does something different, that it has special bytecodes for
> reading a global.  It would be easy to change, though.

I was wrong, Squeak does store the Association in the literal frame of
the method.  What it doesn't do is send the #value message.  Squeak
uses a class called ReadOnlyVariableBinding, which is essentially an
Association.  There is a special bytecode called pushlit: that seems
to push the value of the ROVB, but you could probably use
#pushConstant: and then send #value to it and get the same result.

If that works, all you have to do is to change the #value method to
change how class names are looked up.

-Ralph



More information about the Squeak-dev mailing list