[Vm-dev] normalSend, specialObjectsArray and VM
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
> 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
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
> Thank you very much.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev