[Vm-dev] normalSend, specialObjectsArray and VM

Eliot Miranda eliot.miranda at gmail.com
Fri May 7 20:04:05 UTC 2010

On Fri, May 7, 2010 at 2:30 AM, Mariano Martinez Peck <marianopeck at gmail.com
> wrote:

> Hi folks. I need to intercept ALL message sends. For the moment, I
> intercepted in Interpreter >> normalSend
> But now, I have a question: I know there is that specialObjectArray that
> contain objects that may be accessed by the VM.
> So, the first question is, they are only ACCESSED and to things with
> pointers or they also send messages to those objects from the VM?

Only accessed. The Interpreter has specialObjectsArray as one of its object
references (along with nil, true, false) and indexes it with indices stored
in class variables such as SpecialSelectors, CharacterTable, ClassMessage et
al.  See implementors and senders of splObj:.

> If the VM really send messages to those object, how that is done ?  The
> code goes also by normalSend ? Or they go from somewhere else that I am not
> intercepting.

At the bottom the VM has to access objects directly to avoid infinite
regress.  So the only sends are in response to send bytecodes, the perform:
primitives, and other edge cases (looking up run:with:in: in the
invoke-object-as-method prim and looking up a callback entry point in the
Alien FFI).

> Thank you very much.
> Mariano

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100507/08d7419c/attachment.htm

More information about the Vm-dev mailing list