develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35361 - in branches/pdd09gc_part2: include/parrot src src/pmc src/stm

From:
chromatic
Date:
January 10, 2009 14:06
Subject:
[svn:parrot] r35361 - in branches/pdd09gc_part2: include/parrot src src/pmc src/stm
Message ID:
20090110220553.4D27ACB9F9@x12.develooper.com
Author: chromatic
Date: Sat Jan 10 14:05:52 2009
New Revision: 35361

Modified:
   branches/pdd09gc_part2/include/parrot/headers.h
   branches/pdd09gc_part2/src/headers.c
   branches/pdd09gc_part2/src/pmc/array.pmc
   branches/pdd09gc_part2/src/stacks.c
   branches/pdd09gc_part2/src/stm/backend.c

Log:
[src] Renamed make_bufferlike_pool() to get_bufferlike_pool(), so that it's
obvious which function is safer to use.  (Hint: it's the only one which exists
anymore.)


Modified: branches/pdd09gc_part2/include/parrot/headers.h
==============================================================================
--- branches/pdd09gc_part2/include/parrot/headers.h	(original)
+++ branches/pdd09gc_part2/include/parrot/headers.h	Sat Jan 10 14:05:52 2009
@@ -86,7 +86,7 @@
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
-Small_Object_Pool * make_bufferlike_pool(PARROT_INTERP, size_t buffer_size)
+Small_Object_Pool * get_bufferlike_pool(PARROT_INTERP, size_t buffer_size)
         __attribute__nonnull__(1);
 
 PARROT_CANNOT_RETURN_NULL
@@ -176,7 +176,7 @@
 #define ASSERT_ARGS_is_pmc_ptr __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(ptr)
-#define ASSERT_ARGS_make_bufferlike_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_get_bufferlike_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_new_buffer_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)

Modified: branches/pdd09gc_part2/src/headers.c
==============================================================================
--- branches/pdd09gc_part2/src/headers.c	(original)
+++ branches/pdd09gc_part2/src/headers.c	Sat Jan 10 14:05:52 2009
@@ -169,7 +169,7 @@
 =item C<Small_Object_Pool * new_bufferlike_pool>
 
 Creates a new pool for buffer-like structures. This is called from
-C<make_bufferlike_pool()>, and should probably not be called directly.
+C<get_bufferlike_pool()>, and should probably not be called directly.
 
 =cut
 
@@ -212,7 +212,7 @@
 new_buffer_pool(PARROT_INTERP)
 {
     ASSERT_ARGS(new_buffer_pool)
-    Small_Object_Pool * const pool = make_bufferlike_pool(interp, sizeof (Buffer));
+    Small_Object_Pool * const pool = get_bufferlike_pool(interp, sizeof (Buffer));
 
 #ifdef GC_IS_MALLOC
     pool->dod_object = Parrot_gc_free_buffer_malloc;
@@ -229,7 +229,7 @@
 =item C<Small_Object_Pool * new_string_pool>
 
 Creates a new pool for C<STRING>s and returns it. This calls
-C<make_bufferlike_pool> internally, which in turn calls C<new_bufferlike_pool>.
+C<get_bufferlike_pool> internally, which in turn calls C<new_bufferlike_pool>.
 
 =cut
 
@@ -247,7 +247,7 @@
         pool->mem_pool = interp->arena_base->constant_string_pool;
     }
     else
-        pool = make_bufferlike_pool(interp, sizeof (STRING));
+        pool = get_bufferlike_pool(interp, sizeof (STRING));
 
     pool->objects_per_alloc = STRING_HEADERS_PER_ALLOC;
 
@@ -257,7 +257,7 @@
 
 /*
 
-=item C<Small_Object_Pool * make_bufferlike_pool>
+=item C<Small_Object_Pool * get_bufferlike_pool>
 
 Makes and return a bufferlike header pool for objects of a given size. If a
 pool for objects of that size already exists, no new pool will be created and
@@ -270,9 +270,9 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 Small_Object_Pool *
-make_bufferlike_pool(PARROT_INTERP, size_t buffer_size)
+get_bufferlike_pool(PARROT_INTERP, size_t buffer_size)
 {
-    ASSERT_ARGS(make_bufferlike_pool)
+    ASSERT_ARGS(get_bufferlike_pool)
     Small_Object_Pool **sized_pools = interp->arena_base->sized_header_pools;
     const UINTVAL       num_old     = interp->arena_base->num_sized;
     const UINTVAL       idx         =
@@ -505,7 +505,7 @@
 new_bufferlike_header(PARROT_INTERP, size_t size)
 {
     ASSERT_ARGS(new_bufferlike_header)
-    Small_Object_Pool * const pool = make_bufferlike_pool(interp, size);
+    Small_Object_Pool * const pool = get_bufferlike_pool(interp, size);
 
     return get_free_buffer(interp, pool);
 }
@@ -1037,7 +1037,7 @@
 
         if (i >= dest_arena->num_sized
         || !dest_arena->sized_header_pools[i]) {
-            Small_Object_Pool *ignored = make_bufferlike_pool(dest_interp,
+            Small_Object_Pool *ignored = get_bufferlike_pool(dest_interp,
                     i * sizeof (void *) + sizeof (Buffer));
             UNUSED(ignored);
             PARROT_ASSERT(dest_arena->sized_header_pools[i]);

Modified: branches/pdd09gc_part2/src/pmc/array.pmc
==============================================================================
--- branches/pdd09gc_part2/src/pmc/array.pmc	(original)
+++ branches/pdd09gc_part2/src/pmc/array.pmc	Sat Jan 10 14:05:52 2009
@@ -121,9 +121,9 @@
     void class_init() {
         /* class_init_code; called for side effects */
         Small_Object_Pool *List_chunks =
-            make_bufferlike_pool(INTERP, sizeof (List_chunk));
+            get_bufferlike_pool(INTERP, sizeof (List_chunk));
         Small_Object_Pool *Lists       =
-            make_bufferlike_pool(INTERP, sizeof (List));
+            get_bufferlike_pool(INTERP, sizeof (List));
 
         /* XXX until there's a function to allocate a pool in an arena */
         UNUSED(List_chunks);

Modified: branches/pdd09gc_part2/src/stacks.c
==============================================================================
--- branches/pdd09gc_part2/src/stacks.c	(original)
+++ branches/pdd09gc_part2/src/stacks.c	Sat Jan 10 14:05:52 2009
@@ -103,7 +103,7 @@
 new_stack(PARROT_INTERP, ARGIN(const char *name))
 {
     ASSERT_ARGS(new_stack)
-    Small_Object_Pool * const pool = make_bufferlike_pool(interp, sizeof (Stack_Chunk_t));
+    Small_Object_Pool * const pool = get_bufferlike_pool(interp, sizeof (Stack_Chunk_t));
     Stack_Chunk_t     * const chunk = (Stack_Chunk_t *)(pool->get_free_object)(interp, pool);
 
     chunk->prev = chunk;        /* mark the top of the stack */

Modified: branches/pdd09gc_part2/src/stm/backend.c
==============================================================================
--- branches/pdd09gc_part2/src/stm/backend.c	(original)
+++ branches/pdd09gc_part2/src/stm/backend.c	Sat Jan 10 14:05:52 2009
@@ -298,7 +298,7 @@
     Small_Object_Pool *ignored;
     STM_TRACE("Parrot_STM_alloc");
 
-    ignored = make_bufferlike_pool(interp, sizeof (Parrot_STM_PMC_handle_data));
+    ignored = get_bufferlike_pool(interp, sizeof (Parrot_STM_PMC_handle_data));
     UNUSED(ignored);
     handle = (Parrot_STM_PMC_handle_data *)new_bufferlike_header(interp,
                 sizeof (Parrot_STM_PMC_handle_data));



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About