Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.447.mcz
==================== Summary ====================
Name: Collections-nice.447
Author: nice
Time: 20 July 2011, 9:22:39.538 am
UUID: d4b8e2f5-d54f-49a0-a8af-d31df8268adc
Ancestors: Collections-eem.446
Refine Association>>literalEqual: to correctly handle variable binding identity.
Use literalEqual: in hasLiteral:
Deprecate use of Array>>#hasLiteralThorough:
=============== Diff against Collections-eem.446 ===============
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:"
+ | lit |
- | litClass lit |
- litClass := literal class.
1 to: self size do:
[:index |
+ ((lit := self at: index) literalEqual: literal) ifTrue: [^true].
+ (Array == lit class and: [lit hasLiteral: literal]) ifTrue: [^true]].
- (litClass == (lit := self at: index) class
- and: [literal = lit]) ifTrue: [^true].
- (Array == lit class
- and: [lit hasLiteral: literal]) ifTrue: [^true]].
^false!
Item was changed:
----- Method: Array>>hasLiteralThorough: (in category 'private') -----
hasLiteralThorough: literal
"Answer true if literal is identical to any literal in this array, even if imbedded in further array structures or closure methods"
+ self deprecated: 'Never send #hasLiteralThorough: to an Array, just use #hasLiteral:'.
+ ^self hasLiteral: literal!
- | lit |
- 1 to: self size do: [:index |
- (lit := self at: index) == literal ifTrue: [^ true].
- (lit hasLiteralThorough: literal) ifTrue: [^ true]].
- ^ false!
Item was added:
+ ----- 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!
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.447.mcz
==================== Summary ====================
Name: Collections-nice.447
Author: nice
Time: 20 July 2011, 9:22:39.538 am
UUID: d4b8e2f5-d54f-49a0-a8af-d31df8268adc
Ancestors: Collections-eem.446
Refine Association>>literalEqual: to correctly handle variable binding identity.
Use literalEqual: in hasLiteral:
Deprecate use of Array>>#hasLiteralThorough:
=============== Diff against Collections-eem.446 ===============
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:"
+ | lit |
- | litClass lit |
- litClass := literal class.
1 to: self size do:
[:index |
+ ((lit := self at: index) literalEqual: literal) ifTrue: [^true].
+ (Array == lit class and: [lit hasLiteral: literal]) ifTrue: [^true]].
- (litClass == (lit := self at: index) class
- and: [literal = lit]) ifTrue: [^true].
- (Array == lit class
- and: [lit hasLiteral: literal]) ifTrue: [^true]].
^false!
Item was changed:
----- Method: Array>>hasLiteralThorough: (in category 'private') -----
hasLiteralThorough: literal
"Answer true if literal is identical to any literal in this array, even if imbedded in further array structures or closure methods"
+ self deprecated: 'Never send #hasLiteralThorough: to an Array, just use #hasLiteral:'.
+ ^self hasLiteral: literal!
- | lit |
- 1 to: self size do: [:index |
- (lit := self at: index) == literal ifTrue: [^ true].
- (lit hasLiteralThorough: literal) ifTrue: [^ true]].
- ^ false!
Item was added:
+ ----- 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!
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.447.mcz
==================== Summary ====================
Name: Collections-nice.447
Author: nice
Time: 20 July 2011, 9:22:39.538 am
UUID: d4b8e2f5-d54f-49a0-a8af-d31df8268adc
Ancestors: Collections-eem.446
Refine Association>>literalEqual: to correctly handle variable binding identity.
Use literalEqual: in hasLiteral:
Deprecate use of Array>>#hasLiteralThorough:
=============== Diff against Collections-eem.446 ===============
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:"
+ | lit |
- | litClass lit |
- litClass := literal class.
1 to: self size do:
[:index |
+ ((lit := self at: index) literalEqual: literal) ifTrue: [^true].
+ (Array == lit class and: [lit hasLiteral: literal]) ifTrue: [^true]].
- (litClass == (lit := self at: index) class
- and: [literal = lit]) ifTrue: [^true].
- (Array == lit class
- and: [lit hasLiteral: literal]) ifTrue: [^true]].
^false!
Item was changed:
----- Method: Array>>hasLiteralThorough: (in category 'private') -----
hasLiteralThorough: literal
"Answer true if literal is identical to any literal in this array, even if imbedded in further array structures or closure methods"
+ self deprecated: 'Never send #hasLiteralThorough: to an Array, just use #hasLiteral:'.
+ ^self hasLiteral: literal!
- | lit |
- 1 to: self size do: [:index |
- (lit := self at: index) == literal ifTrue: [^ true].
- (lit hasLiteralThorough: literal) ifTrue: [^ true]].
- ^ false!
Item was added:
+ ----- 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!
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!
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!
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!