The Trunk: Kernel-eem.1158.mcz

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

The Trunk: Kernel-eem.1158.mcz

Eliot Miranda uploaded a new version of Kernel to project The Trunk:

==================== 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]!