Adding a new imediate type

joshscholar at nightstudies.net joshscholar at nightstudies.net
Wed Jan 4 14:23:01 UTC 2006


Ouch.  This suggests to me that code generation isn't well organized in the compiler.  Adding a field should be as easy as, well, adding a field to a struct or object in any other system.  But I have the impression that the generated code doesn't use struct definitions in C it uses hard-wired pointer arithmetic.  Using pointer arithmetic is very poor practice because it makes what should be trivial changes, hard.

Josh Scholar
  ----- Original Message ----- 
  From: Joerg Beekmann 
  To: The general-purpose Squeak developers list 
  Sent: Monday, January 02, 2006 8:54 AM
  Subject: Re: Adding a new imediate type


  Peter Crowther wrote: 
From: [...] Joerg Beekmann
Can anyone comment on how much work would be involved in
1) Adding a new 32bit field to the object header
    
Nasty.  I tried it back in the 2.2 days, and failed.  My biggest problem
was getting the garbage collector stable.

  2) Adding a new immediate type like integer, presumable by adding 
another tag bit.
    
Also nasty - there aren't any more tag bits, and tweaking with the
header format also involves the GC.  If you're going to do this, look at
the compact classes instead and see whether you can make yours compact.
Last I looked, I think there were a couple of spares.  Note that changes
to compact classes did *not* involve image format or VM changes last I
looked.
  Thanks Peter, I am not aware of compact classes so I'll have a look.



-- 
Joerg Beekmann
DeepCove Labs
4th floor 595 Howe Street
Vancouver, BC, V6C 2T5
joerg at deepcovelabs.com

------------------------------------------------------------------------------



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060104/526c9e6d/attachment.htm


More information about the Squeak-dev mailing list