http://d.puremagic.com/issues/show_bug.cgi?id=3463



--- Comment #88 from bearophile_h...@eml.cc 2011-04-14 02:06:33 PDT ---
(In reply to comment #87)

> 1. distinguishing real pointers from might-be-a-pointer (such as you might get
> from union { int a; void* p; }).

In C unions are not tagged, but in many C programs the programmer has
introduced some mean to tell apart at runtime what's inside the union, like a
first bit set in the pointer, a tag field in a struct where the union is, or a
tag value elsewhere in the program. So time ago I have suggested an optional
standard method useful fur unions, named something like onGC(...). It gets
called at runtime by the GC during when it scans the union instance, and in
some way tells the GC if a field is a pointer to follow (to call that onGC()
the GC has to know that something is a specific union in the first place).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to