[Vm-dev] Squeak Object Engine Message Sending clarification

David T. Lewis lewis at mail.msen.com
Sun Dec 8 18:02:03 UTC 2013


On Sun, Dec 08, 2013 at 09:57:33AM -0800, tim Rowledge wrote:
> 
> 
> On 08-12-2013, at 8:19 AM, gettimothy <gettimothy at zoho.com> wrote:
> 
> > No need to go into details as I am just attempting to avoid a misconception.
> > 
> > On page 5 of 28 on Tim Rowledge's (very useful and enjoyable, btw) A Tour of the Squeak Object Engine
> >  I am unclear as to what  object's header' refers to in step I.
> > 
> > 
> > To send a message to a receiver, the VM has to:-
> >    I.        find the class of the receiver by examining the object's header.  
> >    II.       lookup the message in the list of messages understood by that class
> >        (the class's MethodDictionary)
> > ........etc?
> 
> Back on page 2 of my doc,  -
> > 1. Creating Objects
> > 
> > Unlike structures in C or records in Pascal, Smalltalk objects are not simply chunks of memory to which we have pointers, and so we need something more sophisticated than the C library malloc() function in order to create new ones.
> > Smalltalk creates objects by allocating a chunk of the object memory and then building a header that provides the VM with important information such as the class of the object, the size and some content format description.
> 
> I really ought to update the doc and add some more diagrams etc.
> 

If you put out another book, I'll buy a new copy. That's how I learned
about this stuff in the first place.

Dave



More information about the Vm-dev mailing list