PoolDictionary handling (was Re: [ANN] "Upgrade to 3.6
FullImage" package on SqueakMap)
ajh18 at cornell.edu
Sat May 17 17:49:35 UTC 2003
Anthony Hannan <ajh18 at cornell.edu> wrote:
> Stephen Pair <stephen at pairhome.net> wrote:
> > This solution feels like you're trying really hard to fit something into
> > an existing mold rather than changing the mold itself. Would it not be
> > better to go ahead and make the VM actually send the #value message.
> The closure compiler compiles Class, Pool and Global variable references
> this way. For example, "Object new" is compiled to "pushLit: Object
> association. send: #value. send: #new". And "Object _ nil" is compiled
> to "pushNil. pushLit: Object association. send: #setInValue:". "object
> setInValue: var" calls "var value: object". I generate the reverse
> notation to match how other assignments are done. The value is
> calculated first then it is stored. The VM needs no change.
The advantage of this is that the value does not have to be in the
second slot of the variable. The current compiler assumes all class,
pool, global variables are Associations. With the closure compiler you
can use any object as your variable.
An alternative to binding variables to the method is to bind the
environment to the method and look up variables at runtime. For
example, "Object new" could compile to "pushLit: environment. pushLit:
#Object. send: #valueOf:. send: #new."
More information about the Squeak-dev