[svn:parrot] r39823 - trunk/compilers/imcc

petdance at svn.parrot.org petdance at svn.parrot.org
Mon Jun 29 06:43:53 UTC 2009


Author: petdance
Date: Mon Jun 29 06:43:52 2009
New Revision: 39823
URL: https://trac.parrot.org/parrot/changeset/39823

Log:
update the annotations for splint

Modified:
   trunk/compilers/imcc/imc.h
   trunk/compilers/imcc/optimizer.c
   trunk/compilers/imcc/parser_util.c

Modified: trunk/compilers/imcc/imc.h
==============================================================================
--- trunk/compilers/imcc/imc.h	Mon Jun 29 06:37:17 2009	(r39822)
+++ trunk/compilers/imcc/imc.h	Mon Jun 29 06:43:52 2009	(r39823)
@@ -294,12 +294,13 @@
         FUNC_MODIFIES(*error_message);
 
 int imcc_vfprintf(PARROT_INTERP,
-    ARGIN(PMC *io),
+    ARGMOD(PMC *io),
     ARGIN(const char *format),
     va_list ap)
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(3)
+        FUNC_MODIFIES(*io);
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL

Modified: trunk/compilers/imcc/optimizer.c
==============================================================================
--- trunk/compilers/imcc/optimizer.c	Mon Jun 29 06:37:17 2009	(r39822)
+++ trunk/compilers/imcc/optimizer.c	Mon Jun 29 06:43:52 2009	(r39823)
@@ -882,7 +882,7 @@
 {
     ASSERT_ARGS(IMCC_subst_constants)
     Instruction *tmp;
-    const char * const ops[] = {
+    PARROT_OBSERVER const char * const ops[] = {
         "add", "sub", "mul", "div", "fdiv", "pow",
         "cmod", "mod", "atan",
         "shr", "shl", "lsr",
@@ -892,16 +892,16 @@
         "and", "or", "xor",
         "iseq", "isne", "islt", "isle", "isgt", "isge", "cmp", "concat"
     };
-    const char * const ops2[] = {
+    PARROT_OBSERVER const char * const ops2[] = {
         "abs", "neg", "not", "fact", "sqrt", "ceil", "floor"
         "acos", "asec", "asin",
         "atan", "cos", "cosh", "exp", "ln", "log10", "log2", "sec",
         "sech", "sin", "sinh", "tan", "tanh", "fact"
     };
-    const char * const ops3[] = {
+    PARROT_OBSERVER const char * const ops3[] = {
         "eq", "ne", "gt", "ge", "lt", "le"
     };
-    const char * const ops4[] = {
+    PARROT_OBSERVER const char * const ops4[] = {
         "if", "unless"
     };
 
@@ -1002,6 +1002,7 @@
         return NULL;
     }
 
+    /* XXX We can get to this point with debug_fmt = NULL */
     IMCC_debug(interp, DEBUG_OPT1, debug_fmt, name);
     /* we construct a parrot instruction
      * here and let parrot do the calculation in a

Modified: trunk/compilers/imcc/parser_util.c
==============================================================================
--- trunk/compilers/imcc/parser_util.c	Mon Jun 29 06:37:17 2009	(r39822)
+++ trunk/compilers/imcc/parser_util.c	Mon Jun 29 06:43:52 2009	(r39823)
@@ -1266,7 +1266,7 @@
 */
 
 int
-imcc_vfprintf(PARROT_INTERP, ARGIN(PMC *io), ARGIN(const char *format), va_list ap)
+imcc_vfprintf(PARROT_INTERP, ARGMOD(PMC *io), ARGIN(const char *format), va_list ap)
 {
     ASSERT_ARGS(imcc_vfprintf)
     return Parrot_io_putps(interp, io, Parrot_vsprintf_c(interp, format, ap));


More information about the parrot-commits mailing list