[Parrot] #549: Kill UnionVal

Andy Dougherty doughera at lafayette.edu
Fri Jul 31 14:19:24 UTC 2009

On Thu, 30 Jul 2009, Andrew Whitworth wrote:

> It's only effectively reusing the space for "bufstart" because
> bufstart is still part of the structure. Once we remove bufstart from
> the PMC, the pointer will be overlayed on a different field in the
> structure and there will be memory savings. The buflen thing similarly
> could be overlayed (or maybe be removed entirely) for additional
> savings. There is no fundamental reason why PMCs need to be as large
> as they are now, considering that the things using that space (inside
> and outside the GC) are orthogonal to one another and non-overlapping.

Ah.  I see.  That orthogonality was the piece I was missing.

> In the long term, I suspect PMCs will look like this:
> struct PMC {
>     Parrot_UInt     flags;
>     VTABLE         *vtable;
>     DPOINTER       *data;
>     struct PMC_EXT *pmc_ext;
> };

Ok.  Thank you.  That's much clearer than the original ticket.
I'll update the ticket with a summary.

    Andy Dougherty		doughera at lafayette.edu

More information about the parrot-dev mailing list