Nicolas Cellier uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-nice.742.mcz==================== Summary ====================
Name: Monticello-nice.742
Author: nice
Time: 13 April 2021, 2:59:20.188121 am
UUID: b83bdaba-8e8c-4c01-984a-f5ea46f50529
Ancestors: Monticello-nice.741
Revert Monticello-jr.726 because the proper patch of match: have been integrated already.
=============== Diff against Monticello-nice.741 ===============
Item was changed:
----- Method: MCStReader>>classDefinitionFrom: (in category 'converting') -----
classDefinitionFrom: aPseudoClass
+ | tokens traitCompositionString lastIndex classTraitCompositionString typeOfSubclass className |
- | tokens definitionStream hasTraitComposition traitCompositionString lastIndex hasClassTraitComposition classTraitCompositionString typeOfSubclass className |
tokens := Scanner new scanTokens: aPseudoClass definition.
+ traitCompositionString := ((ReadStream on: aPseudoClass definition)
+ match: 'uses:';
+ upToAll: 'instanceVariableNames:') withBlanksTrimmed.
+ classTraitCompositionString := ((ReadStream on: aPseudoClass metaClass definition asString)
+ match: 'uses:';
+ upToAll: 'instanceVariableNames:') withBlanksTrimmed.
+ traitCompositionString isEmpty ifTrue: [traitCompositionString := '{}'].
+ classTraitCompositionString isEmpty ifTrue: [classTraitCompositionString := '{}'].
- definitionStream := ReadStream on: aPseudoClass definition.
- hasTraitComposition := definitionStream match: 'uses:'.
- traitCompositionString := hasTraitComposition ifTrue: [(definitionStream upToAll: 'instanceVariableNames:') withBlanksTrimmed] ifFalse: ['{}'].
- definitionStream := ReadStream on: aPseudoClass metaClass definition asString.
- hasClassTraitComposition := definitionStream match: 'uses:'.
- classTraitCompositionString := hasClassTraitComposition ifTrue: [(definitionStream upToAll: 'instanceVariableNames:') withBlanksTrimmed] ifFalse: ['{}'].
lastIndex := tokens size.
className := tokens at: 3.
typeOfSubclass := self typeOfSubclass: (tokens at: 2).
"Compiled code classes are special cases of the #bytes class type"
(#bytes == typeOfSubclass and: [self compiledCodeClassNames includes: className])
ifTrue: [typeOfSubclass := #compiledMethod].
^ MCClassDefinition
name: className
superclassName: (tokens at: 1)
traitComposition: traitCompositionString
classTraitComposition: classTraitCompositionString
category: (tokens at: lastIndex)
instVarNames: ((tokens at: lastIndex - 6) findTokens: ' ')
classVarNames: ((tokens at: lastIndex - 4) findTokens: ' ')
poolDictionaryNames: ((tokens at: lastIndex - 2) findTokens: ' ')
classInstVarNames: (self classInstVarNamesFor: aPseudoClass)
type: typeOfSubclass
comment: (self commentFor: aPseudoClass)
commentStamp: (self commentStampFor: aPseudoClass)!