[svn:parrot] r38544 - in branches/gc_api: include/parrot src src/gc src/pmc
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Thu May 7 22:00:39 UTC 2009
Author: whiteknight
Date: Thu May 7 22:00:38 2009
New Revision: 38544
URL: https://trac.parrot.org/parrot/changeset/38544
Log:
[gc_api] rename add_pmc_ext and add_pmc_sync to Parrot_gc_*
Modified:
branches/gc_api/include/parrot/gc_api.h
branches/gc_api/src/gc/api.c
branches/gc_api/src/pmc.c
branches/gc_api/src/pmc/default.pmc
branches/gc_api/src/pmc/object.pmc
branches/gc_api/src/pmc/parrotinterpreter.pmc
branches/gc_api/src/pmc/scalar.pmc
branches/gc_api/src/thread.c
Modified: branches/gc_api/include/parrot/gc_api.h
==============================================================================
--- branches/gc_api/include/parrot/gc_api.h Thu May 7 21:19:13 2009 (r38543)
+++ branches/gc_api/include/parrot/gc_api.h Thu May 7 22:00:38 2009 (r38544)
@@ -55,11 +55,6 @@
/* HEADERIZER BEGIN: src/gc/api.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-void add_pmc_sync(PARROT_INTERP, ARGMOD(PMC *pmc))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- FUNC_MODIFIES(*pmc);
-
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
Buffer * new_buffer_header(PARROT_INTERP)
@@ -83,6 +78,11 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*pmc);
+void Parrot_gc_add_pmc_sync(PARROT_INTERP, ARGMOD(PMC *pmc))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*pmc);
+
void Parrot_gc_free_buffer(SHIM_INTERP,
ARGMOD(Small_Object_Pool *pool),
ARGMOD(PObj *b))
@@ -129,9 +129,6 @@
void Parrot_gc_profile_start(PARROT_INTERP)
__attribute__nonnull__(1);
-#define ASSERT_ARGS_add_pmc_sync __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp) \
- || PARROT_ASSERT_ARG(pmc)
#define ASSERT_ARGS_new_buffer_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_new_bufferlike_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \
@@ -143,6 +140,9 @@
#define ASSERT_ARGS_Parrot_gc_add_pmc_ext __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(pmc)
+#define ASSERT_ARGS_Parrot_gc_add_pmc_sync __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp) \
+ || PARROT_ASSERT_ARG(pmc)
#define ASSERT_ARGS_Parrot_gc_free_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(pool) \
|| PARROT_ASSERT_ARG(b)
Modified: branches/gc_api/src/gc/api.c
==============================================================================
--- branches/gc_api/src/gc/api.c Thu May 7 21:19:13 2009 (r38543)
+++ branches/gc_api/src/gc/api.c Thu May 7 22:00:38 2009 (r38544)
@@ -83,7 +83,7 @@
pmc->pmc_ext = new_pmc_ext(interp);
if (flags & PObj_is_PMC_shared_FLAG)
- add_pmc_sync(interp, pmc);
+ Parrot_gc_add_pmc_sync(interp, pmc);
}
else
pmc->pmc_ext = NULL;
@@ -156,7 +156,7 @@
/*
-=item C<void add_pmc_sync(PARROT_INTERP, PMC *pmc)>
+=item C<void Parrot_gc_add_pmc_sync(PARROT_INTERP, PMC *pmc)>
Adds a C<Sync*> structure to the given C<PMC>. Initializes the PMC's owner
field and the synchronization mutext. Does not check to ensure the C<Sync *> is
@@ -167,9 +167,9 @@
*/
void
-add_pmc_sync(PARROT_INTERP, ARGMOD(PMC *pmc))
+Parrot_gc_add_pmc_sync(PARROT_INTERP, ARGMOD(PMC *pmc))
{
- ASSERT_ARGS(add_pmc_sync)
+ ASSERT_ARGS(Parrot_gc_add_pmc_sync)
if (!PObj_is_PMC_EXT_TEST(pmc))
Parrot_gc_add_pmc_ext(interp, pmc);
Modified: branches/gc_api/src/pmc.c
==============================================================================
--- branches/gc_api/src/pmc.c Thu May 7 21:19:13 2009 (r38543)
+++ branches/gc_api/src/pmc.c Thu May 7 22:00:38 2009 (r38544)
@@ -196,7 +196,7 @@
if (new_vtable->flags & VTABLE_PMC_NEEDS_EXT) {
/* If we need an ext area, go allocate one */
if (!has_ext)
- add_pmc_ext(interp, pmc);
+ Parrot_gc_add_pmc_ext(interp, pmc);
new_flags = PObj_is_PMC_EXT_FLAG;
}
Modified: branches/gc_api/src/pmc/default.pmc
==============================================================================
--- branches/gc_api/src/pmc/default.pmc Thu May 7 21:19:13 2009 (r38543)
+++ branches/gc_api/src/pmc/default.pmc Thu May 7 22:00:38 2009 (r38544)
@@ -414,7 +414,7 @@
VTABLE PMC *getprops() {
if (!SELF->pmc_ext)
- add_pmc_ext(INTERP, SELF);
+ Parrot_gc_add_pmc_ext(INTERP, SELF);
if (!PMC_metadata(SELF)) {
if (has_pending_std_props(SELF))
@@ -1087,7 +1087,7 @@
/* default - initialize the PMC */
if (info->extra_flags == EXTRA_IS_PROP_HASH) {
if (!SELF->pmc_ext)
- add_pmc_ext(INTERP, SELF);
+ Parrot_gc_add_pmc_ext(INTERP, SELF);
info->thaw_ptr = &PMC_metadata(SELF);
info->container = SELF;
Modified: branches/gc_api/src/pmc/object.pmc
==============================================================================
--- branches/gc_api/src/pmc/object.pmc Thu May 7 21:19:13 2009 (r38543)
+++ branches/gc_api/src/pmc/object.pmc Thu May 7 22:00:38 2009 (r38544)
@@ -813,7 +813,7 @@
VTABLE_set_integer_native(INTERP, _true, 1);
VTABLE_setprop(INTERP, ret, CONST_STRING(interp, "_ro"), _true);
SELF->vtable->pmc_class = master->vtables[type_num]->pmc_class;
- add_pmc_sync(INTERP, ret);
+ Parrot_gc_add_pmc_sync(INTERP, ret);
PObj_is_PMC_shared_SET(ret);
data = PARROT_CLASS(classobj)->parents;
Modified: branches/gc_api/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/gc_api/src/pmc/parrotinterpreter.pmc Thu May 7 21:19:13 2009 (r38543)
+++ branches/gc_api/src/pmc/parrotinterpreter.pmc Thu May 7 22:00:38 2009 (r38544)
@@ -68,7 +68,7 @@
if (flags & PARROT_CLONE_HLL) {
/* we'd like to share the HLL data. Give it a PMC_sync structure
if it doesn't have one already */
- add_pmc_sync(s, s->HLL_info);
+ Parrot_gc_add_pmc_sync(s, s->HLL_info);
d->HLL_info = s->HLL_info;
Parrot_regenerate_HLL_namespaces(d);
}
Modified: branches/gc_api/src/pmc/scalar.pmc
==============================================================================
--- branches/gc_api/src/pmc/scalar.pmc Thu May 7 21:19:13 2009 (r38543)
+++ branches/gc_api/src/pmc/scalar.pmc Thu May 7 22:00:38 2009 (r38544)
@@ -1380,7 +1380,7 @@
VTABLE_setprop(INTERP, ret, CONST_STRING(INTERP, "_ro"), _true);
/* now share; we add a PMC_EXT so we can identify the owning interp */
- add_pmc_sync(INTERP, ret);
+ Parrot_gc_add_pmc_sync(INTERP, ret);
PObj_is_PMC_shared_SET(ret);
/* XXX FIXME workaround lack of metadata sharing*/
Modified: branches/gc_api/src/thread.c
==============================================================================
--- branches/gc_api/src/thread.c Thu May 7 21:19:13 2009 (r38543)
+++ branches/gc_api/src/thread.c Thu May 7 22:00:38 2009 (r38544)
@@ -352,7 +352,7 @@
if (is_ro)
pmc->vtable = pmc->vtable->ro_variant_vtable;
- add_pmc_sync(interp, pmc);
+ Parrot_gc_add_pmc_sync(interp, pmc);
PObj_is_PMC_shared_SET(pmc);
More information about the parrot-commits
mailing list