[Pharo-project] [Fwd: [squeak-dev] The Trunk: Kernel-ar.411.mcz]

Stéphane Ducasse stephane.ducasse at inria.fr
Sat Feb 27 03:17:16 EST 2010


Thanks a lot miguel

Stef

On Feb 27, 2010, at 8:29 AM, Miguel Enrique Cobá Martinez wrote:

> Maybe we can add this to the cleanUpForRelease script.
> 
> Cheers
> -- 
> Miguel Cobá
> http://miguel.leugim.com.mx
> 
> From: commits at source.squeak.org
> Date: February 26, 2010 6:38:01 PM GMT+01:00
> To: squeak-dev at lists.squeakfoundation.org, packages at lists.squeakfoundation.org
> Subject: [squeak-dev] The Trunk: Kernel-ar.411.mcz
> Reply-To: squeak-dev at lists.squeakfoundation.org
> 
> 
> Andreas Raab uploaded a new version of Kernel to project The Trunk:
> http://source.squeak.org/trunk/Kernel-ar.411.mcz
> 
> ==================== Summary ====================
> 
> Name: Kernel-ar.411
> Author: ar
> Time: 26 February 2010, 7:36:40.257 pm
> UUID: b69a28db-8475-bc4b-89ed-285ccf3841cd
> Ancestors: Kernel-ul.410
> 
> Add MethodDictionary class>>compactAllInstances to save space in releases. Compacting all MDs in my images saves 600k in image size which isn't bad at all.
> 
> =============== Diff against Kernel-ul.410 ===============
> 
> Item was added:
> + ----- Method: MethodDictionary class>>compactAllInstances (in category 'initialization') -----
> + compactAllInstances	"MethodDictionary compactAllInstances"
> + 	"Compacts all MethodDictionaries to save space"
> + 
> + 	| oldInstances newInstances |
> + 	oldInstances := self allInstances.
> + 	newInstances := oldInstances collect:[:md|
> + 		(self new: md size) 
> + 			compactCopyFrom: md;
> + 			yourself].
> + 	oldInstances elementsForwardIdentityTo: newInstances.
> + !
> 
> Item was added:
> + ----- Method: MethodDictionary>>compactCopyFrom: (in category 'private') -----
> + compactCopyFrom: sourceMD
> + 	"Copy the contents of source dictionary without growing"
> + 
> + 	sourceMD keysAndValuesDo:[:key :value| | index |
> + 		index := self scanFor: key.
> + 		(self basicAt: index) ifNotNil:[self error: 'Something is horribly broken'].
> + 		self basicAt: index put: key.
> + 		array at: index put: value.
> + 		tally := tally + 1.
> + 	].
> + 	self size = self capacity ifTrue:[self grow]. "grow only if we reach capacity"
> + !
> 
> 
> 
> 
> _______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project





More information about the Pharo-dev mailing list