Ehem, ARM
Michel Fortin
michel.fortin at michelf.ca
Fri Nov 15 04:42:19 PST 2013
On 2013-11-15 07:26:56 +0000, Jacob Carlborg <doob at me.com> said:
> On 2013-11-15 00:35, Manu wrote:
>
>> Very good point. I wonder if there's room to make a push for this in 2.065.
>
> Highly unlikely. It seems like Walter wanted us to first implement
> ARC, to not be worse the Objective-C currently is. But we haven't been
> able to come to an agreement on how to do that.
Honestly, what I'd do is implement ARC for Objective-C types in the
compiler without waiting for Walter to decide on anything. There's
almost nothing to decide when it comes to how D/Objective-C does it:
you have to do it the same way as clang. And you can't reuse anything
Walter will come with without much tinkering because Objective-C ARC
has to manage autoreleased objects. On the other hand once you have
implemented Objective-C ARC it should be easy to retrofit the mechanics
of it to other parts of D.
I find it funny how I though about implementing ARC for D/Objective-C
even before clang came with it. Another idea involved making the D GC
capable of tracking pointers to external blocks of memory (Objective-C
objects in this case) and making it call a release function when no
longer referenced by D code. Some remnants of that:
https://github.com/michelf/druntime/blob/d-objc/src/objc/dobjc.d#L159
--
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca
More information about the Digitalmars-d
mailing list