[squeak-dev] CompiledMethod >> #=

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Mon Jan 10 18:10:41 UTC 2022

Thank you for the fast feedback, Eliot! No further questions. :-)



Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Eliot Miranda <eliot.miranda at gmail.com>
Gesendet: Montag, 10. Januar 2022 18:24:17
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] CompiledMethod >> #=

Hi Christoph,

On Jan 10, 2022, at 6:31 AM, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:

Hi all,

currently, the comparison of CompiledMethods does not honor their selector, e.g.:

Object >>  bar: arg

^ arg * 2

Object >>  foo: arg

^ arg * 2

(Object >> #foo:) = (Object >> #bar:) will answer true.

Is this intended behavior or rather a slip?

Intended.  The method is defined to compare a method’s effects and state (pragmas, properties).

I find this especially confusing as it the CompiledCodeInspector, you can see a difference in the literals of both methods, but nevertheless, #hasSameLiteralsAs: answers

Ok but I want to know what a method’s semantics are when I ask for equality (at least that was what I was interested in when I defined it). The selector and methodClass arguably don’t have a bearing on this.


The selector and methodClass are stored as literals but not referenced as literals (although methodClass is part of super sends).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220110/30a72edb/attachment.html>

More information about the Squeak-dev mailing list