[squeak-dev] The Inbox: System-hjh.962.mcz

Bob Arning arning315 at comcast.net
Mon Oct 9 21:32:03 UTC 2017


FWIW, I'm pretty sure the variable 'reshaped' is obsolete. It's 
referenced in one other place and never really used.


On 10/9/17 8:07 PM, commits at source.squeak.org wrote:
> A new version of System was added to project The Inbox:
> http://source.squeak.org/inbox/System-hjh.962.mcz
>
> ==================== Summary ====================
>
> Name: System-hjh.962
> Author: hjh
> Time: 9 October 2017, 10:07:09.966808 pm
> UUID: 5ebbcac7-a3c3-4c48-9ddc-c669d0498b53
> Ancestors: System-dtl.961
>
> Update  comment so that the 'finger print'
>
>       #layoutMorphbosfcepcbbochvimol0
>
> refers to an exiting method in method category
>
>      '*Morphic-conversion'
>
> Reformatted code and renamed
>      sel
> to
>      selector
>
> =============== Diff against System-dtl.961 ===============
>
> Item was changed:
>    ----- Method: SmartRefStream>>mapClass: (in category 'read write') -----
> + mapClass: incoming
> + 	"See if the old class named nm exists. If so, return it. If not, map it to a
> + 	new class, and save the mapping in renamed. "
> + 	
> + 	| cls oldVer selector nm |
> + 	
> + 	self flag: #bobconv.
> + 	nm := renamed
> + 				at: incoming
> + 				ifAbsent: [incoming].
> - mapClass: incoming
> - 	"See if the old class named nm exists.  If so, return it.  If not, map it to a new class, and save the mapping in renamed.  "
>    
> + 	"allow pre-mapping around collisions"
> + 	(nm endsWith: ' class')
> + 		ifTrue: [cls := Smalltalk
> + 						at: nm substrings first asSymbol
> + 						ifAbsent: [].
> + 			cls
> + 				ifNotNil: [^ cls class]]
> + 		ifFalse: [cls := Smalltalk
> + 						at: nm
> + 						ifAbsent: [].
> + 			cls
> + 				ifNotNil: [^ cls]
> + 			"Known class. It will know how to translate the instance."].
> - 	| cls oldVer sel nm |
>    
> + 	"Known class. It will know how to translate the instance."
> + 	oldVer := self
> + 				versionSymbol: (structures at: nm).
> + 	selector := nm asString.
> + 	selector at: 1 put: (selector at: 1) asLowercase.
> + 	selector := selector , oldVer.
> + 	"i.e. #layoutMorphbosfcepcbbochvimol0"
> - 	self flag: #bobconv.	
>    
> + 	Symbol
> + 		hasInterned: selector
> + 		ifTrue: [:symb | (self class canUnderstand: selector asSymbol)
> + 				ifTrue: [reshaped
> + 						ifNil: [reshaped := Dictionary new].
> + 					cls := self perform: selector asSymbol]].
>    
> + 	"This class will take responsibility"
> + 	cls
> + 		ifNil: [cls := self
> + 						writeClassRenameMethod: selector
> + 						was: nm
> + 						fromInstVars: (structures at: nm).
> + 			cls isString
> + 				ifTrue: [cls := nil]].
> + 	cls
> + 		ifNotNil: [renamed at: nm put: cls name].
> + 	^ cls!
> - 	nm := renamed at: incoming ifAbsent: [incoming].	"allow pre-mapping around collisions"
> - 	(nm endsWith: ' class')
> - 		ifFalse: [cls := Smalltalk at: nm ifAbsent: [nil].
> - 			cls ifNotNil: [^ cls]]  	"Known class.  It will know how to translate the instance."
> - 		ifTrue: [cls := Smalltalk at: nm substrings first asSymbol ifAbsent: [nil].
> - 			cls ifNotNil: [^ cls class]]. 	"Known class.  It will know how to translate the instance."
> - 	oldVer := self versionSymbol: (structures at: nm).
> - 	sel := nm asString.
> - 	sel at: 1 put: (sel at: 1) asLowercase.
> - 	sel := sel, oldVer.	"i.e. #rectangleoc4"
> - 	Symbol hasInterned: sel ifTrue: [:symb |
> - 		(self class canUnderstand: sel asSymbol) ifTrue: [
> - 			reshaped ifNil: [reshaped := Dictionary new].
> - 			cls := self perform: sel asSymbol]].	"This class will take responsibility"
> - 	cls ifNil: [cls := self writeClassRenameMethod: sel was: nm
> - 					fromInstVars: (structures at: nm).
> - 			   cls isString ifTrue: [cls := nil]].
> - 	cls ifNotNil: [renamed at: nm put: cls name].
> - 	^ cls
> - !
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171009/2e879aa2/attachment.html>


More information about the Squeak-dev mailing list