Tracing special messages [WAS] Re: [Vm-dev] Re: normalSend, specialObjectsArray and VM

Mariano Martinez Peck marianopeck at gmail.com
Tue Oct 5 18:20:15 UTC 2010


On Tue, Oct 5, 2010 at 7:50 PM, Eliot Miranda <eliot.miranda at gmail.com>wrote:

>
>
>
> On Tue, Oct 5, 2010 at 9:23 AM, Mariano Martinez Peck <
> marianopeck at gmail.com> wrote:
>
>>
>> Hi. So....if I want to intercept ALL message sends....going to #normalSend
>> is not enough since I have #class, #==, Float>>#+   etc that are executed
>> directly like bytecodes. So...my questions are now:
>>
>> 1) Those special selectors are those that are in "Smalltalk
>> specialSelectors" ?  are there more?  all from there are special?
>>
>> 2) All those "Smalltalk specialSelectors"  have their associated bytecode
>> primitive in Interpreter??  If true, then I should modify all bytecodePrim*
>> in Interpreter. I am right?   If I do that, that's all ? I am intercepting
>> everything?
>>
>
> Right.  Just modify all of them to eliminate the optimized code and to
> revert to normalSend.
>

Thanks Eliot. I didn't understand. What is the optimized code?   I checked
all bytecodePrim* and the ones that DO NOT send "self normalSend" at the
end, are very few. The problem is that some return before returning "self
normalSend". So...I should modify all those who DO NOT call "self
normalSend" at the end and those which return before.



> Providing you also look at the perform and method evaluation primitives I
> think you'll get all sends.
>
>
#primitivePerform*   and #primitiveExecuteMethod*    ???


> There is another way.  Modify the Smalltalk compiler to to use the special
> selector sends.
>
>
Thanks Eliot for the idea. Can you explain me a little more (sorry, newbie
here!). You mean that with the Compiler I can do that all method sends use
the normal send instead of special bytecodes or primitives?

Thank you very much.

Mariano


>
>> Thanks a lot in advance,
>>
>> Mariano
>>
>>
>>
>> On Sun, Oct 3, 2010 at 11:09 PM, Craig Latta <craig at netjam.org> wrote:
>>
>>>
>>>
>>> > Craig Latta has done all this work, talk to him.
>>>
>>>     Sure, I'd be happy to discuss it.
>>>
>>>
>>> -C
>>>
>>> --
>>> Craig Latta
>>> www.netjam.org
>>> + 31 020 894 6247
>>> +  1 415 287 3547
>>>
>>>
>>>
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20101005/1cdc5474/attachment.htm


More information about the Vm-dev mailing list