perl.cvs.parrot
[Top] [All Lists]

[svn:parrot] r24388 - in trunk: include/parrot src src/gc

Subject: [svn:parrot] r24388 - in trunk: include/parrot src src/gc
From:
Date: Mon, 31 Dec 2007 21:01:02 -0800 PST
Newsgroups: perl.cvs.parrot

Author: petdance
Date: Mon Dec 31 21:01:01 2007
New Revision: 24388

Modified:
   trunk/include/parrot/dod.h
   trunk/include/parrot/global.h
   trunk/include/parrot/memory.h
   trunk/include/parrot/register.h
   trunk/include/parrot/resources.h
   trunk/include/parrot/smallobject.h
   trunk/src/gc/dod.c
   trunk/src/gc/gc_gms.c
   trunk/src/gc/gc_ims.c
   trunk/src/gc/memory.c
   trunk/src/gc/register.c
   trunk/src/gc/resources.c
   trunk/src/gc/smallobject.c
   trunk/src/global.c

Log:
much memory-handling headerization

Modified: trunk/include/parrot/dod.h
==============================================================================
--- trunk/include/parrot/dod.h  (original)
+++ trunk/include/parrot/dod.h  Mon Dec 31 21:01:01 2007
@@ -66,32 +66,39 @@
         __attribute__nonnull__(1);
 
 void Parrot_dod_free_buffer(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(PObj *b))
+    ARGMOD(Small_Object_Pool *pool),
+    ARGMOD(PObj *b))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(3)
+        FUNC_MODIFIES(*pool)
+        FUNC_MODIFIES(*b);
 
 void Parrot_dod_free_buffer_malloc(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(PObj *b))
+    ARGIN(Small_Object_Pool *pool),
+    ARGMOD(PObj *b))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(3)
+        FUNC_MODIFIES(*b);
 
 void Parrot_dod_free_pmc(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(PObj *p))
+    ARGMOD(Small_Object_Pool *pool),
+    ARGMOD(PObj *p))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(3)
+        FUNC_MODIFIES(*pool)
+        FUNC_MODIFIES(*p);
 
 void Parrot_dod_free_sysmem(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(PObj *b))
+    ARGMOD(Small_Object_Pool *pool),
+    ARGMOD(PObj *b))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(3)
+        FUNC_MODIFIES(*pool)
+        FUNC_MODIFIES(*b);
 
 void Parrot_dod_ms_run(PARROT_INTERP, int flags)
         __attribute__nonnull__(1);
@@ -119,9 +126,10 @@
 int Parrot_dod_trace_root(PARROT_INTERP, int trace_stack)
         __attribute__nonnull__(1);
 
-void Parrot_free_pmc_ext(PARROT_INTERP, NOTNULL(PMC *p))
+void Parrot_free_pmc_ext(PARROT_INTERP, ARGMOD(PMC *p))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*p);
 
 void trace_mem_block(PARROT_INTERP, size_t lo_var_ptr, size_t hi_var_ptr)
         __attribute__nonnull__(1);
@@ -185,10 +193,12 @@
 
 /* HEADERIZER BEGIN: src/gc/gc_ims.c */
 
-void Parrot_dod_ims_wb(PARROT_INTERP, NOTNULL(PMC *agg), NOTNULL(PMC *_new))
+void Parrot_dod_ims_wb(PARROT_INTERP, ARGMOD(PMC *agg), ARGMOD(PMC *_new))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(3)
+        FUNC_MODIFIES(*agg)
+        FUNC_MODIFIES(*_new);
 
 void Parrot_gc_ims_init(PARROT_INTERP)
         __attribute__nonnull__(1);

Modified: trunk/include/parrot/global.h
==============================================================================
--- trunk/include/parrot/global.h       (original)
+++ trunk/include/parrot/global.h       Mon Dec 31 21:01:01 2007
@@ -36,7 +36,7 @@
 PARROT_CAN_RETURN_NULL
 PMC * Parrot_find_global_n(PARROT_INTERP,
     ARGIN_NULLOK(PMC *ns),
-    NULLOK(STRING *globalname))
+    ARGIN_NULLOK(STRING *globalname))
         __attribute__nonnull__(1);
 
 PARROT_API
@@ -45,7 +45,7 @@
 PMC * Parrot_find_global_op(PARROT_INTERP,
     ARGIN(PMC *ns),
     ARGIN(STRING *globalname),
-    NULLOK(void *next))
+    ARGIN_NULLOK(void *next))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3);
@@ -71,22 +71,22 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC * Parrot_get_global(PARROT_INTERP,
-    NULLOK(PMC *ns),
-    NULLOK(STRING *globalname))
+    ARGIN_NULLOK(PMC *ns),
+    ARGIN_NULLOK(STRING *globalname))
         __attribute__nonnull__(1);
 
 PARROT_API
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
-PMC * Parrot_get_namespace_autobase(PARROT_INTERP, NULLOK(PMC *key))
+PMC * Parrot_get_namespace_autobase(PARROT_INTERP, ARGIN_NULLOK(PMC *key))
         __attribute__nonnull__(1);
 
 PARROT_API
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC * Parrot_get_namespace_keyed(PARROT_INTERP,
-    NOTNULL(PMC *base_ns),
-    NULLOK(PMC *pmc_key))
+    ARGIN(PMC *base_ns),
+    ARGIN_NULLOK(PMC *pmc_key))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
@@ -94,23 +94,23 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC * Parrot_get_namespace_keyed_str(PARROT_INTERP,
-    NOTNULL(PMC *base_ns),
-    NULLOK(STRING *str_key))
+    ARGIN(PMC *base_ns),
+    ARGIN_NULLOK(STRING *str_key))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 PARROT_API
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
-PMC * Parrot_make_namespace_autobase(PARROT_INTERP, NULLOK(PMC *key))
+PMC * Parrot_make_namespace_autobase(PARROT_INTERP, ARGIN_NULLOK(PMC *key))
         __attribute__nonnull__(1);
 
 PARROT_API
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC * Parrot_make_namespace_keyed(PARROT_INTERP,
-    NOTNULL(PMC *base_ns),
-    NULLOK(PMC *pmc_key))
+    ARGIN(PMC *base_ns),
+    ARGIN_NULLOK(PMC *pmc_key))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
@@ -118,48 +118,48 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC * Parrot_make_namespace_keyed_str(PARROT_INTERP,
-    NOTNULL(PMC *base_ns),
-    NULLOK(STRING *str_key))
+    ARGIN(PMC *base_ns),
+    ARGIN_NULLOK(STRING *str_key))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 PARROT_API
 void Parrot_set_global(PARROT_INTERP,
-    NULLOK(PMC *ns),
-    NULLOK(STRING *globalname),
-    NULLOK(PMC *val))
+    ARGIN_NULLOK(PMC *ns),
+    ARGIN_NULLOK(STRING *globalname),
+    ARGIN_NULLOK(PMC *val))
         __attribute__nonnull__(1);
 
 PARROT_API
 void Parrot_store_global_cur(PARROT_INTERP,
-    NULLOK(STRING *globalname),
-    NULLOK(PMC *val))
+    ARGIN_NULLOK(STRING *globalname),
+    ARGIN_NULLOK(PMC *val))
         __attribute__nonnull__(1);
 
 PARROT_API
 void Parrot_store_global_k(PARROT_INTERP,
     ARGIN(PMC *pmc_key),
-    NULLOK(STRING *globalname),
-    NULLOK(PMC *val))
+    ARGIN_NULLOK(STRING *globalname),
+    ARGIN_NULLOK(PMC *val))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 PARROT_API
 void Parrot_store_global_n(PARROT_INTERP,
-    NULLOK(PMC *ns),
-    NULLOK(STRING *globalname),
-    NULLOK(PMC *val))
+    ARGIN_NULLOK(PMC *ns),
+    ARGIN_NULLOK(STRING *globalname),
+    ARGIN_NULLOK(PMC *val))
         __attribute__nonnull__(1);
 
 PARROT_API
 void Parrot_store_global_s(PARROT_INTERP,
-    NULLOK(STRING *str_key),
-    NULLOK(STRING *globalname),
-    NULLOK(PMC *val))
+    ARGIN_NULLOK(STRING *str_key),
+    ARGIN_NULLOK(STRING *globalname),
+    ARGIN_NULLOK(PMC *val))
         __attribute__nonnull__(1);
 
 PARROT_API
-void Parrot_store_sub_in_namespace(PARROT_INTERP, NOTNULL(PMC *sub))
+void Parrot_store_sub_in_namespace(PARROT_INTERP, ARGIN(PMC *sub))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 

Modified: trunk/include/parrot/memory.h
==============================================================================
--- trunk/include/parrot/memory.h       (original)
+++ trunk/include/parrot/memory.h       Mon Dec 31 21:01:01 2007
@@ -43,13 +43,13 @@
 PARROT_API
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
-void * mem__sys_realloc(NULLOK(void *from), size_t size);
+void * mem__sys_realloc(ARGIN_NULLOK(void *from), size_t size);
 
 PARROT_API
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 void * mem__sys_realloc_zeroed(
-    NULLOK(void *from),
+    ARGIN_NULLOK(void *from),
     size_t size,
     size_t old_size);
 
@@ -64,7 +64,7 @@
 void * mem_sys_allocate_zeroed(size_t size);
 
 PARROT_API
-void mem_sys_free(NULLOK(void *from));
+void mem_sys_free(ARGIN_NULLOK(void *from));
 
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
@@ -83,7 +83,7 @@
         __attribute__nonnull__(2);
 
 void mem__internal_free(
-    NULLOK(void *from),
+    ARGIN_NULLOK(void *from),
     ARGIN(const char *file),
     int line)
         __attribute__nonnull__(2);
@@ -91,7 +91,7 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 void * mem__internal_realloc(
-    NOTNULL(void *from),
+    ARGIN(void *from),
     size_t size,
     ARGIN(const char *file),
     int line)

Modified: trunk/include/parrot/register.h
==============================================================================
--- trunk/include/parrot/register.h     (original)
+++ trunk/include/parrot/register.h     Mon Dec 31 21:01:01 2007
@@ -80,10 +80,11 @@
 
 PARROT_API
 void Parrot_free_context(PARROT_INTERP,
-    NOTNULL(struct Parrot_Context *ctxp),
+    ARGMOD(struct Parrot_Context *ctxp),
     int re_use)
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*ctxp);
 
 PARROT_API
 void parrot_gc_context(PARROT_INTERP)
@@ -101,18 +102,18 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 struct Parrot_Context * Parrot_push_context(PARROT_INTERP,
-    NOTNULL(INTVAL *n_regs_used))
+    ARGMOD(INTVAL *n_regs_used))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*n_regs_used);
 
 PARROT_API
 void Parrot_push_regs(PARROT_INTERP)
         __attribute__nonnull__(1);
 
 PARROT_API
-void Parrot_set_context_threshold(PARROT_INTERP,
-    NULLOK(struct Parrot_Context *ctxp))
-        __attribute__nonnull__(1);
+void Parrot_set_context_threshold(SHIM_INTERP,
+    SHIM(struct Parrot_Context *ctxp));
 
 void create_initial_context(PARROT_INTERP)
         __attribute__nonnull__(1);
@@ -120,16 +121,18 @@
 void destroy_context(PARROT_INTERP)
         __attribute__nonnull__(1);
 
-void mark_register_stack(PARROT_INTERP, NOTNULL(Stack_Chunk_t* chunk))
+void mark_register_stack(PARROT_INTERP, ARGMOD(Stack_Chunk_t* chunk))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*chunk);
 
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
 struct Parrot_Context * Parrot_alloc_context(PARROT_INTERP,
-    NOTNULL(INTVAL *number_regs_used))
+    ARGMOD(INTVAL *number_regs_used))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*number_regs_used);
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL

Modified: trunk/include/parrot/resources.h
==============================================================================
--- trunk/include/parrot/resources.h    (original)
+++ trunk/include/parrot/resources.h    Mon Dec 31 21:01:01 2007
@@ -72,10 +72,10 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-void Parrot_reallocate(PARROT_INTERP,
-    ARGINOUT(Buffer *buffer),
-    size_t tosize)
-        __attribute__nonnull__(1);
+void Parrot_reallocate(PARROT_INTERP, ARGMOD(Buffer *buffer), size_t tosize)
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*buffer);
 
 void Parrot_reallocate_string(PARROT_INTERP,
     ARGMOD(STRING *str),

Modified: trunk/include/parrot/smallobject.h
==============================================================================
--- trunk/include/parrot/smallobject.h  (original)
+++ trunk/include/parrot/smallobject.h  Mon Dec 31 21:01:01 2007
@@ -143,8 +143,9 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-void gc_pmc_ext_pool_init(NOTNULL(Small_Object_Pool *pool))
-        __attribute__nonnull__(1);
+void gc_pmc_ext_pool_init(ARGMOD(Small_Object_Pool *pool))
+        __attribute__nonnull__(1)
+        FUNC_MODIFIES(*pool);
 
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
@@ -153,33 +154,39 @@
     size_t objects_per_alloc);
 
 void Parrot_add_to_free_list(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(Small_Object_Arena *arena))
+    ARGMOD(Small_Object_Pool *pool),
+    ARGMOD(Small_Object_Arena *arena))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(3)
+        FUNC_MODIFIES(*pool)
+        FUNC_MODIFIES(*arena);
 
 void Parrot_append_arena_in_pool(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(Small_Object_Arena *new_arena),
+    ARGMOD(Small_Object_Pool *pool),
+    ARGMOD(Small_Object_Arena *new_arena),
     size_t size)
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(3)
+        FUNC_MODIFIES(*pool)
+        FUNC_MODIFIES(*new_arena);
 
 void Parrot_gc_ms_init(PARROT_INTERP)
         __attribute__nonnull__(1);
 
-int Parrot_is_const_pmc(PARROT_INTERP, NOTNULL(PMC *pmc))
+int Parrot_is_const_pmc(PARROT_INTERP, ARGIN(const PMC *pmc))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 void Parrot_small_object_pool_merge(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *dest),
-    NOTNULL(Small_Object_Pool *source))
+    ARGMOD(Small_Object_Pool *dest),
+    ARGMOD(Small_Object_Pool *source))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(3)
+        FUNC_MODIFIES(*dest)
+        FUNC_MODIFIES(*source);
 
 /* HEADERIZER END: src/gc/smallobject.c */
 

Modified: trunk/src/gc/dod.c
==============================================================================
--- trunk/src/gc/dod.c  (original)
+++ trunk/src/gc/dod.c  Mon Dec 31 21:01:01 2007
@@ -672,10 +672,10 @@
 */
 
 void
-Parrot_dod_free_pmc(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(PObj *p))
+Parrot_dod_free_pmc(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool),
+        ARGMOD(PObj *p))
 {
-    PMC           *pmc        = (PMC *)p;
+    PMC    * const pmc        = (PMC *)p;
     Arenas * const arena_base = interp->arena_base;
 
     /* TODO collect objects with finalizers */
@@ -709,7 +709,7 @@
 */
 
 void
-Parrot_free_pmc_ext(PARROT_INTERP, NOTNULL(PMC *p))
+Parrot_free_pmc_ext(PARROT_INTERP, ARGMOD(PMC *p))
 {
     /* if the PMC has a PMC_EXT structure, return it to the pool/arena */
     Arenas            * const arena_base = interp->arena_base;
@@ -738,8 +738,8 @@
 */
 
 void
-Parrot_dod_free_sysmem(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(PObj *b))
+Parrot_dod_free_sysmem(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool),
+        ARGMOD(PObj *b))
 {
     /* has sysmem allocated, e.g. string_pin */
     if (PObj_sysmem_TEST(b) && PObj_bufstart(b))
@@ -760,8 +760,8 @@
 */
 
 void
-Parrot_dod_free_buffer_malloc(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(PObj *b))
+Parrot_dod_free_buffer_malloc(PARROT_INTERP, ARGIN(Small_Object_Pool *pool),
+        ARGMOD(PObj *b))
 {
 
     /* free allocated space at (int *)bufstart - 1, but not if it used COW or 
is
@@ -772,11 +772,10 @@
         return;
 
     if (PObj_COW_TEST(b)) {
-        INTVAL *refcount = PObj_bufrefcountptr(b);
+        INTVAL * const refcount = PObj_bufrefcountptr(b);
 
-        if (!--(*refcount)) {
+        if (--(*refcount) == 0) {
             free(refcount); /* the actual bufstart */
-            refcount = NULL;
         }
     }
     else
@@ -794,10 +793,10 @@
 */
 
 void
-Parrot_dod_free_buffer(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(PObj *b))
+Parrot_dod_free_buffer(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool),
+        ARGMOD(PObj *b))
 {
-    Memory_Pool *mem_pool = (Memory_Pool *)pool->mem_pool;
+    Memory_Pool * const mem_pool = (Memory_Pool *)pool->mem_pool;
 
     /* XXX Jarkko reported that on irix pool->mem_pool was NULL, which really
      * shouldn't happen */

Modified: trunk/src/gc/gc_gms.c
==============================================================================
--- trunk/src/gc/gc_gms.c       (original)
+++ trunk/src/gc/gc_gms.c       Mon Dec 31 21:01:01 2007
@@ -124,12 +124,12 @@
 /* HEADERIZER BEGIN: static */
 
 static int end_cycle_cb(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
+    ARGMOD(Small_Object_Pool *pool),
     int flag,
-    NOTNULL(void *arg))
+    SHIM(void *arg))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(4);
+        FUNC_MODIFIES(*pool);
 
 static void gc_gms_add_free_object(PARROT_INTERP,
     NOTNULL(Small_Object_Pool *pool),
@@ -194,12 +194,12 @@
         __attribute__nonnull__(1);
 
 static void gc_gms_merge_gen(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
+    ARGMOD(Small_Object_Pool *pool),
     int flag,
-    NOTNULL(Gc_gms_plan *plan))
+    SHIM(Gc_gms_plan *plan))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(4);
+        FUNC_MODIFIES(*pool);
 
 static void gc_gms_more_objects(PARROT_INTERP,
     NOTNULL(Small_Object_Pool *pool))
@@ -253,12 +253,13 @@
         __attribute__nonnull__(1);
 
 static void gc_gms_use_gen(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
+    ARGMOD(Small_Object_Pool *pool),
     int flag,
-    NOTNULL(Gc_gms_plan *plan))
+    ARGIN(const Gc_gms_plan *plan))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(4);
+        __attribute__nonnull__(4)
+        FUNC_MODIFIES(*pool);
 
 static void gms_debug_verify(PARROT_INTERP,
     NOTNULL(Small_Object_Pool *pool),
@@ -283,9 +284,9 @@
 
 PARROT_WARN_UNUSED_RESULT
 static int set_gen_cb(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
+    ARGIN(Small_Object_Pool *pool),
     int flag,
-    NOTNULL(void *arg))
+    ARGIN(void *arg))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(4);
@@ -1008,8 +1009,8 @@
 */
 
 static void
-gc_gms_merge_gen(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool),
-        int flag, NOTNULL(Gc_gms_plan *plan))
+gc_gms_merge_gen(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool),
+        int flag, SHIM(Gc_gms_plan *plan))
 {
     Gc_gms_hdr *h;
 
@@ -1042,8 +1043,8 @@
 */
 
 static void
-gc_gms_use_gen(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool),
-        int flag, NOTNULL(Gc_gms_plan *plan))
+gc_gms_use_gen(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool),
+        int flag, ARGIN(const Gc_gms_plan *plan))
 {
     Gc_gms_gen *gen, *prev;
     UINTVAL next_gen;
@@ -1079,7 +1080,7 @@
 
 PARROT_WARN_UNUSED_RESULT
 static int
-set_gen_cb(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool), int flag, 
NOTNULL(void *arg))
+set_gen_cb(PARROT_INTERP, ARGIN(Small_Object_Pool *pool), int flag, ARGIN(void 
*arg))
 {
     Gc_gms_plan * const plan = (Gc_gms_plan *)arg;
 
@@ -1662,7 +1663,7 @@
 */
 
 static int
-end_cycle_cb(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool), int flag, 
NOTNULL(void *arg))
+end_cycle_cb(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int flag, 
SHIM(void *arg))
 {
     Gc_gms_hdr *h;
     /*

Modified: trunk/src/gc/gc_ims.c
==============================================================================
--- trunk/src/gc/gc_ims.c       (original)
+++ trunk/src/gc/gc_ims.c       Mon Dec 31 21:01:01 2007
@@ -341,34 +341,39 @@
 /* HEADERIZER BEGIN: static */
 
 static int collect_cb(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
+    ARGMOD(Small_Object_Pool *pool),
     int flag,
-    NOTNULL(void *arg))
+    ARGIN(const void *arg))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(4);
+        __attribute__nonnull__(4)
+        FUNC_MODIFIES(*pool);
 
 static void gc_ims_add_free_object(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(PObj *to_add))
+    ARGMOD(Small_Object_Pool *pool),
+    ARGIN(PObj *to_add))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(3)
+        FUNC_MODIFIES(*pool);
 
 static void gc_ims_alloc_objects(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool))
+    ARGMOD(Small_Object_Pool *pool))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*pool);
 
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
 static PObj * gc_ims_get_free_object(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool))
+    ARGMOD(Small_Object_Pool *pool))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*pool);
 
-static void gc_ims_pool_init(SHIM_INTERP, NOTNULL(Small_Object_Pool *pool))
-        __attribute__nonnull__(2);
+static void gc_ims_pool_init(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool))
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*pool);
 
 static int parrot_gc_ims_collect(PARROT_INTERP, int check_only)
         __attribute__nonnull__(1);
@@ -392,12 +397,13 @@
         __attribute__nonnull__(1);
 
 static int sweep_cb(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
+    ARGMOD(Small_Object_Pool *pool),
     int flag,
-    NOTNULL(void *arg))
+    ARGIN(const void *arg))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(4);
+        __attribute__nonnull__(4)
+        FUNC_MODIFIES(*pool);
 
 /* HEADERIZER END: static */
 
@@ -479,7 +485,7 @@
 */
 
 static void
-gc_ims_add_free_object(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool), 
NOTNULL(PObj *to_add))
+gc_ims_add_free_object(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), 
ARGIN(PObj *to_add))
 {
     *(void **)to_add = pool->free_list;
     pool->free_list  = to_add;
@@ -508,7 +514,7 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
 static PObj *
-gc_ims_get_free_object(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool))
+gc_ims_get_free_object(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool))
 {
     PObj *ptr;
     Arenas * const arena_base    = interp->arena_base;
@@ -544,7 +550,7 @@
 */
 
 static void
-gc_ims_alloc_objects(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool))
+gc_ims_alloc_objects(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool))
 {
     Small_Object_Arena *new_arena;
     size_t size;
@@ -572,7 +578,7 @@
 */
 
 static void
-gc_ims_pool_init(SHIM_INTERP, NOTNULL(Small_Object_Pool *pool))
+gc_ims_pool_init(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool))
 {
     pool->add_free_object = gc_ims_add_free_object;
     pool->get_free_object = gc_ims_get_free_object;
@@ -713,7 +719,7 @@
 */
 
 static int
-sweep_cb(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool), int flag, 
NOTNULL(void *arg))
+sweep_cb(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int flag, ARGIN(const 
void *arg))
 {
     int * const n_obj = (int *) arg;
 
@@ -783,14 +789,13 @@
 
 #if !defined(GC_IS_MALLOC) || !GC_IS_MALLOC
 static int
-collect_cb(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool), int flag, 
NOTNULL(void *arg))
+collect_cb(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool), int flag, 
ARGIN(const void *arg))
 {
     const int check_only = (int)(INTVAL)arg;
-    Memory_Pool *mem_pool;
+    Memory_Pool * const mem_pool = pool->mem_pool;
     /*
      * check if there is an associated memory pool
      */
-    mem_pool = pool->mem_pool;
     if (!mem_pool)
         return 0;
     /*
@@ -1038,7 +1043,7 @@
 #define DOD_IMS_GREY_NEW 1
 
 void
-Parrot_dod_ims_wb(PARROT_INTERP, NOTNULL(PMC *agg), NOTNULL(PMC *_new))
+Parrot_dod_ims_wb(PARROT_INTERP, ARGMOD(PMC *agg), ARGMOD(PMC *_new))
 {
 #if DOD_IMS_GREY_NEW
     IMS_DEBUG((stderr, "%d agg %p mark %p\n",

Modified: trunk/src/gc/memory.c
==============================================================================
--- trunk/src/gc/memory.c       (original)
+++ trunk/src/gc/memory.c       Mon Dec 31 21:01:01 2007
@@ -146,7 +146,7 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 void *
-mem__sys_realloc(NULLOK(void *from), size_t size)
+mem__sys_realloc(ARGIN_NULLOK(void *from), size_t size)
 {
     void *ptr;
 #ifdef DETAIL_MEMORY_DEBUG
@@ -176,7 +176,7 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 void *
-mem__sys_realloc_zeroed(NULLOK(void *from), size_t size, size_t old_size)
+mem__sys_realloc_zeroed(ARGIN_NULLOK(void *from), size_t size, size_t old_size)
 {
     void *ptr;
 #ifdef DETAIL_MEMORY_DEBUG
@@ -208,7 +208,7 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 void *
-mem__internal_realloc(NOTNULL(void *from), size_t size,
+mem__internal_realloc(ARGIN(void *from), size_t size,
         ARGIN(const char *file), int line)
 {
     void * const ptr = realloc(from, size);
@@ -238,7 +238,7 @@
 
 PARROT_API
 void
-mem_sys_free(NULLOK(void *from))
+mem_sys_free(ARGIN_NULLOK(void *from))
 {
 #ifdef DETAIL_MEMORY_DEBUG
     fprintf(stderr, "Freed %p\n", from);
@@ -258,7 +258,7 @@
 */
 
 void
-mem__internal_free(NULLOK(void *from), ARGIN(const char *file), int line)
+mem__internal_free(ARGIN_NULLOK(void *from), ARGIN(const char *file), int line)
 {
 #ifdef DETAIL_MEMORY_DEBUG
     fprintf(stderr, "Internal free of %p (%s/%d)\n", from, file, line);

Modified: trunk/src/gc/register.c
==============================================================================
--- trunk/src/gc/register.c     (original)
+++ trunk/src/gc/register.c     Mon Dec 31 21:01:01 2007
@@ -30,15 +30,17 @@
 
 /* HEADERIZER BEGIN: static */
 
-static void clear_regs(PARROT_INTERP, NOTNULL(parrot_context_t *ctx))
+static void clear_regs(PARROT_INTERP, ARGMOD(parrot_context_t *ctx))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*ctx);
 
 static void init_context(PARROT_INTERP,
-    NOTNULL(parrot_context_t *ctx),
+    ARGMOD(parrot_context_t *ctx),
     ARGIN_NULLOK(const parrot_context_t *old))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*ctx);
 
 /* HEADERIZER END: static */
 
@@ -236,7 +238,7 @@
 */
 
 static void
-clear_regs(PARROT_INTERP, NOTNULL(parrot_context_t *ctx))
+clear_regs(PARROT_INTERP, ARGMOD(parrot_context_t *ctx))
 {
     int i;
 
@@ -285,7 +287,7 @@
 */
 
 static void
-init_context(PARROT_INTERP, NOTNULL(parrot_context_t *ctx),
+init_context(PARROT_INTERP, ARGMOD(parrot_context_t *ctx),
         ARGIN_NULLOK(const parrot_context_t *old))
 {
     ctx->ref_count = 0;                 /* RT#46191 1 - Exceptions !!! */
@@ -375,7 +377,7 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 struct Parrot_Context *
-Parrot_push_context(PARROT_INTERP, NOTNULL(INTVAL *n_regs_used))
+Parrot_push_context(PARROT_INTERP, ARGMOD(INTVAL *n_regs_used))
 {
     Parrot_Context * const old = CONTEXT(interp->ctx);
     Parrot_Context * const ctx = Parrot_alloc_context(interp, n_regs_used);
@@ -430,7 +432,7 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
 struct Parrot_Context *
-Parrot_alloc_context(PARROT_INTERP, NOTNULL(INTVAL *number_regs_used))
+Parrot_alloc_context(PARROT_INTERP, ARGMOD(INTVAL *number_regs_used))
 {
     Parrot_Context *old, *ctx;
     void *ptr, *p;
@@ -535,7 +537,7 @@
 
 PARROT_API
 void
-Parrot_free_context(PARROT_INTERP, NOTNULL(struct Parrot_Context *ctxp), int 
re_use)
+Parrot_free_context(PARROT_INTERP, ARGMOD(struct Parrot_Context *ctxp), int 
re_use)
 {
     /*
      * The context structure has a reference count, initially 0.  This field is
@@ -595,10 +597,8 @@
 
 PARROT_API
 void
-Parrot_set_context_threshold(PARROT_INTERP, NULLOK(struct Parrot_Context 
*ctxp))
+Parrot_set_context_threshold(SHIM_INTERP, SHIM(struct Parrot_Context *ctxp))
 {
-    UNUSED(interp);
-    UNUSED(ctxp);
     /* nothing to do */
 }
 
@@ -726,7 +726,7 @@
 */
 
 void
-mark_register_stack(PARROT_INTERP, NOTNULL(Stack_Chunk_t* chunk))
+mark_register_stack(PARROT_INTERP, ARGMOD(Stack_Chunk_t* chunk))
 {
     for (; ; chunk = chunk->prev) {
         int i;

Modified: trunk/src/gc/resources.c
==============================================================================
--- trunk/src/gc/resources.c    (original)
+++ trunk/src/gc/resources.c    Mon Dec 31 21:01:01 2007
@@ -51,10 +51,12 @@
 
 static void alloc_new_block(PARROT_INTERP,
     size_t size,
-    ARGINOUT(Memory_Pool *pool),
+    ARGMOD(Memory_Pool *pool),
     ARGIN(const char *why))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(4);
+        __attribute__nonnull__(3)
+        __attribute__nonnull__(4)
+        FUNC_MODIFIES(*pool);
 
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
@@ -62,8 +64,10 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-static void compact_pool(PARROT_INTERP, ARGINOUT(Memory_Pool *pool))
-        __attribute__nonnull__(1);
+static void compact_pool(PARROT_INTERP, ARGMOD(Memory_Pool *pool))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*pool);
 
 static void debug_print_buf(PARROT_INTERP, ARGIN(const PObj *b))
         __attribute__nonnull__(1)
@@ -73,12 +77,18 @@
 PARROT_CANNOT_RETURN_NULL
 static void * mem_allocate(PARROT_INTERP,
     size_t size,
-    ARGINOUT(Memory_Pool *pool))
-        __attribute__nonnull__(1);
+    ARGMOD(Memory_Pool *pool))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(3)
+        FUNC_MODIFIES(*pool);
 
 static void merge_pools(
-    ARGINOUT(Memory_Pool *dest),
-    ARGINOUT(Memory_Pool *source));
+    ARGMOD(Memory_Pool *dest),
+    ARGMOD(Memory_Pool *source))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*dest)
+        FUNC_MODIFIES(*source);
 
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
@@ -101,7 +111,7 @@
 */
 
 static void
-alloc_new_block(PARROT_INTERP, size_t size, ARGINOUT(Memory_Pool *pool),
+alloc_new_block(PARROT_INTERP, size_t size, ARGMOD(Memory_Pool *pool),
         ARGIN(const char *why))
 {
     Memory_Block *new_block;
@@ -186,7 +196,7 @@
 PARROT_MALLOC
 PARROT_CANNOT_RETURN_NULL
 static void *
-mem_allocate(PARROT_INTERP, size_t size, ARGINOUT(Memory_Pool *pool))
+mem_allocate(PARROT_INTERP, size_t size, ARGMOD(Memory_Pool *pool))
 {
     void *return_val;
 
@@ -311,7 +321,7 @@
 */
 
 static void
-compact_pool(PARROT_INTERP, ARGINOUT(Memory_Pool *pool))
+compact_pool(PARROT_INTERP, ARGMOD(Memory_Pool *pool))
 {
     INTVAL        j;
     UINTVAL       object_size;
@@ -666,7 +676,7 @@
 */
 
 void
-Parrot_reallocate(PARROT_INTERP, ARGINOUT(Buffer *buffer), size_t tosize)
+Parrot_reallocate(PARROT_INTERP, ARGMOD(Buffer *buffer), size_t tosize)
 {
     size_t copysize;
     char  *mem;
@@ -978,7 +988,7 @@
 */
 
 static void
-merge_pools(ARGINOUT(Memory_Pool *dest), ARGINOUT(Memory_Pool *source))
+merge_pools(ARGMOD(Memory_Pool *dest), ARGMOD(Memory_Pool *source))
 {
     Memory_Block *cur_block;
 

Modified: trunk/src/gc/smallobject.c
==============================================================================
--- trunk/src/gc/smallobject.c  (original)
+++ trunk/src/gc/smallobject.c  Mon Dec 31 21:01:01 2007
@@ -33,19 +33,22 @@
         FUNC_MODIFIES(*pool);
 
 static void gc_ms_alloc_objects(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool))
+    ARGMOD(Small_Object_Pool *pool))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*pool);
 
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
 static PObj * gc_ms_get_free_object(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool))
+    ARGMOD(Small_Object_Pool *pool))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*pool);
 
-static void gc_ms_pool_init(SHIM_INTERP, NOTNULL(Small_Object_Pool *pool))
-        __attribute__nonnull__(2);
+static void gc_ms_pool_init(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool))
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*pool);
 
 static void more_traceable_objects(PARROT_INTERP,
     ARGMOD(Small_Object_Pool *pool))
@@ -107,7 +110,7 @@
 */
 
 int
-Parrot_is_const_pmc(PARROT_INTERP, NOTNULL(PMC *pmc))
+Parrot_is_const_pmc(PARROT_INTERP, ARGIN(const PMC *pmc))
 {
     Small_Object_Pool * const pool = interp->arena_base->constant_pmc_pool;
     const               int   c    = contained_in_pool(pool, pmc);
@@ -182,7 +185,7 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
 static PObj *
-gc_ms_get_free_object(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool))
+gc_ms_get_free_object(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool))
 {
     PObj *ptr;
     PObj *free_list = (PObj *)pool->free_list;
@@ -215,8 +218,8 @@
 
 void
 Parrot_add_to_free_list(PARROT_INTERP,
-        NOTNULL(Small_Object_Pool  *pool),
-        NOTNULL(Small_Object_Arena *arena))
+        ARGMOD(Small_Object_Pool  *pool),
+        ARGMOD(Small_Object_Arena *arena))
 {
     UINTVAL  i;
     PObj    *object;
@@ -253,8 +256,8 @@
 */
 void
 Parrot_append_arena_in_pool(PARROT_INTERP,
-    NOTNULL(Small_Object_Pool *pool),
-    NOTNULL(Small_Object_Arena *new_arena), size_t size)
+    ARGMOD(Small_Object_Pool *pool),
+    ARGMOD(Small_Object_Arena *new_arena), size_t size)
 {
 
     /* Maintain the *_arena_memory invariant for stack walking code. Set it
@@ -290,7 +293,7 @@
 */
 
 static void
-gc_ms_alloc_objects(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool))
+gc_ms_alloc_objects(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool))
 {
     size_t  size;
 
@@ -369,7 +372,7 @@
 */
 
 void
-gc_pmc_ext_pool_init(NOTNULL(Small_Object_Pool *pool))
+gc_pmc_ext_pool_init(ARGMOD(Small_Object_Pool *pool))
 {
     pool->add_free_object = gc_ms_add_free_object;
     pool->get_free_object = gc_ms_get_free_object;
@@ -388,7 +391,7 @@
 */
 
 static void
-gc_ms_pool_init(SHIM_INTERP, NOTNULL(Small_Object_Pool *pool))
+gc_ms_pool_init(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool))
 {
     pool->add_free_object = gc_ms_add_free_object;
     pool->get_free_object = gc_ms_get_free_object;
@@ -431,7 +434,7 @@
 
 void
 Parrot_small_object_pool_merge(PARROT_INTERP,
-        NOTNULL(Small_Object_Pool *dest), NOTNULL(Small_Object_Pool *source))
+        ARGMOD(Small_Object_Pool *dest), ARGMOD(Small_Object_Pool *source))
 {
     Small_Object_Arena  *cur_arena;
     void               **free_list_end;

Modified: trunk/src/global.c
==============================================================================
--- trunk/src/global.c  (original)
+++ trunk/src/global.c  Mon Dec 31 21:01:01 2007
@@ -24,23 +24,24 @@
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
-static PMC * get_namespace_pmc(PARROT_INTERP, NOTNULL(PMC *sub))
+static PMC * get_namespace_pmc(PARROT_INTERP, ARGIN(PMC *sub))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 static PMC * internal_ns_keyed(PARROT_INTERP,
-    NOTNULL(PMC *base_ns),
-    NULLOK(PMC *pmc_key),
-    NULLOK(STRING *str_key),
+    ARGIN(PMC *base_ns),
+    ARGIN(PMC *pmc_key),
+    ARGIN_NULLOK(STRING *str_key),
     int flags)
         __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3);
 
 static void store_sub_in_multi(PARROT_INTERP,
-    NOTNULL(PMC *sub),
-    NOTNULL(PMC *ns))
+    ARGIN(PMC *sub),
+    ARGIN(PMC *ns))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3);
@@ -67,8 +68,8 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 static PMC *
-internal_ns_keyed(PARROT_INTERP, NOTNULL(PMC *base_ns), NULLOK(PMC *pmc_key),
-                               NULLOK(STRING *str_key), int flags)
+internal_ns_keyed(PARROT_INTERP, ARGIN(PMC *base_ns), ARGIN(PMC *pmc_key),
+                               ARGIN_NULLOK(STRING *str_key), int flags)
 {
     PMC *ns, *sub_ns;
     INTVAL i, n;
@@ -149,7 +150,7 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC *
-Parrot_get_namespace_keyed(PARROT_INTERP, NOTNULL(PMC *base_ns), NULLOK(PMC 
*pmc_key))
+Parrot_get_namespace_keyed(PARROT_INTERP, ARGIN(PMC *base_ns), 
ARGIN_NULLOK(PMC *pmc_key))
 {
     return internal_ns_keyed(interp, base_ns, pmc_key, NULL, 0);
 }
@@ -169,7 +170,8 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC *
-Parrot_get_namespace_keyed_str(PARROT_INTERP, NOTNULL(PMC *base_ns), 
NULLOK(STRING *str_key))
+Parrot_get_namespace_keyed_str(PARROT_INTERP, ARGIN(PMC *base_ns),
+        ARGIN_NULLOK(STRING *str_key))
 {
     return internal_ns_keyed(interp, base_ns, PMCNULL, str_key, 0);
 }
@@ -190,7 +192,8 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC *
-Parrot_make_namespace_keyed(PARROT_INTERP, NOTNULL(PMC *base_ns), NULLOK(PMC 
*pmc_key))
+Parrot_make_namespace_keyed(PARROT_INTERP, ARGIN(PMC *base_ns),
+        ARGIN_NULLOK(PMC *pmc_key))
 {
     return internal_ns_keyed(interp, base_ns, pmc_key, NULL, INTERN_NS_CREAT);
 }
@@ -211,7 +214,8 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC *
-Parrot_make_namespace_keyed_str(PARROT_INTERP, NOTNULL(PMC *base_ns), 
NULLOK(STRING *str_key))
+Parrot_make_namespace_keyed_str(PARROT_INTERP, ARGIN(PMC *base_ns),
+        ARGIN_NULLOK(STRING *str_key))
 {
     return internal_ns_keyed(interp, base_ns, NULL, str_key, INTERN_NS_CREAT);
 }
@@ -234,7 +238,7 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC *
-Parrot_make_namespace_autobase(PARROT_INTERP, NULLOK(PMC *key))
+Parrot_make_namespace_autobase(PARROT_INTERP, ARGIN_NULLOK(PMC *key))
 {
     PMC *base_ns;
     if (VTABLE_isa(interp, key, CONST_STRING(interp, "String")))
@@ -262,7 +266,7 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC *
-Parrot_get_namespace_autobase(PARROT_INTERP, NULLOK(PMC *key))
+Parrot_get_namespace_autobase(PARROT_INTERP, ARGIN_NULLOK(PMC *key))
 {
     PMC *base_ns;
     if (VTABLE_isa(interp, key, CONST_STRING(interp, "String")))
@@ -310,7 +314,7 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC *
-Parrot_get_global(PARROT_INTERP, NULLOK(PMC *ns), NULLOK(STRING *globalname))
+Parrot_get_global(PARROT_INTERP, ARGIN_NULLOK(PMC *ns), ARGIN_NULLOK(STRING 
*globalname))
 {
     if (PMC_IS_NULL(ns))
         return PMCNULL;
@@ -330,7 +334,8 @@
 
 PARROT_API
 void
-Parrot_set_global(PARROT_INTERP, NULLOK(PMC *ns), NULLOK(STRING *globalname), 
NULLOK(PMC *val))
+Parrot_set_global(PARROT_INTERP, ARGIN_NULLOK(PMC *ns),
+        ARGIN_NULLOK(STRING *globalname), ARGIN_NULLOK(PMC *val))
 {
     VTABLE_set_pmc_keyed_str(interp, ns, globalname, val);
 }
@@ -354,7 +359,7 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC *
-Parrot_find_global_n(PARROT_INTERP, ARGIN_NULLOK(PMC *ns), NULLOK(STRING 
*globalname))
+Parrot_find_global_n(PARROT_INTERP, ARGIN_NULLOK(PMC *ns), ARGIN_NULLOK(STRING 
*globalname))
 {
     PMC *res;
 
@@ -446,7 +451,8 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 PMC *
-Parrot_find_global_s(PARROT_INTERP, ARGIN_NULLOK(STRING *str_key), 
ARGIN_NULLOK(STRING *globalname))
+Parrot_find_global_s(PARROT_INTERP, ARGIN_NULLOK(STRING *str_key),
+        ARGIN_NULLOK(STRING *globalname))
 {
     PMC *const ns =
         Parrot_get_namespace_keyed_str(interp,
@@ -467,8 +473,8 @@
 
 PARROT_API
 void
-Parrot_store_global_n(PARROT_INTERP, NULLOK(PMC *ns),
-                      NULLOK(STRING *globalname), NULLOK(PMC *val))
+Parrot_store_global_n(PARROT_INTERP, ARGIN_NULLOK(PMC *ns),
+        ARGIN_NULLOK(STRING *globalname), ARGIN_NULLOK(PMC *val))
 {
 #if DEBUG_GLOBAL
     if (globalname)
@@ -493,7 +499,8 @@
 
 PARROT_API
 void
-Parrot_store_global_cur(PARROT_INTERP, NULLOK(STRING *globalname), NULLOK(PMC 
*val))
+Parrot_store_global_cur(PARROT_INTERP, ARGIN_NULLOK(STRING *globalname),
+        ARGIN_NULLOK(PMC *val))
 {
     Parrot_store_global_n(interp,
                           CONTEXT(interp->ctx)->current_namespace,
@@ -520,7 +527,7 @@
 PARROT_API
 void
 Parrot_store_global_k(PARROT_INTERP, ARGIN(PMC *pmc_key),
-                      NULLOK(STRING *globalname), NULLOK(PMC *val))
+        ARGIN_NULLOK(STRING *globalname), ARGIN_NULLOK(PMC *val))
 {
     PMC *ns;
 
@@ -557,8 +564,8 @@
 
 PARROT_API
 void
-Parrot_store_global_s(PARROT_INTERP, NULLOK(STRING *str_key),
-                      NULLOK(STRING *globalname), NULLOK(PMC *val))
+Parrot_store_global_s(PARROT_INTERP, ARGIN_NULLOK(STRING *str_key),
+        ARGIN_NULLOK(STRING *globalname), ARGIN_NULLOK(PMC *val))
 {
     PMC * const ns = Parrot_make_namespace_keyed_str(interp,
                                          Parrot_get_ctx_HLL_namespace(interp),
@@ -587,7 +594,7 @@
 PARROT_CANNOT_RETURN_NULL
 PMC *
 Parrot_find_global_op(PARROT_INTERP, ARGIN(PMC *ns),
-        ARGIN(STRING *globalname), NULLOK(void *next))
+        ARGIN(STRING *globalname), ARGIN_NULLOK(void *next))
 {
     PMC *res;
 
@@ -664,7 +671,7 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 static PMC *
-get_namespace_pmc(PARROT_INTERP, NOTNULL(PMC *sub))
+get_namespace_pmc(PARROT_INTERP, ARGIN(PMC *sub))
 {
     PMC * const nsname = PMC_sub(sub)->namespace_name;
     PMC * const nsroot = Parrot_get_HLL_namespace(interp, 
PMC_sub(sub)->HLL_id);
@@ -691,11 +698,11 @@
 */
 
 static void
-store_sub_in_multi(PARROT_INTERP, NOTNULL(PMC *sub), NOTNULL(PMC *ns))
+store_sub_in_multi(PARROT_INTERP, ARGIN(PMC *sub), ARGIN(PMC *ns))
 {
     INTVAL func_nr;
     char *c_meth;
-    STRING *subname = PMC_sub(sub)->name;
+    STRING * const subname = PMC_sub(sub)->name;
     PMC   *multisub = VTABLE_get_pmc_keyed_str(interp, ns, subname);
 
     /* is there an existing MultiSub PMC? or do we need to create one? */
@@ -728,7 +735,7 @@
 
 PARROT_API
 void
-Parrot_store_sub_in_namespace(PARROT_INTERP, NOTNULL(PMC *sub))
+Parrot_store_sub_in_namespace(PARROT_INTERP, ARGIN(PMC *sub))
 {
     const INTVAL cur_id = CONTEXT(interp->ctx)->current_HLL;
 

<Prev in Thread] Current Thread [Next in Thread>
  • [svn:parrot] r24388 - in trunk: include/parrot src src/gc, petdance <=