Re: Run-time representation of classes

George Neuner <gneuner2@comcast.net>
Wed, 04 Feb 2009 01:22:03 -0500

          From comp.compilers

Related articles
Run-time representation of classes jon@ffconsultancy.com (Jon Harrop) (2009-01-27)
Re: Run-time representation of classes cr88192@hotmail.com (cr88192) (2009-01-30)
Re: Run-time representation of classes gneuner2@comcast.net (George Neuner) (2009-01-30)
Re: Run-time representation of classes armelasselin@hotmail.com (Armel) (2009-01-30)
Re: Run-time representation of classes ftu@fi.uu.nl (2009-01-31)
Re: Run-time representation of classes michael@schuerig.de (Michael Schuerig) (2009-02-02)
Re: Run-time representation of classes cr88192@hotmail.com (cr88192) (2009-02-03)
Re: Run-time representation of classes gneuner2@comcast.net (George Neuner) (2009-02-04)
Re: Run-time representation of classes michael@schuerig.de (Michael Schuerig) (2009-02-05)
Re: Run-time representation of classes cr88192@hotmail.com (cr88192) (2009-02-05)
Re: Run-time representation of classes cppljevans@suddenlink.net (Larry Evans) (2009-02-07)
Re: Run-time representation of classes cr88192@hotmail.com (cr88192) (2009-02-08)
Re: Run-time representation of classes gneuner2@comcast.net (George Neuner) (2009-02-08)
| List of all articles for this month |

From: George Neuner <gneuner2@comcast.net>
Newsgroups: comp.compilers
Date: Wed, 04 Feb 2009 01:22:03 -0500
Organization: A noiseless patient Spider
References: 09-01-055 09-02-001 09-02-007
Keywords: OOP, GC
Posted-Date: 04 Feb 2009 19:04:21 EST

On Mon, 02 Feb 2009 14:05:48 +0100, Michael Schuerig
<michael@schuerig.de> wrote:


>George Neuner wrote:
>
>> Most texts cover basic GC and creating pointer/reference maps for your
>> structured types. That works well provided the maps are simple and
>> fast to decode (e.g., byte or word maps rather than bits). A slightly
>> faster, but more complex, method is to generate a customized scanning
>> function for each type that knows where to find embedded references
>> ... not all texts mention this method.
>
>Could you be a bit more specific about the texts, please? AFAIR, neither
>the Dragon Book nor Jones/Lins, "Garbage Collection", or
>Scott, "Programming Language Pragmatics", cover this. Surprisingly, I
>might add.


You need to re-read chapters 9,10 in Jones/Lins. *Carefully*.


Jones/Lins is the bible of GC. Despite it's age, none of the
information in the book is out of date. Very little has changed in GC
technique since it was written - some new implementations, a few
optimizations, but no real new ideas.




Checking my shelf ... I find:


Appel's "Modern Compiler Implementation" has a decent discussion of
basic GC algorithms and includes pointer finding, pointer maps and
their use in the heap, and for stack frames and registers.
Implementation is left as an exercise.


"Topics in Advanced Language Implementation", a collection edited by
Peter Lee. This has Detlefs paper which is covered in chapter 10 of
Jones/Lins. Since you have Jones/Lins this one is superfluous wrt GC
but it has other stuff you might like to read.




I don't have the latest [purple] dragon book, but given how recent it
is and its stated emphasis on compiling for more advanced languages, I
would be very surprised if there wasn't a treatment of pointer finding
and maps. Perhaps not an implementation, but certainly a discussion.


As for the rest, "cover" was probably too strong a description. Most
modern undergrad texts detail the need for pointer finding when using
GC and mention maps as a method, but they aren't teaching GC and they
figure anyone who cares will check references.


I haven't yet seen any advanced compiler books that deal explicitly
with GC issues. All the books I am familiar with are concerned with
code optimization and pay very little attention to how the program
interacts with its runtime environment.


George


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.