[squeak-dev] The Trunk: System-dtl.965.mcz

H. Hirzel hannes.hirzel at gmail.com
Sat Oct 14 09:36:11 UTC 2017


I see it is a help to understand the code.

Alternatively the comment of class SmartRefStream could be improved to
explain these 'weird' looking method names such as

     #multiNewParagraphttfclpomsswfpp0

On 10/14/17, Tobias Pape <Das.Linux at gmx.de> wrote:
>
>> On 14.10.2017, at 05:38, commits at source.squeak.org wrote:
>>
>> David T. Lewis uploaded a new version of System to project The Trunk:
>> http://source.squeak.org/trunk/System-dtl.965.mcz
>>
>> ==================== Summary ====================
>>
>> Name: System-dtl.965
>> Author: dtl
>> Time: 13 October 2017, 11:38:38.184812 pm
>> UUID: 710f2f23-7e87-4fbf-9a16-9b6df253f5bd
>> Ancestors: System-tpr.964
>>
>> Add flag to identify sender of composed selector
>> #multiNewParagraphttfclpomsswfpp0
>
> Just curious, why?
>
>>
>> =============== Diff against System-tpr.964 ===============
>>
>> 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 sel nm |
>>
>>  	self flag: #bobconv.	
>>
>>
>>  	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"
>> + 	self flag: #multiNewParagraphttfclpomsswfpp0. "identify senders of
>> multiNewParagraphttfclpomsswfpp0"
>>  	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
>>  !
>>
>>
>
>
>


More information about the Squeak-dev mailing list