[squeak-dev] The Trunk: Morphic-ul.744.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri Sep 26 16:34:03 UTC 2014


So you rely on (nil value -> nil).
Will (is) the difference be still significant in Spur?

2014-09-26 17:11 GMT+02:00 <commits at source.squeak.org>:

> Levente Uzonyi uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-ul.744.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-ul.744
> Author: ul
> Time: 22 September 2014, 7:45:55.442 pm
> UUID: 78178a2f-f249-4767-8429-f8236e1459bc
> Ancestors: Morphic-cmm.743
>
> - sped up #valueOfProperty:ifAbsent: and friends
>
> =============== Diff against Morphic-cmm.743 ===============
>
> Item was changed:
>   ----- Method: Morph>>valueOfProperty:ifAbsent: (in category 'accessing -
> properties') -----
>   valueOfProperty: aSymbol ifAbsent: aBlock
>         "if the receiver possesses a property of the given name, answer
>         its value. If not then evaluate aBlock and answer the result of
>         this block evaluation"
> +
> +       extension ifNil: [ ^aBlock value ].
> +       ^extension      valueOfProperty: aSymbol ifAbsent: aBlock!
> -       ^ extension
> -               ifNotNil: [extension valueOfProperty: aSymbol ifAbsent:
> aBlock]
> -               ifNil: [aBlock value]!
>
> Item was changed:
>   ----- Method: MorphExtension>>layoutFrame (in category 'accessing -
> layout properties') -----
>   layoutFrame
> +       ^self valueOfProperty: #layoutFrame!
> -       ^self valueOfProperty: #layoutFrame ifAbsent:[nil]!
>
> Item was changed:
>   ----- Method: MorphExtension>>layoutPolicy (in category 'accessing -
> layout properties') -----
>   layoutPolicy
> +       ^self valueOfProperty: #layoutPolicy!
> -       ^self valueOfProperty: #layoutPolicy ifAbsent:[nil]!
>
> Item was changed:
>   ----- Method: MorphExtension>>layoutProperties (in category 'accessing -
> layout properties') -----
>   layoutProperties
> +       ^self valueOfProperty: #layoutProperties!
> -       ^self valueOfProperty: #layoutProperties ifAbsent:[nil]!
>
> Item was changed:
>   ----- Method: MorphExtension>>valueOfProperty: (in category 'accessing -
> other properties') -----
>   valueOfProperty: aSymbol
>   "answer the value of the receiver's property named aSymbol"
> +
> +       ^otherProperties ifNotNil: [ otherProperties at: aSymbol ifAbsent:
> nil ]!
> -       ^ self
> -               valueOfProperty: aSymbol
> -               ifAbsent: []!
>
> Item was changed:
>   ----- Method: MorphExtension>>valueOfProperty:ifAbsent: (in category
> 'accessing - other properties') -----
>   valueOfProperty: aSymbol ifAbsent: aBlock
>         "if the receiver possesses a property of the given name, answer
>         its value. If not then evaluate aBlock and answer the result of
>         this block evaluation"
>         otherProperties ifNil: [^ aBlock value].
> +       ^otherProperties at: aSymbol ifAbsent: aBlock!
> -       ^ otherProperties at: aSymbol ifAbsent: [^ aBlock value]!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140926/ebd50028/attachment.htm


More information about the Squeak-dev mailing list