Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.387.mcz==================== Summary ====================
Name: Kernel-nice.387
Author: nice
Time: 4 February 2010, 8:50:09.339 pm
UUID: 233eca14-15af-4626-8386-a73b38f29367
Ancestors: Kernel-ar.386
1) avoid a useless block non local return
2) move a temp assignment outside block
=============== Diff against Kernel-ar.386 ===============
Item was changed:
----- Method: Semaphore>>critical:ifError: (in category 'mutual exclusion') -----
critical: mutuallyExcludedBlock ifError: errorBlock
"Evaluate mutuallyExcludedBlock only if the receiver is not currently in
the process of running the critical: message. If the receiver is, evaluate
mutuallyExcludedBlock after the other critical: message is finished."
| blockValue hasError errMsg errRcvr |
hasError := false.
+ blockValue := self critical:[
+ [mutuallyExcludedBlock value] ifError:[:msg :rcvr|
- self critical:[
- blockValue := [mutuallyExcludedBlock value] ifError:[:msg :rcvr|
hasError := true.
errMsg := msg.
errRcvr := rcvr
].
].
hasError ifTrue:[ ^errorBlock value: errMsg value: errRcvr].
^blockValue!
Item was changed:
----- Method: Object>>nameForViewer (in category 'testing') -----
nameForViewer
"Answer a name to be shown in a Viewer that is viewing the receiver"
| aName |
(aName := self uniqueNameForReferenceOrNil) ifNotNil: [^ aName].
(aName := self knownName) ifNotNil: [^ aName].
^ [(self asString copyWithout: Character cr) truncateTo: 27] ifError:
+ [:msg :rcvr | self class name printString]!
- [:msg :rcvr | ^ self class name printString]!