[squeak-dev] Re: squeak VM 5.0

Bert Freudenberg bert at freudenbergs.de
Fri Dec 18 12:18:37 UTC 2009

On 18.12.2009, at 07:05, David T. Lewis wrote:
> 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
> http://bugs.squeak.org/view.php?id=7430.
> Dave

But why?

Except using the SystemTracer you can't change the wordSize of an image. So the right place for setting it is SystemTracer. It is completely unnecessary to check for this on startup.

- Bert -

More information about the Squeak-dev mailing list