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

commits at source.squeak.org commits at source.squeak.org
Mon Mar 22 21:52:16 UTC 2010


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

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

Name: Kernel-nice.431
Author: nice
Time: 22 March 2010, 10:51:37.603 pm
UUID: 87f9485f-8b62-6740-93b3-e25f1710420b
Ancestors: Kernel-nice.430

Use literalEqual: rather than = to test for compiled code equality.
We don't want 256000.0s1 = 256000.0e0 nor = 256000

=============== Diff against Kernel-nice.430 ===============

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 literalEqual: lit2]) ifFalse:
- 		(lit1 == lit2 or: [lit1 = lit2]) ifFalse:
  			[(i = 1 and: [#(117 120) includes: self primitive])
  				ifTrue:
  					[lit1 isArray
  						ifTrue:
  							[(lit2 isArray and: [lit1 allButLast = lit2 allButLast])
  								ifFalse: [^false]]
  						ifFalse: "ExternalLibraryFunction"
  							[(lit1 analogousCodeTo: lit2)
  								ifFalse: [^false]]]
  				ifFalse:
  					[i = (numLits - 1)
  						ifTrue: "properties"
  							[(self properties analogousCodeTo: method properties)
  								ifFalse: [^false]]
  						ifFalse: [^false]]]].
  	^true!




More information about the Squeak-dev mailing list