[squeak-dev] The Trunk: System-bf.411.mcz
Levente Uzonyi
leves at elte.hu
Tue Jan 11 14:46:40 UTC 2011
On Tue, 11 Jan 2011, commits at source.squeak.org wrote:
> Bert Freudenberg uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-bf.411.mcz
>
> ==================== Summary ====================
>
> Name: System-bf.411
> Author: bf
> Time: 11 January 2011, 3:08:35.095 pm
> UUID: 64b24272-ea53-45f6-878c-d147e8115fe5
> Ancestors: System-cmm.410
>
> Make SystemDictionary>>classAndTraitNames work if there are no traits (such as after unloadAllKnownPackages).
Nice find.
Levente
>
> =============== Diff against System-cmm.410 ===============
>
> Item was changed:
> ----- Method: SystemDictionary>>classAndTraitNames (in category 'classes and traits') -----
> classAndTraitNames
> "Answer a sorted collection of all class and trait (not including class-traits) names. The performance of this algorithm is O(n) if the classNames are already cached, otherwise O(n*log(n)) where n is self size."
>
> | classNames traitNames result temporary |
> classNames := self classNames.
> traitNames := self traitNames.
> + traitNames ifEmpty: [^classNames].
> temporary := Array new: classNames size + traitNames size.
> result := temporary shallowCopy.
> temporary
> replaceFrom: 1
> to: classNames size
> with: classNames
> startingAt: 1;
> replaceFrom: classNames size + 1
> to: temporary size
> with: traitNames
> startingAt: 1;
> mergeFirst: 1
> middle: classNames size
> last: temporary size
> into: result
> by: nil.
> ^result!
>
>
>
More information about the Squeak-dev
mailing list
|