[squeak-dev] The Trunk: System-ul.613.mcz

Frank Shearar frank.shearar at gmail.com
Sat Nov 2 13:22:31 UTC 2013


On 2 November 2013 12:54,  <commits at source.squeak.org> wrote:
> Levente Uzonyi uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-ul.613.mcz
>
> ==================== Summary ====================
>
> Name: System-ul.613
> Author: ul
> Time: 2 November 2013, 1:47:09.671 pm
> UUID: de29e18c-22f5-4299-823a-e6b207c3f552
> Ancestors: System-cmm.612
>
> - fix: SystemNavigation >> #allBehaviorsDo: shouldn't enumerate Trait more than once.
>
> =============== Diff against System-cmm.612 ===============
>
> 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."
>
>         self environment allClassesAndTraitsDo: [ :class |
> +               aBlock value: class.
> +               class isTrait ifFalse: [ "class of a Trait is Trait, there are no MetaTraits"
> +                       aBlock value: class class ] ]!
> -               aBlock
> -                       value: class;
> -                       value: class class ]!

Thanks, Levente. I don't understand why that fixes the problem though.
Er, unless it's that when you walk over the TFoos, you also walk (and
walk and walk again) over Trait?

frank


More information about the Squeak-dev mailing list