[GSoC] Precise GC
thedeemon via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Wed Sep 7 21:24:28 PDT 2016
On Tuesday, 6 September 2016 at 14:56:15 UTC, jmh530 wrote:
>> GC (and runtime in general) has no idea what code is safe and
>> what code is system. GC works with data at run-time. All
>> @safe-related stuff is about code (not data!) and happens at
>> compile-time. They are completely orthogonal and independent,
>> as I understand.
>
> I don't see why you wouldn't be able to use compile-time
> information like __traits with the runtime.
>
> In my head, I imagine that at compile-time you can figure out
> which unions are in @safe functions, add a UDA to each (so
> you're marking data, not code), and then read that information
> at run-time (like with __traits).
UDAs are also purely compile-time, they don't exist as run-time
data.
More information about the Digitalmars-d-announce
mailing list