[ENH] bytecodePrimClass and bytecodePrimEquivalent are message sends. Double dispatch #== (was Re: [ENH] RE: Does #class deserve to be a very-special shortcut bytecode anymore?)

Rob Withers rwithers12 at mediaone.net
Sat Jan 5 22:51:52 UTC 2002


At 03:48 PM 1/5/2002, you wrote:
>Rob Withers <rwithers12 at mediaone.net> is widely believed to have written:
>
> > Tim,
> >
> > argumentCount should be 0.
>That's what you get for quickly pasting code. :-(
>
>Could have been fun to try running though...

I am happy to say that I now spot these kinds of things, given my past 
three weeks of hacking the message lookup behavior.   Setting the stack up 
incorrectly or using the wrong argumentCount, causes all kinds neato things 
to happen!  ;-)

So, tim, you inspired me to try this mechanism with equivalence.  The 
attached file has your bytecodePrimClass change and the same for 
bytecodePrimEquivalent.  So this means that both are interceptable, when 
the proxy is the receiver.

The additional problem I had with #== is when the proxy is the 
argument.   So I changed ProtoObject to double dispatch #== to 
basicEquivalence: which calls primitive 110.  Is this reasonable 
performance-wise, do you think?

cheers,
Rob


>tim
>
>--
>Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
>Strange OpCodes: BOMB: Burn Out Memory Banks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixesToClassAndEquivalence.1.cs
Type: application/octet-stream
Size: 1357 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020105/3d414b91/fixesToClassAndEquivalence.1.obj


More information about the Squeak-dev mailing list