help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-Smalltalk] Message>>#= and DirectedMessage>>#=


From: Paolo Bonzini
Subject: Re: [Help-Smalltalk] Message>>#= and DirectedMessage>>#=
Date: Tue, 12 Oct 2010 16:25:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3

On 10/12/2010 11:53 AM, Gwenaël Casaccio wrote:
On Tue, Oct 12, 2010 at 11:42 AM, Paolo Bonzini<address@hidden>  wrote:
On 10/12/2010 11:02 AM, Gwenaël Casaccio wrote:

Message extend [
     = anObject [
         <category: 'testing'>

         ^ self class == anObject class and: [ self selector = anObject
selector and: [ self arguments = anObject arguments ] ]
     ]

     hash [
         <category: 'basic'>

         ^ (super hash bitXor: self selector hash) bitXor: self arguments hash
     ]

]

DirectedMessage extend [
     = anObject [
         <category: 'testing'>

         ^ super = anObject and: [ self receiver = anObject receiver ]
     ]

     hash [
         <category: 'basic'>

         ^ super hash bitXor: self receiver hash
     ]
]

#hash missing.

And maybe make a "real" patch and send it? :)

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]