[squeak-dev] The Trunk: Collections-topa.764.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun Oct 15 20:42:02 UTC 2017


2017-10-14 13:28 GMT+02:00 <commits at source.squeak.org>:

> Tobias Pape uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-topa.764.mcz
>
> ==================== Summary ====================
>
> Name: Collections-topa.764
> Author: topa
> Time: 14 October 2017, 1:30:58.746815 pm
> UUID: 8b1c780c-c4fb-4a8c-baac-050c5a3e67c2
> Ancestors: Collections-pre.763
>
> Improve #initializedInstance and #empty for certain collections
>
> =============== Diff against Collections-pre.763 ===============
>
> Item was added:
> + ----- Method: Bitset class>>initializedInstance (in category 'instance
> creation') -----
> + initializedInstance
> +
> +       ^ self new: 0!
>
> Item was added:
> + ----- Method: ByteArray class>>empty (in category 'instance creation')
> -----
> + empty
> +       "A canonicalized empty ByteArray instance."
> +       ^ #[]!
>
> Item was added:
> + ----- Method: NonPointersOrderedCollection class>>initializedInstance
> (in category 'instance creation') -----
> + initializedInstance
> +       " There are no instances of me, just my subclasses "
> +       ^ self ~~ NonPointersOrderedCollection ifTrue: [super
> initializedInstance]
>

Hi Tobias,
if there is no instances, shouldn't the message fail?

+       !
>
> Item was added:
> + ----- Method: Symbol class>>empty (in category 'instance creation') -----
> + empty
> +       "A canonicalized empty symbol."
> +       ^ #''!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171015/e7341571/attachment.html>


More information about the Squeak-dev mailing list