A plea from Rakudo-land
Vasily Chekalkin
bacek at bacek.com
Sun Jul 12 03:22:56 UTC 2009
Patrick R. Michaud wrote:
> Another update on current GC failures affecting Rakudo.
Ok, after many iterations and rumbling around I want to apply next patch
to Parrot.
1. PARROT_ASSERT in hash.c enforce contract about "constant" PMC usage.
Because for "constant" PMC *all* contents _including_ keys must be
allocated from constant pool.
2. Changing HLL_info from constant_pmc_new to pmc_new for same reason.
OrderedHash.push_pmc creates new keys. And those keys are not allocated
from _constant_ pool. And this is likely main problem of "Method 'succ'
not found".
3. Clearing constant flag on PMC thawing. Comment in packfile.c:3999
/*
* TODO use thaw_constants
* current issue: a constant Sub with attached properties
* doesn't GC mark the properties
* for a constant PMC *all* contents have to be in the constant pools
*/
pmc = Parrot_thaw(interp, image);
Which means when we unpack PackFile_Constant we actually allocate from
non-constant pool. But for aggregate PMCs (such Hash) we preserve
freezed flags including PObj_constant_FLAG. Which lead us to hash_visit
where we create new non-constant keys.
Honestly, I wish to eliminate constant_pool totally. It's very-very
premature optimisation. And complexity of using it is similar to
refcountig.
--
Bacek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: const.patch
Type: text/x-patch
Size: 1596 bytes
Desc: not available
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20090712/ee9e0f63/attachment.bin>
More information about the parrot-dev
mailing list