[Parrot] #549: Kill UnionVal

Andrew Dougherty doughera at lafayette.edu
Wed Jul 29 17:14:01 UTC 2009


On Wed, 29 Jul 2009, Parrot wrote:

> #549: Kill UnionVal

> Comment(by jessevdam):
> 
>  I managed to kill the Unionval form the pobj.h.
> 
>  I replaced the union with the _bufstart and _buflen because there are used
>  by the gc system. As far I know the gc system can't do without them, but I
>  am not sure.

Thank you for the contribution.  However, it's not clear to me if that
was what this ticket intended.  This patch does remove the "union",
but it doesn't really "kill" the UnionVal.  For the most part, it just
unwraps it and renames the individual pieces.

For most common architectures (i386, amd64, sparc64) this doesn't make
PMCs any smaller or faster.  It would, however, make it harder to use
that space for one of the uses documented in pdd17:

    "u" holds data associated with the PMC. This can be in the form
    of an integer value, a floating-point value, a string value, or a
    pointer to other data.  "u" may be empty, since the PMC structure
    also provides a more general data pointer, but is useful for PMCs
    which hold only a single piece of data (e.g.  "PerlInts").

Could someone remind me *why* we should "Kill UnionVal" ?  I've reviewed
the #parrot link referenced in TT #549, pdd17, and the old RT #48014, but
I still don't understand what "problem" this ticket is trying to solve.

Thanks,

-- 
    Andy Dougherty		doughera at lafayette.edu


More information about the parrot-dev mailing list