Organizing VM sources, CCodeGenerator: suggestionsandquestions

Stephan Rudlof sr at evolgo.de
Wed Dec 29 18:55:32 UTC 1999


Thank you, Andreas and Andrew!

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

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?



BTW:

I'm just storing the class pointer of classLargeNegativeInteger in a var
in C.
In 2.7 classLargeNegativeInteger also resists in the special objects
array (according my updated image).

How is it in 2.6?
Answer: It is not stored there!

So in either case: this way is no way.


Greetings,

Stephan

agree at carltonfields.com wrote:
> 
> > > Now I've taken another way: I'm initializing a variable
> > > 'myClassLargeNegativeInteger' (to avoid name clashes with
> > > 'classLargeNegativeInteger' in 2.7) while starting up the > system by a
> > > startup class method and use this variable then. This works fine and
> > > avoids unnecessary parameters in ST primitive (your approach) or C
> > > function calls (my first approach). And also the changes to use the
> > > features of 2.7 are minimal.
> > > This is dangerous. If you cache any Oop on the C side it will not be
> > remapped during GC and the next call to your primitive after > GC will almost
> > always break the system.
> 
> Right, and in practice, I didn't actually go that route, but instead passed the class on each call using references to the parameter stack instead which survived GC's.

-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3





More information about the Squeak-dev mailing list