[squeak-dev] Re: squeak VM 5.0
David T. Lewis
lewis at mail.msen.com
Fri Dec 18 06:05:44 UTC 2009
On Thu, Dec 17, 2009 at 03:28:54PM +0100, Bert Freudenberg wrote:
> On 17.12.2009, at 07:44, Laval Jannik wrote:
> > Hi,
> > I modify the variable in the method "clonePreStartup".
> > So, it works fine.
> Given that this won't change on any further startup I'd think this is
> a better solution than putting it in the snapshot code. Since there
> won't be a sender of #wordSize: in the resulting image, I'd add a
> comment explaining why. Also, I'd take out the lazy init code in
> #wordSize, no need to be lazy here ;)
Actually I think that Laval got it right with the lazy initialize.
CompiledMethod>>initialPC will call #wordSize, so if you clear the
cached value before the snapshot, it should be restored on the next
reference after the snapshot as the image is restarted.
I think John is right that it should be "Smalltalk wordSize" rather
than "SystemDictionary wordSize" (disregard my earlier dumb suggestion
of using "Object wordSize"). And I think it's right to clear the
cached value prior to the snapshot (although I'm not 100% sure it
stays cleared; I guess I should confirm that).
I put a change set that updates Laval's changes on Mantis at
More information about the Squeak-dev