Author: jkeenan
Date: Thu Jan  1 17:11:34 2009
New Revision: 34778

Modified:
   branches/assert_args/compilers/imcc/sets.c
   branches/assert_args/include/parrot/atomic/gcc_x86.h
   branches/assert_args/include/parrot/exec.h
   branches/assert_args/src/exec.c

Log:
Adding ASSERT_ARGS() to all functions in compilers/imcc/sets.c; running 'make 
headerizer'; storing tested results.

Modified: branches/assert_args/compilers/imcc/sets.c
==============================================================================
--- branches/assert_args/compilers/imcc/sets.c  (original)
+++ branches/assert_args/compilers/imcc/sets.c  Thu Jan  1 17:11:34 2009
@@ -51,6 +51,7 @@
 Set*
 set_make(unsigned int length)
 {
+    ASSERT_ARGS(set_make);
     Set * const s = mem_allocate_zeroed_typed(Set);
     s->length     = length;
     s->bmp        = mem_allocate_n_zeroed_typed(NUM_BYTES(length),
@@ -75,6 +76,7 @@
 Set*
 set_make_full(unsigned int length)
 {
+    ASSERT_ARGS(set_make_full);
     Set * const s      = set_make(length);
     const size_t bytes = NUM_BYTES(length);
 
@@ -98,6 +100,7 @@
 void
 set_free(ARGMOD(Set *s))
 {
+    ASSERT_ARGS(set_free);
     if (s->bmp)
         mem_sys_free(s->bmp);
 
@@ -118,6 +121,7 @@
 void
 set_clear(ARGMOD(Set *s))
 {
+    ASSERT_ARGS(set_clear);
     memset(s->bmp, 0, NUM_BYTES(s->length));
 }
 
@@ -137,6 +141,7 @@
 Set*
 set_copy(ARGIN(const Set *s))
 {
+    ASSERT_ARGS(set_copy);
     Set * const d = set_make(s->length);
 
     memcpy(d->bmp, s->bmp, NUM_BYTES(d->length));
@@ -161,6 +166,7 @@
 set_equal(ARGIN(const Set *s1), ARGIN(const Set *s2))
 {
     int          mask;
+    ASSERT_ARGS(set_equal);
     const size_t bytes = s1->length / 8;
 
     if (s1->length != s2->length)
@@ -195,6 +201,7 @@
 void
 set_add(ARGMOD(Set *s), unsigned int element)
 {
+    ASSERT_ARGS(set_add);
     const int elem_byte_in_set = BYTE_IN_SET(element);
     const int bytes_in_set     = BYTE_IN_SET(s->length);
 
@@ -295,6 +302,7 @@
 set_union(ARGIN(const Set *s1), ARGIN(const Set *s2))
 {
     unsigned int i;
+    ASSERT_ARGS(set_union);
     Set * const s = set_make(s1->length);
 
     if (s1->length != s2->length)
@@ -326,8 +334,9 @@
 Set *
 set_intersec(ARGIN(const Set *s1), ARGIN(const Set *s2))
 {
-    Set * const  s = set_make(s1->length);
     unsigned int i;
+    ASSERT_ARGS(set_intersec);
+    Set * const  s = set_make(s1->length);
 
     if (s1->length != s2->length)
         fatal(1, "set_intersec", "Sets don't have the same length\n");
@@ -355,6 +364,7 @@
 set_intersec_inplace(ARGMOD(Set *s1), ARGIN(const Set *s2))
 {
     unsigned int i;
+    ASSERT_ARGS(set_intersec_inplace);
 
     if (s1->length != s2->length)
         fatal(1, "set_intersec_inplace", "Sets don't have the same length\n");

Modified: branches/assert_args/include/parrot/atomic/gcc_x86.h
==============================================================================
--- branches/assert_args/include/parrot/atomic/gcc_x86.h        (original)
+++ branches/assert_args/include/parrot/atomic/gcc_x86.h        Thu Jan  1 
17:11:34 2009
@@ -33,6 +33,10 @@
 long parrot_i386_xadd(ARGIN(volatile long *l), long amount)
         __attribute__nonnull__(1);
 
+#define ASSERT_ARGS_parrot_i386_cmpxchg assert(ptr); \
+                                        assert(expect); \
+                                        assert(update);
+#define ASSERT_ARGS_parrot_i386_xadd assert(l);
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will 
be lost. */
 /* HEADERIZER END: src/atomic/gcc_x86.c */
 

Modified: branches/assert_args/include/parrot/exec.h
==============================================================================
--- branches/assert_args/include/parrot/exec.h  (original)
+++ branches/assert_args/include/parrot/exec.h  Thu Jan  1 17:11:34 2009
@@ -149,6 +149,21 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*obj);
 
+#define ASSERT_ARGS_Parrot_exec_add_text_rellocation assert(obj); \
+                                                     assert(nptr); \
+                                                     assert(symbol);
+#define ASSERT_ARGS_Parrot_exec_add_text_rellocation_func assert(obj); \
+                                                          assert(nptr); \
+                                                          assert(func_name);
+#define ASSERT_ARGS_Parrot_exec_add_text_rellocation_reg assert(obj); \
+                                                         assert(nptr); \
+                                                         assert(var);
+#define ASSERT_ARGS_Parrot_exec assert(interp); \
+                                assert(pc); \
+                                assert(code_start); \
+                                assert(code_end);
+#define ASSERT_ARGS_Parrot_exec_add_symbol assert(obj); \
+                                           assert(symbol);
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will 
be lost. */
 /* HEADERIZER END: src/exec.c */
 

Modified: branches/assert_args/src/exec.c
==============================================================================
--- branches/assert_args/src/exec.c     (original)
+++ branches/assert_args/src/exec.c     Thu Jan  1 17:11:34 2009
@@ -49,6 +49,10 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
+#define ASSERT_ARGS_add_data_member assert(obj);
+#define ASSERT_ARGS_exec_init assert(obj);
+#define ASSERT_ARGS_symbol_list_find assert(obj); \
+                                     assert(symbol);
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will 
be lost. */
 /* HEADERIZER END: static */
 

Reply via email to