[squeak-dev] The Trunk: Kernel-eem.708.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jul 24 22:29:19 UTC 2012


Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.708.mcz

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

Name: Kernel-eem.708
Author: eem
Time: 24 July 2012, 3:28:27.644 pm
UUID: 8d0ba08e-9374-4d98-8f6e-93d5fd9fbea2
Ancestors: Kernel-bf.707

Fix CompiledMethod>equivalentTo:.  Old implementation
assumed RB parse trees which are comparable.

=============== Diff against Kernel-bf.707 ===============

Item was changed:
  ----- Method: CompiledMethod>>equivalentTo: (in category 'comparing') -----
+ equivalentTo: aCompiledMethod
+ 	| parseTree |
+ 	^self = aCompiledMethod
+ 	or: [self class == aCompiledMethod class
+ 		and: [self numArgs = aCompiledMethod numArgs
+ 		and: [self numLiterals = aCompiledMethod numLiterals
+ 		and: [parseTree := self decompile.
+ 			(parseTree isKindOf: MethodNode)
+ 				ifTrue: [parseTree asString = aCompiledMethod decompile asString "Standard compiler"]
+ 				ifFalse: [parseTree = aCompiledMethod decompile "RB parse trees, we hope"]]]]]!
- equivalentTo: aCompiledMethod 
- 	"does not work yet with non-RB parseTrees"
- 	^ self = aCompiledMethod
- 		or: [self class == aCompiledMethod class
- 				and: [self numArgs == aCompiledMethod numArgs
- 						and: [self decompile = aCompiledMethod decompile]]].!



More information about the Squeak-dev mailing list