[squeak-dev] The Trunk: Kernel-eem.1158.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Mar 10 01:15:57 UTC 2018


Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1158.mcz

==================== Summary ====================

Name: Kernel-eem.1158
Author: eem
Time: 9 March 2018, 5:15:51.802392 pm
UUID: 4bef21b3-d2da-4b76-a6e0-c9ee189d478a
Ancestors: Kernel-ul.1157

Provide more efficient implementation(s) of at:ifPresent:ifAbsent: given impending use in the Compiler.

=============== Diff against Kernel-ul.1157 ===============

Item was added:
+ ----- Method: MethodDictionary>>at:ifPresent:ifAbsent: (in category 'accessing') -----
+ at: key ifPresent: oneArgBlock ifAbsent: absentBlock
+ 	"Lookup the given key in the receiver. If it is present, answer the
+ 	 value of evaluating the oneArgBlock with the value associated
+ 	 with the key, otherwise answer the value of absentBlock."
+ 	^(array at: (self scanFor: key))
+ 		ifNil: [absentBlock value]
+ 		ifNotNil: [:method| oneArgBlock value: method]!



More information about the Squeak-dev mailing list