[squeak-dev] The Trunk: Morphic-ul.744.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Sep 26 15:11:56 UTC 2014
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]!
More information about the Squeak-dev
mailing list
|