--- a/Behavior.st Thu Mar 28 12:21:50 2013 +0000
+++ b/Behavior.st Mon Apr 01 13:42:45 2013 +0100
@@ -823,7 +823,7 @@
|remaining classesInLoadOrder|
"private classes are not loaded directly, so ignore them"
- remaining := someClasses asIdentitySet reject:[:eachClass| eachClass isPrivate].
+ remaining := someClasses select:[:eachClass| eachClass isPrivate not] as:IdentitySet.
"JV-2011-05-05: Sort the classes by name to get more stable order.
This stabilizes order of classes in generated build files and
makes text-based diffing/merging easier for both human beings
@@ -832,55 +832,55 @@
classesInLoadOrder := OrderedCollection new:(remaining size).
[remaining notEmpty] whileTrue:[
- |thoseWithOtherSuperclasses thoseWhichCanBeLoadedNow|
-
- "find the next class(es) to be loaded.
- Consider first:
- all those, which do not have a superclass in the remaining set.
- and which do not use a shared pool defined in the remaining set"
-
- thoseWithOtherSuperclasses :=
- remaining
- reject:[:eachClass |
- (remaining includes:eachClass superclass)
- or:[eachClass sharedPoolNames contains:[:eachPoolSymbol|
- remaining contains:[:eachRemainingClass| eachPoolSymbol = eachRemainingClass name]
- ]
- ].
- ].
-
- "second: the subset with all those having no private classes,
- or having private classes, whose superclasses are NOT in the remaining set"
-
- thoseWhichCanBeLoadedNow :=
- thoseWithOtherSuperclasses
- reject:[:eachClass |
- eachClass allPrivateClasses contains:[:eachPrivateClass| |superClassesOwner|
- superClassesOwner := eachPrivateClass superclass.
- "take care of classes inheriting from nil or ProtoObject"
- superClassesOwner isBehavior ifTrue:[
- superClassesOwner := superClassesOwner owningClassOrYourself.
- ].
- superClassesOwner ~~ eachClass
- and:[remaining includes:superClassesOwner]
- ].
- ].
-
- thoseWhichCanBeLoadedNow isEmpty ifTrue:[
- thoseWithOtherSuperclasses isEmpty ifTrue:[
- "this does not normally happen"
- self error:'superclass order is cyclic'.
- ] ifFalse:[
- "no class found, that may be loaded - maybe there is a cyclic
- dependency involving private classes.
- If you proceed here, private class dependencies are ignored
- for this pass"
- self error:'load order is cyclic (care for private classes)' mayProceed:true.
- thoseWhichCanBeLoadedNow := thoseWithOtherSuperclasses.
- ].
- ].
- remaining removeAllFoundIn:thoseWhichCanBeLoadedNow.
- classesInLoadOrder addAll:(thoseWhichCanBeLoadedNow asArray sort:[:a :b | a name < b name]).
+ |thoseWithOtherSuperclasses thoseWhichCanBeLoadedNow|
+
+ "find the next class(es) to be loaded.
+ Consider first:
+ all those, which do not have a superclass in the remaining set.
+ and which do not use a shared pool defined in the remaining set"
+
+ thoseWithOtherSuperclasses :=
+ remaining
+ reject:[:eachClass |
+ (remaining includes:eachClass superclass)
+ or:[eachClass sharedPoolNames contains:[:eachPoolSymbol|
+ remaining contains:[:eachRemainingClass| eachPoolSymbol = eachRemainingClass name]
+ ]
+ ].
+ ].
+
+ "second: the subset with all those having no private classes,
+ or having private classes, whose superclasses are NOT in the remaining set"
+
+ thoseWhichCanBeLoadedNow :=
+ thoseWithOtherSuperclasses
+ reject:[:eachClass |
+ eachClass allPrivateClasses contains:[:eachPrivateClass| |superClassesOwner|
+ superClassesOwner := eachPrivateClass superclass.
+ "take care of classes inheriting from nil or ProtoObject"
+ superClassesOwner isBehavior ifTrue:[
+ superClassesOwner := superClassesOwner owningClassOrYourself.
+ ].
+ superClassesOwner ~~ eachClass
+ and:[remaining includes:superClassesOwner]
+ ].
+ ].
+
+ thoseWhichCanBeLoadedNow isEmpty ifTrue:[
+ thoseWithOtherSuperclasses isEmpty ifTrue:[
+ "this does not normally happen"
+ self error:'superclass order is cyclic'.
+ ] ifFalse:[
+ "no class found, that may be loaded - maybe there is a cyclic
+ dependency involving private classes.
+ If you proceed here, private class dependencies are ignored
+ for this pass"
+ self error:'load order is cyclic (care for private classes)' mayProceed:true.
+ thoseWhichCanBeLoadedNow := thoseWithOtherSuperclasses.
+ ].
+ ].
+ remaining removeAllFoundIn:thoseWhichCanBeLoadedNow.
+ classesInLoadOrder addAll:(thoseWhichCanBeLoadedNow asArray sort:[:a :b | a name < b name]).
].
^ classesInLoadOrder
@@ -4892,10 +4892,10 @@
!Behavior class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.332 2013-03-26 17:04:47 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.333 2013-03-28 15:54:34 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.332 2013-03-26 17:04:47 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.333 2013-03-28 15:54:34 stefan Exp $'
! !