On Aug 5, 2008, at 10:52 AM, Randal L. Schwartz wrote:
"Sean" == Sean Allen <[EMAIL PROTECTED]> writes:
Sean> I have a feeling the secret to unraveling that confusion comes
from this:
Sean> 'true and false and some of the very few objects known to the
VM'
Sean> does that mean that I can't go and find these variables
anywhere? that
Sean> they arent true global variables they are some sort of special
global?
If you explore "Smalltalk specialObjectsArray", you'll see a special
list of
variables that both the VM and the Smalltalk code have to agree on
in order to
run. For example, if a primitive wants to return "false", it has to
know what the rest of the Smalltalk image considers the sole instance
of the "False" class.
These items are established in
"SystemDictionary>>#recreateSpecialObjectsArray", the first version
of which
had to be executed essentially "by hand" on the first VM (either the
early
versions of Smalltalk 76 or 80). Since then, this special array has
gotten
its initial values by running it in an already running system, so
the first
few entries there (nil, false, true) are in fact clones of clones of
clones of
the original handcrafted objects. Of course, there's code on the VM
side that
knows the precise order of this magical array, and this is what
allows them to
communicate, so you can't just add new things here or change the
ordering
without building a corresponding new VM.
Thanks for the pointer of where to explore and the background info.
In a couple days when I've had time to review and digest hopefully it
will all make sense.
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners