Updating PMC struct
Andrew Whitworth
wknight8111 at gmail.com
Sat Aug 15 13:39:01 UTC 2009
Thanks to some patches from jessevdam++ on TT #549, I think we have a
viable way forward in removing the UnionVal structure. The patch is
very large, but I've been looking it over for the past two days and
have gotten a good idea about what it all does. The current version is
applied in the pmc_sans_unionval branch.
1) Removes the UnionVal structure from the PMC structure.
2) Combines the PMC_EXT structure into the PMC structure.
The net effect of these first two is that the PMC structure itself is
the same size, but we no longer need to manage PMC_EXTs so there is an
inherent decrease in memory consumption and increase in allocator
performance. Also, accesses to data that had been stored in PMC_EXT
should now be slightly faster and more cache-friendly.
3) Removes all special-purpose code from the GC for managing PMC_EXT
4) Removes definition of the UnionVal structure entirely
PObjs that still used it have been redesigned to use the necessary
pointers directly
5) Renames several accessor macros to more accurately reflect what
types they work with
6) Adds several functions to check small object and memory pools for
corruption (Though I'm not entirely sure yet what the performance
implications are, or whether these checks are optional)
7) Adds lots of documentation about the behavior of the memory system
This branch isn't going anywhere until after the Tuesday release at
the earliest. However, I would like to ask for some help in testing
this branch, including testing several languages running on top of it.
Also I would like to hear opinions from people about this. I know we
have talked about removing UnionVal and PMC_EXT in the past, but this
is a pretty sudden surge in progress on those.
Thanks,
--Andrew Whitworth
More information about the parrot-dev
mailing list