[squeak-dev] The Trunk: Monticello-dtl.674.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Dec 28 04:59:40 UTC 2017


David T. Lewis uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-dtl.674.mcz

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

Name: Monticello-dtl.674
Author: dtl
Time: 27 December 2017, 11:59:29.776456 pm
UUID: c87618b4-007b-4e92-8f2a-60df81d148e8
Ancestors: Monticello-eem.673

When reading MCClassDefinition from a saved version, ensure that the special case of type #compiledMethod is handled for CompiledCode and subclasses.

=============== Diff against Monticello-eem.673 ===============

Item was changed:
  ----- Method: MCStReader>>classDefinitionFrom: (in category 'as yet unclassified') -----
  classDefinitionFrom: aPseudoClass
+ 	| tokens traitCompositionString lastIndex classTraitCompositionString typeOfSubclass className |
- 	| tokens traitCompositionString lastIndex classTraitCompositionString |
  	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 := '{}'].
  	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
- 		name: (tokens at: 3)
  		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
- 		type: (self typeOfSubclass: (tokens at: 2))
  		comment: (self commentFor: aPseudoClass)
  		commentStamp: (self commentStampFor: aPseudoClass)!

Item was added:
+ ----- Method: MCStReader>>compiledCodeClassNames (in category 'as yet unclassified') -----
+ compiledCodeClassNames
+ 	"Answer the names of classes for which the type is #compiledMethod. Traditionally,
+ 	this was only class CompiledMehod, but later refactorings require that CompiledCode
+ 	and its subclasses be treated as type #compiledMethod."
+ 
+ 	^{ #CompiledCode . #CompiledBlock . #CompiledMethod }!



More information about the Squeak-dev mailing list