[svn:parrot] r39461 - in trunk: include/parrot src/runcore

petdance at svn.parrot.org petdance at svn.parrot.org
Tue Jun 9 04:52:43 UTC 2009


Author: petdance
Date: Tue Jun  9 04:52:41 2009
New Revision: 39461
URL: https://trac.parrot.org/parrot/changeset/39461

Log:
adding some consts, and ornamenting some parms for the headerizer

Modified:
   trunk/include/parrot/runcore_api.h
   trunk/src/runcore/main.c

Modified: trunk/include/parrot/runcore_api.h
==============================================================================
--- trunk/include/parrot/runcore_api.h	Mon Jun  8 23:24:24 2009	(r39460)
+++ trunk/include/parrot/runcore_api.h	Tue Jun  9 04:52:41 2009	(r39461)
@@ -25,14 +25,17 @@
 void enable_event_checking(PARROT_INTERP)
         __attribute__nonnull__(1);
 
-void do_prederef(void **pc_prederef, PARROT_INTERP, int type)
+void do_prederef(ARGIN(void **pc_prederef), PARROT_INTERP, int type)
+        __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-void dynop_register(PARROT_INTERP, PMC *lib_pmc)
-        __attribute__nonnull__(1);
+void dynop_register(PARROT_INTERP, ARGIN(PMC *lib_pmc))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
 
-void exec_init_prederef(PARROT_INTERP, void *prederef_arena)
-        __attribute__nonnull__(1);
+void exec_init_prederef(PARROT_INTERP, ARGIN(void *prederef_arena))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
@@ -56,11 +59,14 @@
 #define ASSERT_ARGS_enable_event_checking __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_do_prederef __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp)
+       PARROT_ASSERT_ARG(pc_prederef) \
+    || PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_dynop_register __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp)
+       PARROT_ASSERT_ARG(interp) \
+    || PARROT_ASSERT_ARG(lib_pmc)
 #define ASSERT_ARGS_exec_init_prederef __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp)
+       PARROT_ASSERT_ARG(interp) \
+    || PARROT_ASSERT_ARG(prederef_arena)
 #define ASSERT_ARGS_init_jit __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_Parrot_runcore_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = \

Modified: trunk/src/runcore/main.c
==============================================================================
--- trunk/src/runcore/main.c	Mon Jun  8 23:24:24 2009	(r39460)
+++ trunk/src/runcore/main.c	Tue Jun  9 04:52:41 2009	(r39461)
@@ -88,7 +88,7 @@
 static void prederef_args(
     ARGMOD(void **pc_prederef),
     PARROT_INTERP,
-    ARGIN(opcode_t *pc),
+    ARGIN(const opcode_t *pc),
     ARGIN(const op_info_t *opinfo))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
@@ -170,8 +170,8 @@
 
 /*
 
-=item C<static void prederef_args(void **pc_prederef, PARROT_INTERP, opcode_t
-*pc, const op_info_t *opinfo)>
+=item C<static void prederef_args(void **pc_prederef, PARROT_INTERP, const
+opcode_t *pc, const op_info_t *opinfo)>
 
 Called from C<do_prederef()> to deal with any arguments.
 
@@ -183,7 +183,7 @@
 
 static void
 prederef_args(ARGMOD(void **pc_prederef), PARROT_INTERP,
-        ARGIN(opcode_t *pc), ARGIN(const op_info_t *opinfo))
+        ARGIN(const opcode_t *pc), ARGIN(const op_info_t *opinfo))
 {
     ASSERT_ARGS(prederef_args)
     const PackFile_ConstTable * const const_table = interp->code->const_table;
@@ -298,7 +298,7 @@
 */
 
 void
-do_prederef(void **pc_prederef, PARROT_INTERP, int type)
+do_prederef(ARGIN(void **pc_prederef), PARROT_INTERP, int type)
 {
     ASSERT_ARGS(do_prederef)
     const size_t     offset = pc_prederef - interp->code->prederef.code;
@@ -619,13 +619,13 @@
 */
 
 void
-exec_init_prederef(PARROT_INTERP, void *prederef_arena)
+exec_init_prederef(PARROT_INTERP, ARGIN(void *prederef_arena))
 {
     ASSERT_ARGS(exec_init_prederef)
     load_prederef(interp, PARROT_CGP_CORE);
 
     if (!interp->code->prederef.code) {
-        void **temp = (void **)prederef_arena;
+        void ** const temp = (void **)prederef_arena;
 
         interp->code->prederef.code = temp;
         /* TODO */
@@ -1086,7 +1086,7 @@
 */
 
 void
-dynop_register(PARROT_INTERP, PMC *lib_pmc)
+dynop_register(PARROT_INTERP, ARGIN(PMC *lib_pmc))
 {
     ASSERT_ARGS(dynop_register)
     op_lib_t *lib, *core;


More information about the parrot-commits mailing list