[Pkg] The Trunk: Collections-eem.446.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jul 19 16:49:05 UTC 2011


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

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

Name: Collections-eem.446
Author: eem
Time: 19 July 2011, 9:48:30.436 am
UUID: 7adb8007-2e80-415a-9d53-b145ba76dcce
Ancestors: Collections-ul.445

Fix Array>>hasLiteral: to not look for ==, but literal equal
(class == & value =).
Accompanies Kernel-ul.607

=============== Diff against Collections-ul.445 ===============

Item was changed:
  ----- Method: Array>>hasLiteral: (in category 'private') -----
  hasLiteral: literal
  	"Answer true if literal is identical to any literal in this array, even 
  	if imbedded in further array structure. This method is only intended 
  	for private use by CompiledMethod hasLiteralSymbol:"
  
+ 	| litClass lit |
+ 	litClass := literal class.
- 	| lit |
  	1 to: self size do: 
  		[:index | 
+ 		(litClass == (lit := self at: index) class
+ 		and: [literal = lit]) ifTrue: [^true].
+ 		(Array == lit class
+ 		 and: [lit hasLiteral: literal]) ifTrue: [^true]].
+ 	^false!
- 		(lit := self at: index) == literal ifTrue: [^ true].
- 		(lit class == Array and: [lit hasLiteral: literal]) ifTrue: [^ true]].
- 	^ false!



More information about the Packages mailing list