[squeak-dev] The Trunk: Collections-mt.841.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jul 12 07:56:28 UTC 2019

Marcel Taeumel uploaded a new version of Collections to project The Trunk:

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

Name: Collections-mt.841
Author: mt
Time: 12 July 2019, 9:56:25.049568 am
UUID: 2d41256f-bbb4-f54d-9d84-87c482bfa9dd
Ancestors: Collections-mt.840

Refactoring of #literalsDo: - Step 1 of 3. 

For more information, see http://forum.world.st/Please-Review-Refactoring-for-literalsDo-etc-tp5099756p5100896.html.

=============== Diff against Collections-mt.840 ===============

Item was added:
+ ----- Method: Array>>allLiteralsDo: (in category 'literals') -----
+ allLiteralsDo: aBlock
+ 	"I am a literal."
+ 	aBlock value: self.
+ 	"All my elements are literals."
+ 	self do: [:each | each allLiteralsDo: aBlock].!

Item was added:
+ ----- Method: Association>>allLiteralsDo: (in category 'literals') -----
+ allLiteralsDo: aBlock
+ 	"This strategy origins from a former implementation of CompiledMethod >> #hasLiteralThorough: as well as AdditionalMethodState >> #hasLiteralSuchThat:."
+ 	"I am a literal."
+ 	aBlock value: self.
+ 	"All my components are literals."
+ 	self key allLiteralsDo: aBlock.
+ 	self value allLiteralsDo: aBlock.!

Item was changed:
+ ----- Method: Association>>literalEqual: (in category 'literals') -----
- ----- Method: Association>>literalEqual: (in category 'testing') -----
  literalEqual: otherLiteral
  	"Answer true if the receiver and otherLiteral represent the same literal.
  	Variable bindings are literally equals only if identical.
  	This is how variable sharing works, by preserving identity and changing only the value."
  	^self == otherLiteral!

More information about the Squeak-dev mailing list