<div dir="ltr"><div>So you rely on (nil value -> nil).<br></div>Will (is) the difference be still significant in Spur?<br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-26 17:11 GMT+02:00 <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Levente Uzonyi uploaded a new version of Morphic to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Morphic-ul.744.mcz" target="_blank">http://source.squeak.org/trunk/Morphic-ul.744.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Morphic-ul.744<br>
Author: ul<br>
Time: 22 September 2014, 7:45:55.442 pm<br>
UUID: 78178a2f-f249-4767-8429-f8236e1459bc<br>
Ancestors: Morphic-cmm.743<br>
<br>
- sped up #valueOfProperty:ifAbsent: and friends<br>
<br>
=============== Diff against Morphic-cmm.743 ===============<br>
<br>
Item was changed:<br>
----- Method: Morph>>valueOfProperty:ifAbsent: (in category 'accessing - properties') -----<br>
valueOfProperty: aSymbol ifAbsent: aBlock<br>
"if the receiver possesses a property of the given name, answer<br>
its value. If not then evaluate aBlock and answer the result of<br>
this block evaluation"<br>
+<br>
+ extension ifNil: [ ^aBlock value ].<br>
+ ^extension valueOfProperty: aSymbol ifAbsent: aBlock!<br>
- ^ extension<br>
- ifNotNil: [extension valueOfProperty: aSymbol ifAbsent: aBlock]<br>
- ifNil: [aBlock value]!<br>
<br>
Item was changed:<br>
----- Method: MorphExtension>>layoutFrame (in category 'accessing - layout properties') -----<br>
layoutFrame<br>
+ ^self valueOfProperty: #layoutFrame!<br>
- ^self valueOfProperty: #layoutFrame ifAbsent:[nil]!<br>
<br>
Item was changed:<br>
----- Method: MorphExtension>>layoutPolicy (in category 'accessing - layout properties') -----<br>
layoutPolicy<br>
+ ^self valueOfProperty: #layoutPolicy!<br>
- ^self valueOfProperty: #layoutPolicy ifAbsent:[nil]!<br>
<br>
Item was changed:<br>
----- Method: MorphExtension>>layoutProperties (in category 'accessing - layout properties') -----<br>
layoutProperties<br>
+ ^self valueOfProperty: #layoutProperties!<br>
- ^self valueOfProperty: #layoutProperties ifAbsent:[nil]!<br>
<br>
Item was changed:<br>
----- Method: MorphExtension>>valueOfProperty: (in category 'accessing - other properties') -----<br>
valueOfProperty: aSymbol<br>
"answer the value of the receiver's property named aSymbol"<br>
+<br>
+ ^otherProperties ifNotNil: [ otherProperties at: aSymbol ifAbsent: nil ]!<br>
- ^ self<br>
- valueOfProperty: aSymbol<br>
- ifAbsent: []!<br>
<br>
Item was changed:<br>
----- Method: MorphExtension>>valueOfProperty:ifAbsent: (in category 'accessing - other properties') -----<br>
valueOfProperty: aSymbol ifAbsent: aBlock<br>
"if the receiver possesses a property of the given name, answer<br>
its value. If not then evaluate aBlock and answer the result of<br>
this block evaluation"<br>
otherProperties ifNil: [^ aBlock value].<br>
+ ^otherProperties at: aSymbol ifAbsent: aBlock!<br>
- ^ otherProperties at: aSymbol ifAbsent: [^ aBlock value]!<br>
<br>
<br>
</blockquote></div><br></div>