[squeak-dev] Re: squeak VM 5.0

Bert Freudenberg bert at freudenbergs.de
Thu Dec 17 14:28:54 UTC 2009


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 ;)

- Bert -

> =====
> !SystemTracer2 methodsFor: 'clone startup' stamp: 'ajh 8/22/2002 11:15'!
> clonePreStartup
> 	"This will be executed right away when the new clone starts up, before processStartup.  Subclasses may want to rehash all objects or something"
> 	SystemDictionary wordSize: self wordSize.! !
> =====
> 
> Now, there are some tests which does not pass.
> So, I will publish the code and the pharoImage64, and with the community, we can check this.
> 
> Cheers,
> Jannik 
> 
> 
> On Dec 17, 2009, at 02:32 , John M McIntosh wrote:
> 
>> Ok, well I created Mantis 
>> http://bugs.squeak.org/view.php?id=7430
>> to document. 
>> 
>> Personally I would do 
>> Smalltalk wordSize
>> versus 
>> SystemDictionary wordSize
>> 
>> Also the issue is when to change the WordSize variable. 
>> 
>> I think in 
>> SmalltalkImage>>snapshot: andQuit: embedded:  
>> right at the 
>> 		ifTrue: [self quitPrimitive].
>> 	Cursor normal show.
>> you want to set things so that wordSize is reset. 
>> 
>> At quit time you could do the reset before the 
>> "self quitPrimitive"
>> then you know the value is reset and needs to be recalculated at startup time. 
>> or you can reset it before the
>> 	Cursor normal show.
>> which runs after startup time
>> 
>> Somehow I think there is more risk resetting it after startup since I'm not sure 
>> when something could leap in wanting a valid value. 
> 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20091217/920db2bc/attachment.htm


More information about the Squeak-dev mailing list