[Pkg] The Trunk: Kernel-nice.378.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jan 16 17:35:45 UTC 2010

Nicolas Cellier uploaded a new version of Kernel to project The Trunk:

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

Name: Kernel-nice.378
Author: nice
Time: 16 January 2010, 6:35:14.553 pm
UUID: f26ee484-db82-4298-9c58-02504061ec96
Ancestors: Kernel-nice.377

Fix so that (Float class>>#nan) = (Float class>>#nan)

=============== Diff against Kernel-nice.377 ===============

Item was changed:
  ----- Method: CompiledMethod>>= (in category 'comparing') -----
  = method
  	| numLits |
  	"Answer whether the receiver implements the same code as the 
  	argument, method."
  	(method isKindOf: CompiledMethod) ifFalse: [^false].
  	self size = method size ifFalse: [^false].
  	self header = method header ifFalse: [^false].
  	self initialPC to: self endPC do:
  		[:i | (self at: i) = (method at: i) ifFalse: [^false]].
  	(numLits := self numLiterals) ~= method numLiterals ifTrue: [^false].
  	"``Dont bother checking FFI and named primitives''
  	 (#(117 120) includes: self primitive) ifTrue: [^ true]."
  	1 to: numLits do:
  		[:i| | lit1 lit2 |
  		lit1 := self literalAt: i.
  		lit2 := method literalAt: i.
+ 		(lit1 == lit2 or: [lit1 = lit2]) ifFalse:
- 		lit1 = lit2 ifFalse:
  			[(i = 1 and: [#(117 120) includes: self primitive])
  				ifTrue: [lit1 isArray
  								[(lit2 isArray and: [lit1 allButLast = lit2 allButLast]) ifFalse:
  							ifFalse: "ExternalLibraryFunction"
  								[(lit1 analogousCodeTo: lit2) ifFalse:
  									[^false]]] ifFalse:
  			[i = (numLits - 1) ifTrue: "properties"
  				[(self properties analogousCodeTo: method properties) ifFalse:
  					[^false]] ifFalse:
  			 [lit1 isFloat
  					["Floats match if values are close, due to roundoff error."
  					(lit1 closeTo: lit2) ifFalse: [^false]. self flag: 'just checking'. self halt]
  					["any other discrepancy is a failure"
  					^ false]]]]].

More information about the Packages mailing list