[svn:parrot] r40381 - in trunk: include/parrot src/gc
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Sun Aug 2 12:39:20 UTC 2009
Author: whiteknight
Date: Sun Aug 2 12:39:19 2009
New Revision: 40381
URL: https://trac.parrot.org/parrot/changeset/40381
Log:
[TT #895] fix some problems caused by typos in my last commit
Modified:
trunk/include/parrot/gc_api.h
trunk/src/gc/api.c
trunk/src/gc/gc_private.h
trunk/src/gc/mark_sweep.c
Modified: trunk/include/parrot/gc_api.h
==============================================================================
--- trunk/include/parrot/gc_api.h Sun Aug 2 12:30:46 2009 (r40380)
+++ trunk/include/parrot/gc_api.h Sun Aug 2 12:39:19 2009 (r40381)
@@ -189,6 +189,11 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*buffer);
+PARROT_CANNOT_RETURN_NULL
+void * Parrot_gc_allocate_fixed_size_storage(PARROT_INTERP, size_t size)
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
void * Parrot_gc_allocate_pmc_attributes(PARROT_INTERP,
ARGMOD(PMC *pmc),
size_t size)
@@ -240,7 +245,13 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*obj);
-PARROT_CANNOT_RETURN_NULL
+void Parrot_gc_free_fixed_size_storage(PARROT_INTERP,
+ size_t size,
+ ARGMOD(void * data))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(* data);
+
void Parrot_gc_free_pmc_attributes(PARROT_INTERP,
ARGMOD(PMC *pmc),
size_t item_size)
@@ -375,6 +386,9 @@
__attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(buffer)
+#define ASSERT_ARGS_Parrot_gc_allocate_fixed_size_storage \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_gc_allocate_pmc_attributes \
__attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
@@ -410,6 +424,10 @@
__attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(obj)
+#define ASSERT_ARGS_Parrot_gc_free_fixed_size_storage \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp) \
+ || PARROT_ASSERT_ARG(data)
#define ASSERT_ARGS_Parrot_gc_free_pmc_attributes __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(pmc)
Modified: trunk/src/gc/api.c
==============================================================================
--- trunk/src/gc/api.c Sun Aug 2 12:30:46 2009 (r40380)
+++ trunk/src/gc/api.c Sun Aug 2 12:39:19 2009 (r40381)
@@ -1678,6 +1678,7 @@
*/
+PARROT_CANNOT_RETURN_NULL
void *
Parrot_gc_allocate_pmc_attributes(PARROT_INTERP, ARGMOD(PMC *pmc), size_t size)
{
@@ -1691,7 +1692,6 @@
return attrs;
}
-PARROT_CANNOT_RETURN_NULL
void
Parrot_gc_free_pmc_attributes(PARROT_INTERP, ARGMOD(PMC *pmc), size_t item_size)
{
@@ -1722,7 +1722,7 @@
ASSERT_ARGS(Parrot_gc_free_fixed_size_storage)
PMC_Attribute_Pool * const pool = Parrot_gc_get_attribute_pool(interp,
size);
- Parrot_gc_free_atributes_from_pool(interp, pool, data);
+ Parrot_gc_free_attributes_from_pool(interp, pool, data);
}
/*
Modified: trunk/src/gc/gc_private.h
==============================================================================
--- trunk/src/gc/gc_private.h Sun Aug 2 12:30:46 2009 (r40380)
+++ trunk/src/gc/gc_private.h Sun Aug 2 12:39:19 2009 (r40381)
@@ -382,21 +382,19 @@
FUNC_MODIFIES(*pool)
FUNC_MODIFIES(*new_arena);
-void Parrot_gc_allocate_new_attributes_arena(PARROT_INTERP,
- ARGMOD(PMC_Attribute_Pool *pool))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- FUNC_MODIFIES(*pool);
-
void Parrot_gc_clear_live_bits(PARROT_INTERP,
ARGIN(const Small_Object_Pool *pool))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-PARROT_CANNOT_RETURN_NULL
-PMC_Attribute_Pool * Parrot_gc_create_attrib_pool(PARROT_INTERP,
- size_t attrib_size)
- __attribute__nonnull__(1);
+void Parrot_gc_free_attributes_from_pool(PARROT_INTERP,
+ ARGMOD(PMC_Attribute_Pool * pool),
+ ARGMOD(void *data))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(* pool)
+ FUNC_MODIFIES(*data);
PARROT_CANNOT_RETURN_NULL
PMC_Attribute_Pool * Parrot_gc_get_attribute_pool(PARROT_INTERP,
@@ -451,15 +449,14 @@
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(pool) \
|| PARROT_ASSERT_ARG(new_arena)
-#define ASSERT_ARGS_Parrot_gc_allocate_new_attributes_arena \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp) \
- || PARROT_ASSERT_ARG(pool)
#define ASSERT_ARGS_Parrot_gc_clear_live_bits __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(pool)
-#define ASSERT_ARGS_Parrot_gc_create_attrib_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp)
+#define ASSERT_ARGS_Parrot_gc_free_attributes_from_pool \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp) \
+ || PARROT_ASSERT_ARG(pool) \
+ || PARROT_ASSERT_ARG(data)
#define ASSERT_ARGS_Parrot_gc_get_attribute_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_gc_get_attributes_from_pool \
Modified: trunk/src/gc/mark_sweep.c
==============================================================================
--- trunk/src/gc/mark_sweep.c Sun Aug 2 12:30:46 2009 (r40380)
+++ trunk/src/gc/mark_sweep.c Sun Aug 2 12:39:19 2009 (r40381)
@@ -79,6 +79,17 @@
static Small_Object_Pool * new_string_pool(PARROT_INTERP, INTVAL constant)
__attribute__nonnull__(1);
+static void Parrot_gc_allocate_new_attributes_arena(PARROT_INTERP,
+ ARGMOD(PMC_Attribute_Pool *pool))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*pool);
+
+PARROT_CANNOT_RETURN_NULL
+static PMC_Attribute_Pool * Parrot_gc_create_attrib_pool(PARROT_INTERP,
+ size_t attrib_size)
+ __attribute__nonnull__(1);
+
#define ASSERT_ARGS_free_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(pool) \
|| PARROT_ASSERT_ARG(b)
@@ -96,6 +107,12 @@
#define ASSERT_ARGS_new_small_object_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = 0
#define ASSERT_ARGS_new_string_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
+#define ASSERT_ARGS_Parrot_gc_allocate_new_attributes_arena \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp) \
+ || PARROT_ASSERT_ARG(pool)
+#define ASSERT_ARGS_Parrot_gc_create_attrib_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -1194,12 +1211,13 @@
Get a new fixed-size storage space from the given pool. The pool contains
information on the size of the item to allocate already.
-=item C<void Parrot_gc_allocate_new_attributes_arena(PARROT_INTERP,
+=item C<static void Parrot_gc_allocate_new_attributes_arena(PARROT_INTERP,
PMC_Attribute_Pool *pool)>
Allocate a new arena of fixed-sized data structures for the given pool.
-=item C<void Parrot_gc_free_attributes_from_pool(PARROT_INTERP, PMC_Attribute_Pool *pool, void *data)>
+=item C<void Parrot_gc_free_attributes_from_pool(PARROT_INTERP,
+PMC_Attribute_Pool * pool, void *data)>
Frees a fixed-size data item back to the pool for later reallocation
@@ -1209,8 +1227,8 @@
Find a fixed-sized data structure pool given the size of the object to
allocate. If the pool does not exist, create it.
-=item C<PMC_Attribute_Pool * Parrot_gc_create_attrib_pool(PARROT_INTERP, size_t
-attrib_size)>
+=item C<static PMC_Attribute_Pool * Parrot_gc_create_attrib_pool(PARROT_INTERP,
+size_t attrib_size)>
Create a new pool for fixed-sized data items with the given C<attrib_size>.
@@ -1235,7 +1253,7 @@
}
void
-Parrot_gc_free_attributes_from_pool(PARROT_INTERP, ARGMOD(PMC_Attribute_Pool * pool)
+Parrot_gc_free_attributes_from_pool(PARROT_INTERP, ARGMOD(PMC_Attribute_Pool * pool),
ARGMOD(void *data))
{
PMC_Attribute_Free_List * const item = (PMC_Attribute_Free_List *)data;
More information about the parrot-commits
mailing list