Organizing VM sources, CCodeGenerator: suggestionsandquestions

Raab, Andreas Andreas.Raab at disney.com
Wed Dec 29 21:21:38 UTC 1999


Stephan,

> I haven't kept in mind that in Smalltalk _all_ is an object! This is
> valid for classes, too.

Heh, heh ;-) One of the things that make Smalltalk so different...

> But how is it with objects in the special objects array?
> Are object pointers stored in the special objects array constant -
> during one run of squeak - or not?

No. They aren't constant from a C point of view. The special objects array
just stores oops (though very special oops) - if you look at
SystemDictionary>>recreateSpecialObjectsArray you'll see that this is just a
regular Array.

> I'm just storing the class pointer of classLargeNegativeInteger in a var
> in C.

Don't do it. Since it's an oop it may be moved around by any GC.

> In 2.7 classLargeNegativeInteger also resides in the special objects
> array (according my updated image).

True. LargeNegativeInteger were introduced in the special objects array so
that it is possible to read/generate signed 32bit integers from the C level.
This was in one of the updates for 2.7alpha.

> How is it in 2.6?
> Answer: It is not stored there!
> 
> So in either case: this way is no way.

The answer is simple: Just wait until 2.7 is out. From then on, all
Squeakers will have LargeNegativeInteger available.

  Andreas





More information about the Squeak-dev mailing list