[squeak-dev] The Trunk: Kernel-nice.1261.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Aug 28 21:01:03 UTC 2019


Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1261.mcz

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

Name: Kernel-nice.1261
Author: nice
Time: 28 August 2019, 11:00:52.985296 pm
UUID: b8758656-d1f0-49cd-976c-cbd7d772b1f3
Ancestors: Kernel-nice.1260

Oups, I forgot to fix Float negativeInfinity < 0 when arithmetic primitives are configured to refuse to convert a SmallInteger asFloat...

=============== Diff against Kernel-nice.1260 ===============

Item was changed:
  ----- Method: Number>>adaptToFloat:andCompare: (in category 'converting') -----
  adaptToFloat: rcvr andCompare: selector 
  	"If I am involved in comparison with a Float, convert rcvr to a
  	Fraction. This way, no bit is lost and comparison is exact."
  	
  	rcvr isFinite
  		ifFalse: [
  			selector == #= ifTrue: [^false].
  			selector == #~= ifTrue: [^true].
  			rcvr isNaN ifTrue: [^ false].
  			(selector = #< or: [selector = #'<='])
+ 				ifTrue: [^ rcvr < 0.0].
- 				ifTrue: [^ rcvr positive not].
  			(selector = #> or: [selector = #'>='])
+ 				ifTrue: [^ rcvr > 0.0].
- 				ifTrue: [^ rcvr >= 0.0].
  			^self error: 'unknow comparison selector'].
  
  	"Try to avoid asTrueFraction because it can cost"
  	self isAnExactFloat ifTrue: [^rcvr perform: selector with: self asExactFloat].
  	selector == #= ifTrue: [^false].
  	selector == #~= ifTrue: [^true].
  	^ rcvr asTrueFraction perform: selector with: self!

Item was removed:
- ----- Method: Object>>perform:with:with:with:with:with: (in category 'message handling') -----
- perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject
- 	"Send the selector, aSymbol, to the receiver with the given arguments.
- 	Fail if the number of arguments expected by the selector is not four.
- 	Primitive. Optional. See Object documentation whatIsAPrimitive."
- 
- 	<primitive: 83>
- 	^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject. fourthObject. fifthObject }!



More information about the Squeak-dev mailing list