[Pkg] The Trunk: System-ar.206.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Dec 28 00:41:27 UTC 2009

Andreas Raab uploaded a new version of System to project The Trunk:

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

Name: System-ar.206
Author: ar
Time: 28 December 2009, 1:39:55 am
UUID: ae1a4168-4967-0c4b-90cb-d15f8d045a23
Ancestors: System-dtl.205

Preparations for NanoTraits: Make sure traits are treated like superclasses when filing out class categories; Smalltalk>>traitNames uses #isTrait instead of isKindOf: Trait and SystemNavigation>>allBehaviorsDo: delegates to ClassDescription to vector through the current traits implementation.

=============== Diff against System-dtl.205 ===============

Item was changed:
  ----- Method: SystemDictionary>>traitNames (in category 'class and trait names') -----
  	"Answer a SortedCollection of all traits (not including class-traits) names."
  	| names |
  	names := OrderedCollection new.
  	self do: 
  		[:cl | (cl isInMemory
+ 			and: [(cl isTrait)
- 			and: [(cl isKindOf: Trait)
  			and: [(cl name beginsWith: 'AnObsolete') not]])
  				ifTrue: [names add: cl name]].
  	^ names!

Item was changed:
  ----- Method: SystemNavigation>>allBehaviorsDo: (in category 'query') -----
  allBehaviorsDo: aBlock 
  	"Evaluate the argument, aBlock, for each kind of Behavior in the system 
  	(that is, Object and its subclasses and Traits).
  	ar 7/15/1999: The code below will not enumerate any obsolete or anonymous
  	behaviors for which the following should be executed:
  		Smalltalk allObjectsDo:[:obj| obj isBehavior ifTrue:[aBlock value: obj]].
  	but what follows is way faster than enumerating all objects."
  	aBlock value: ProtoObject.
  	ProtoObject allSubclassesDoGently: aBlock.		"don't bring in ImageSegments"
  	"Classes outside the ProtoObject hierarchy"
  	Class subclassesDo: [:aClass |
  		(aClass == ProtoObject class
  			or: [aClass isInMemory not
  			or: [aClass isMeta not]]) ifFalse:
  			["Enumerate the non-meta class and its subclasses"
  			aBlock value: aClass soleInstance.
  			aClass soleInstance allSubclassesDoGently: aBlock]].
+ 	ClassDescription allTraitsDo:[:trait | aBlock value: trait].!
- 	Trait allInstances , ClassTrait allInstances do: [:trait |
- 		aBlock value: trait]!

Item was changed:
  ----- Method: ChangeSet class>>doWeFileOut:given:cache: (in category 'fileIn/Out') -----
  doWeFileOut: aClass given: aSet cache: cache
  	| aClassAllSuperclasses aClassSoleInstanceAllSuperclasses |
+ 	aClassAllSuperclasses := cache at: aClass ifAbsentPut:[
+ 		aClass allSuperclasses asArray, aClass allTraits.
+ 	].
- 	aClassAllSuperclasses := cache at: aClass
- 		ifAbsent: [cache at: aClass put: aClass allSuperclasses asArray].
  	(aSet includesAnyOf: aClassAllSuperclasses) ifTrue: [^false].
  	aClass isMeta ifFalse: [^true].
  	(aSet includes: aClass soleInstance) ifTrue: [^false].
  	aClassSoleInstanceAllSuperclasses := cache at: aClass soleInstance
+ 		ifAbsentPut: [aClass soleInstance allSuperclasses asArray, aClass soleInstance allTraits].
- 		ifAbsent: [cache at: aClass soleInstance put: aClass soleInstance allSuperclasses asArray].
  	(aSet includesAnyOf: aClassSoleInstanceAllSuperclasses) ifTrue: [^false].

More information about the Packages mailing list