Front page | perl.ponie.changes |
Postings from December 2005
[svn:ponie] r375 - in trunk: perl src/pmc
From:
nicholas
Date:
December 9, 2005 09:39
Subject:
[svn:ponie] r375 - in trunk: perl src/pmc
Message ID:
20051209173913.23448.qmail@x1.develooper.com
Author: nicholas
Date: Fri Dec 9 09:39:12 2005
New Revision: 375
Modified:
trunk/perl/perl.c
trunk/src/pmc/perl5cargo_cult.pmc
Log:
Also use the Perl 5 pointer table to track SVs on behalf of Parrot's GC.
Modified: trunk/perl/perl.c
==============================================================================
--- trunk/perl/perl.c (original)
+++ trunk/perl/perl.c Fri Dec 9 09:39:12 2005
@@ -256,15 +256,15 @@ perl_construct(pTHXx)
PL_Parrot = Parrot_new(0);
Parrot_init(PL_Parrot);
- PL_Refcounts = Parrot_PMC_new(PL_Parrot, type_or_bail("AddrRegistry"));
- Parrot_register_pmc(PL_Parrot, PL_Refcounts);
-
if(getenv("PONIE_DEBUG_GC")) {
Parrot_set_flag(PL_Parrot, PARROT_GC_DEBUG_FLAG);
}
Parrot_init_lib(PL_Parrot, &Parrot_lib_perl5pmcs_load, NULL);
+ PL_Refcounts = Parrot_PMC_new(PL_Parrot, type_or_bail("Perl5RefCount"));
+ Parrot_register_pmc(PL_Parrot, PL_Refcounts);
+
#ifdef USE_ITHREADS
MUTEX_LOCK(&PL_pmcname_mutex);
#endif
Modified: trunk/src/pmc/perl5cargo_cult.pmc
==============================================================================
--- trunk/src/pmc/perl5cargo_cult.pmc (original)
+++ trunk/src/pmc/perl5cargo_cult.pmc Fri Dec 9 09:39:12 2005
@@ -72,7 +72,6 @@ pmclass Perl5cargo_cult dynpmc {
PMC_struct_val(SELF) = head = malloc(sizeof(struct STRUCT_SV));
PMC_pmc_val(SELF) = NULL;
- Parrot_PMC_set_pmc_pmckey(INTERP, PL_Refcounts, SELF, 0);
sv = MUMBLE(SELF);
/* This is the moral equivalent of SvREFCNT_inc(), and given that we
@@ -762,8 +761,6 @@ pmclass Perl5cargo_cult dynpmc {
Parrot_PMC_push_pmc(INTERP, PL_sv_pining, SELF);
/* Release anchor here. */
- Parrot_PMC_delete_pmckey(INTERP, PL_Refcounts, SELF);
-
if (!Perl_ptr_table_delete(PL_sv_arenatable,
MUMBLE(SELF))) {
Perl_croak("Attempt to free non-arena SV: 0x%"UVxf
-
[svn:ponie] r375 - in trunk: perl src/pmc
by nicholas