Disadvantages of building a compiler and library on top of a specific memory management scheme
"Németh Péter"
hun.nemethpeter at gmail.com
Fri Feb 7 05:36:10 PST 2014
> It would be more of an abstract type. Something special template
> aggregate that the compiler accesses to get code to "hook" in to
> the memory management parts of the code the compiler needs, but
> has delegated specifics to the "user".
It's intresting idea for me.
If we mark a variable with a property, that how that memory is
allocated then we got an marked AST node. And based on that mark
we can perform AST manipulation during compile time. So if we
marked a variable with ARC, then refcount decrease will injected
during scope exit. If we mark a variable with GC, nothing will
happen. We shoul allocate a separate memory area to refcounts, so
that an RC variable can remain a pointer. These are just
thoughts, nothing real proposal here... this is on my mind now..
More information about the Digitalmars-d
mailing list