[DGD] Switch to handles from object pointers

Carter Cheng cartercheng at gmail.com
Sat Jan 9 23:47:58 CET 2016


Thanks Felix. I probably should have looked at the dgd code first.

On Sun, Jan 10, 2016 at 6:23 AM, Felix A. Croes <felix at dworkin.nl> wrote:

> Carter Cheng <cartercheng at gmail.com> wrote:
>
> > I am actually a bit confused by the implementation choice in lpc drivers
> in
> > general over the use of object pointers over handles in the
> implementation
> > given that one can explicitly destruct objects. It would seem to me that
> > handles would be better in that one could update the handle pointer to
> > point to null effectively destructing the object without having to
> traverse
> > other data structures like the stack.
> >
> > This would also make it possible to implement a in memory stackless jit
> > more easily since one does not need to using the single static assigment
> > form track various variables explicitly in another data structure in the
> > oft-chance an object is destructed.
>
> Um, did you mean to post that to a different mailing list?  DGD does use
> handles rather than object pointers.
>
> Traversing the stack to wipe out handles of destructed objects is an
> optimization, in that it allows other code to assume that handles on the
> stack are always valid and don't have to be checked.  If you don't want
> to do that for JIT-compiled code, fine -- you'll need more validity
> checks for handles everywhere.
>
> Regards,
> Felix Croes
> ____________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd



More information about the DGD mailing list