Author: petdance
Date: Fri Jul  6 21:44:34 2007
New Revision: 19664

Modified:
   trunk/include/parrot/library.h
   trunk/include/parrot/packfile.h
   trunk/src/inter_run.c
   trunk/src/interpreter.c
   trunk/src/library.c
   trunk/src/packfile.c
   trunk/src/pmc/addrregistry.pmc
   trunk/src/runops_cores.c

Log:
more const, more NN

Modified: trunk/include/parrot/library.h
==============================================================================
--- trunk/include/parrot/library.h      (original)
+++ trunk/include/parrot/library.h      Fri Jul  6 21:44:34 2007
@@ -58,9 +58,11 @@
 
 STRING * parrot_split_path_ext( Interp* interp /*NN*/,
     STRING *in,
-    STRING **wo_ext,
-    STRING **ext )
-        __attribute__nonnull__(1);
+    STRING **wo_ext /*NN*/,
+    STRING **ext /*NN*/ )
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(3)
+        __attribute__nonnull__(4);
 
 /* HEADERIZER END: src/library.c */
 

Modified: trunk/include/parrot/packfile.h
==============================================================================
--- trunk/include/parrot/packfile.h     (original)
+++ trunk/include/parrot/packfile.h     Fri Jul  6 21:44:34 2007
@@ -435,7 +435,11 @@
 PARROT_API void Parrot_destroy_constants( Interp *interp /*NN*/ )
         __attribute__nonnull__(1);
 
-PARROT_API void Parrot_load_bytecode( Interp *interp, STRING *file_str );
+PARROT_API void Parrot_load_bytecode( Interp *interp /*NN*/,
+    STRING *file_str /*NN*/ )
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
 PARROT_API PackFile_Debug * Parrot_new_debug_seg( Interp *interp,
     PackFile_ByteCode *cs /*NN*/,
     size_t size )

Modified: trunk/src/inter_run.c
==============================================================================
--- trunk/src/inter_run.c       (original)
+++ trunk/src/inter_run.c       Fri Jul  6 21:44:34 2007
@@ -23,13 +23,13 @@
 
 /* HEADERIZER BEGIN: static */
 
-static parrot_context_t * runops_args(
-    Parrot_Interp interp,
+static parrot_context_t * runops_args( Interp *interp /*NN*/,
     PMC *sub,
     PMC *obj,
     STRING *meth,
     const char* sig,
-    va_list ap );
+    va_list ap )
+        __attribute__nonnull__(1);
 
 /* HEADERIZER END: static */
 
@@ -155,7 +155,7 @@
 
 
 static parrot_context_t *
-runops_args(Parrot_Interp interp, PMC *sub, PMC *obj,
+runops_args(Interp *interp /*NN*/, PMC *sub, PMC *obj,
         STRING *meth, const char* sig, va_list ap)
 {
     opcode_t offset, *dest;

Modified: trunk/src/interpreter.c
==============================================================================
--- trunk/src/interpreter.c     (original)
+++ trunk/src/interpreter.c     Fri Jul  6 21:44:34 2007
@@ -690,7 +690,7 @@
 */
 
 void
-runops_int(Interp *interp, size_t offset)
+runops_int(Interp *interp /*NN*/, size_t offset)
 {
     int lo_var_ptr;
     opcode_t *(*core) (Interp *, opcode_t *) =
@@ -714,7 +714,7 @@
     interp->resume_flag |= RESUME_RESTART;
 
     while (interp->resume_flag & RESUME_RESTART) {
-        opcode_t *pc = (opcode_t *)
+        opcode_t * const pc = (opcode_t *)
             interp->code->base.data + interp->resume_offset;
 
         interp->resume_offset = 0;

Modified: trunk/src/library.c
==============================================================================
--- trunk/src/library.c (original)
+++ trunk/src/library.c Fri Jul  6 21:44:34 2007
@@ -552,7 +552,7 @@
 
 STRING *
 parrot_split_path_ext(Interp* interp /*NN*/, STRING *in,
-        STRING **wo_ext, STRING **ext)
+        STRING **wo_ext /*NN*/, STRING **ext /*NN*/)
 {
     STRING * const slash1 = CONST_STRING(interp, "/");
     STRING * const slash2 = CONST_STRING(interp, "\\");

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c        (original)
+++ trunk/src/packfile.c        Fri Jul  6 21:44:34 2007
@@ -200,8 +200,9 @@
         __attribute__nonnull__(2);
 
 static INTVAL pf_register_standard_funcs( Interp *interp, PackFile *pf );
-static PMC* run_sub( Interp *interp /*NN*/, PMC *sub_pmc )
-        __attribute__nonnull__(1);
+static PMC* run_sub( Interp *interp /*NN*/, PMC *sub_pmc /*NN*/ )
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
 
 static void segment_init(
     PackFile_Segment *self /*NN*/,
@@ -355,7 +356,7 @@
 */
 
 static PMC*
-run_sub(Interp *interp /*NN*/, PMC *sub_pmc)
+run_sub(Interp *interp /*NN*/, PMC *sub_pmc /*NN*/)
 {
     const INTVAL old = interp->run_core;
     PMC *retval;
@@ -3269,7 +3270,7 @@
 
 PARROT_API
 void
-Parrot_load_bytecode(Interp *interp, STRING *file_str)
+Parrot_load_bytecode(Interp *interp /*NN*/, STRING *file_str /*NN*/)
 {
     char *filename;
     STRING *wo_ext, *ext, *pbc, *path;

Modified: trunk/src/pmc/addrregistry.pmc
==============================================================================
--- trunk/src/pmc/addrregistry.pmc      (original)
+++ trunk/src/pmc/addrregistry.pmc      Fri Jul  6 21:44:34 2007
@@ -145,9 +145,8 @@
 */
 
     void set_pmc_keyed(PMC* key, PMC* value) {
-        Hash * hash = (Hash *)PMC_struct_val(SELF);
-        HashBucket *b;
-        b = parrot_hash_get_bucket(INTERP, hash, key);
+        Hash * const hash = (Hash *)PMC_struct_val(SELF);
+        HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, key);
         if (b)
             LVALUE_CAST(char *, b->value) ++;
         else

Modified: trunk/src/runops_cores.c
==============================================================================
--- trunk/src/runops_cores.c    (original)
+++ trunk/src/runops_cores.c    Fri Jul  6 21:44:34 2007
@@ -106,10 +106,10 @@
 #define  code_end   (interp->code->base.data + \
         interp->code->base.size)
 static opcode_t *
-runops_trace_core(Interp *interp, opcode_t *pc)
+runops_trace_core(Interp *interp /*NN*/, opcode_t *pc)
 {
     static size_t dod, gc;
-    Arenas *arena_base = interp->arena_base;
+    Arenas * const arena_base = interp->arena_base;
     Interp *debugger;
     PMC* pio;
 
@@ -165,7 +165,7 @@
 }
 
 opcode_t *
-runops_slow_core(Interp *interp, opcode_t *pc)
+runops_slow_core(Interp *interp /*NN*/, opcode_t *pc)
 {
 
     if (Interp_trace_TEST(interp, PARROT_TRACE_OPS_FLAG)) {
@@ -182,7 +182,6 @@
         CONTEXT(interp->ctx)->current_pc = pc;
 
         DO_OP(pc, interp);
-
     }
 #undef code_start
 #undef code_end

Reply via email to