A benchmark, mostly GC
dsimcha
dsimcha at yahoo.com
Sun Dec 11 18:56:01 PST 2011
On 12/11/2011 9:41 PM, Timon Gehr wrote:
> On 12/11/2011 11:37 PM, dsimcha wrote:
>> On 12/11/2011 4:26 PM, Timon Gehr wrote:
>>> We are talking about supporting precise GC, not about custom runtime
>>> reflection. There is no way to get precise GC right without compiler
>>> support.
>>
>> FWIW my original precise heap scanning patch generated pointer offset
>> information using CTFE and templates. The code to do this is still in
>> Bugzilla and only took a couple hours to write.
>
> But it is not precise for the stack, right? How much work is left to the
> programmer to generate the information?
It wasn't precise on the stack, but for unrelated reasons. As far as
work left to the programmer, I has created templates for new (which I
thought at the time might get integrated into the compiler). To use the
precise heap scanning, all you had to do was:
class C {
void* ptr;
size_t integer;
}
void main() {
auto instance = newTemplate!C();
}
More information about the Digitalmars-d
mailing list