Fat references

Jon Harrop <jon@ffconsultancy.com>
Tue, 29 Dec 2009 17:55:59 +0000

          From comp.compilers

Related articles
Fat references jon@ffconsultancy.com (Jon Harrop) (2009-12-29)
Re: Fat references paul.biggar@gmail.com (Paul Biggar) (2009-12-30)
Re: Fat references bobduff@shell01.TheWorld.com (Robert A Duff) (2009-12-30)
Re: Fat references cr88192@hotmail.com (BGB / cr88192) (2009-12-30)
Re: Fat references gah@ugcs.caltech.edu (glen herrmannsfeldt) (2009-12-30)
Re: Fat references jon@ffconsultancy.com (Jon Harrop) (2009-12-30)
Re: Fat references kkylheku@gmail.com (Kaz Kylheku) (2009-12-30)
[29 later articles]
| List of all articles for this month |

From: Jon Harrop <jon@ffconsultancy.com>
Newsgroups: comp.compilers
Date: Tue, 29 Dec 2009 17:55:59 +0000
Organization: Flying Frog Consultancy Ltd.
Keywords: code, GC
Posted-Date: 30 Dec 2009 02:05:12 EST

I've been working on a project called HLVM in my spare time:


One goal was to have fast interop with C, so I didn't want to copy the
traditional style of placing a header with GC metadata before every value
in the heap because that would require C arrays to be copied just to add
this header. I couldn't be bothered to allocate a separate header so,
instead, I pulled the GC metadata into the reference. So my references are
now "fat": a quadword of pointer to run-time type, array length or union
type tag, pointer to mark state and pointer to the actual data itself.

This actually works rather well except I sacrificed atomic read/write of
references. Has it been done before?

Dr Jon D Harrop, Flying Frog Consultancy Ltd.

Post a followup to this message

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