[squeak-dev] The Trunk: Installer-Core-nice.92.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Dec 27 19:54:59 UTC 2009

Nicolas Cellier uploaded a new version of Installer-Core to project The Trunk:

==================== Summary ====================

Name: Installer-Core-nice.92
Author: nice
Time: 27 December 2009, 8:54:47 am
UUID: 8b0c6ca0-63ee-4725-825e-bc3a82a14784
Ancestors: Installer-Core-ul.91

Cosmetic: move or remove a few temps inside closures

=============== Diff against Installer-Core-ul.91 ===============

Item was changed:
  ----- Method: Installer>>newChangeSetFromStream:named: (in category 'mantis') -----
  newChangeSetFromStream: aStream named: aName 
  	"This code is based upon ChangeSet-c-#newChangesFromStream:named: which is in 3.9,
  	implemented here for previous versions. The second branch is for 3.8, where ChangeSets
  	are loaded by ChangeSorter. "
+ 	| oldChanges newName newSet |
- 	| oldChanges newName newSet newStream |
  	(self classChangeSet respondsTo: #newChangesFromStream:named:) 
  		ifTrue: [ ^self classChangeSet newChangesFromStream: aStream named:aName ].
  	(self classChangeSorter respondsTo: #newChangesFromStream:named:)
  		ifTrue: [ ^self classChangeSorter newChangesFromStream: aStream named: aName ].
  	oldChanges := ChangeSet current.
  	"so a Bumper update can find it"
  	newName := aName sansPeriodSuffix.
  	newSet := self classChangeSet basicNewNamed: newName.
+ 	[ | newStream |
+ 	newSet
- 	[newSet
  		ifNotNil: [(aStream respondsTo: #converter:)
  				ifTrue: [newStream := aStream]
  				ifFalse: [newStream := self classMultiByteBinaryOrTextStream with: aStream contentsOfEntireFile.
  					newStream reset].
  			self classChangeSet newChanges: newSet.
  			newStream setConverterForCode.
  			newStream fileInAnnouncing: 'Loading ' , newName , '...'.
  			Transcript cr; show: 'File ' , aName , ' successfully filed in to change set ' , newName].
  	aStream close]
  		ensure: [self classChangeSet newChanges: oldChanges].
  	^ newSet!

More information about the Squeak-dev mailing list