Author: paultcochrane
Date: Tue Dec 11 13:59:55 2007
New Revision: 23766

Modified:
   trunk/compilers/imcc/instructions.c
   trunk/compilers/imcc/optimizer.c
   trunk/compilers/imcc/pcc.c

Log:
[imcc] Updated function documentation


Modified: trunk/compilers/imcc/instructions.c
==============================================================================
--- trunk/compilers/imcc/instructions.c (original)
+++ trunk/compilers/imcc/instructions.c Tue Dec 11 13:59:55 2007
@@ -391,7 +391,9 @@
 
 /*
 
-=item C<SymReg *
+=item C<PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+SymReg *
 get_branch_reg(NOTNULL(const Instruction *ins))>
 
 Get the register corresponding to an address which is a branch target
@@ -415,7 +417,8 @@
 
 /*
 
-=item C<Instruction *
+=item C<PARROT_CAN_RETURN_NULL
+Instruction *
 delete_ins(NOTNULL(struct _IMC_Unit *unit), NOTNULL(Instruction *ins), int 
needs_freeing)>
 
 Delete instruction ins. Also free it if needs_freeing is true.
@@ -558,7 +561,8 @@
 
 /*
 
-=item C<Instruction *
+=item C<PARROT_CAN_RETURN_NULL
+Instruction *
 move_ins(NOTNULL(struct _IMC_Unit *unit), NOTNULL(Instruction *ins), 
NOTNULL(Instruction *to))>
 
 Move instruction ins from its current position to the position

Modified: trunk/compilers/imcc/optimizer.c
==============================================================================
--- trunk/compilers/imcc/optimizer.c    (original)
+++ trunk/compilers/imcc/optimizer.c    Tue Dec 11 13:59:55 2007
@@ -196,7 +196,8 @@
 
 /*
 
-=item C<int
+=item C<PARROT_WARN_UNUSED_RESULT
+int
 cfg_optimize(PARROT_INTERP, NOTNULL(IMC_Unit *unit))>
 
 Handles optimizations occuring during the construction of the CFG.
@@ -260,7 +261,9 @@
 
 /*
 
-=item C<const char *
+=item C<PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+const char *
 get_neg_op(NOTNULL(const char *op), NOTNULL(int *n))>
 
 Get negated form of operator. If no negated form is known, return NULL.
@@ -371,7 +374,7 @@
 /*
 
 =item C<static int
-strength_reduce(PARROT_INTERP, IMC_Unit * unit)>
+strength_reduce(PARROT_INTERP, NOTNULL(IMC_Unit *unit))>
 
 strength_reduce ... rewrites e.g add Ix, Ix, y => add Ix, y
 
@@ -719,7 +722,9 @@
 
 /*
 
-=item C<Instruction *
+=item C<PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+Instruction *
 IMCC_subst_constants_umix(PARROT_INTERP, NOTNULL(IMC_Unit *unit), 
NOTNULL(const char *name),
         NOTNULL(SymReg **r), int n)>
 
@@ -848,8 +853,8 @@
 =item C<PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 Instruction *
-IMCC_subst_constants(PARROT_INTERP, IMC_Unit * unit, NOTNULL(const char *name),
-        SymReg **r, int n, NOTNULL(int *ok))>
+IMCC_subst_constants(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(const 
char *name),
+        NOTNULL(SymReg **r), int n, NOTNULL(int *ok))>
 
 rewrite e.g. add_n_nc_nc => set_n_nc
              abs_i_ic    => set_i_ic
@@ -1087,8 +1092,9 @@
 
 /*
 
-=item C<static int
-branch_reorg(PARROT_INTERP, IMC_Unit * unit)>
+=item C<PARROT_WARN_UNUSED_RESULT
+static int
+branch_reorg(PARROT_INTERP, NOTNULL(IMC_Unit *unit))>
 
 branch L2  => ...
 L1:           branch L4
@@ -1256,7 +1262,7 @@
 /*
 
 =item C<static int
-branch_cond_loop(PARROT_INTERP, IMC_Unit * unit)>
+branch_cond_loop(PARROT_INTERP, NOTNULL(IMC_Unit *unit))>
 
 start:           => start:
 if cond goto end    if cond goto end
@@ -1337,8 +1343,9 @@
 
 /*
 
-=item C<static int
-unused_label(PARROT_INTERP, IMC_Unit * unit)>
+=item C<PARROT_WARN_UNUSED_RESULT
+static int
+unused_label(PARROT_INTERP, NOTNULL(IMC_Unit *unit))>
 
 Removes unused labels. A label is unused if ... [RT#46287: finish this].
 
@@ -1723,7 +1730,9 @@
 #  ifdef MOVE_INS_1_BL
 /*
 
-=item C<Basic_block *
+=item C<PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+Basic_block *
 find_outer(NOTNULL(IMC_Unit *unit), NOTNULL(Basic_block *blk))>
 
 RT#48260: Not yet documented!!!

Modified: trunk/compilers/imcc/pcc.c
==============================================================================
--- trunk/compilers/imcc/pcc.c  (original)
+++ trunk/compilers/imcc/pcc.c  Tue Dec 11 13:59:55 2007
@@ -113,9 +113,11 @@
 
 /*
 
-=item C<static Instruction *
-insINS(PARROT_INTERP, IMC_Unit * unit, NOTNULL(Instruction *ins),
-        NOTNULL(const char *name), SymReg **regs, int n)>
+=item C<PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+static Instruction *
+insINS(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(Instruction *ins),
+        NOTNULL(const char *name), NOTNULL(SymReg **regs), int n)>
 
 Utility instruction routine. Creates and inserts an instruction
 into the current block in one call.
@@ -190,9 +192,12 @@
 
 /*
 
-=item C<static Instruction*
-pcc_get_args(PARROT_INTERP, IMC_Unit * unit, NOTNULL(Instruction *ins),
-        char *op_name, int n, SymReg **args, int *arg_flags)>
+=item C<PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+static Instruction*
+pcc_get_args(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(Instruction *ins),
+        NOTNULL(const char *op_name), int n,
+        NULLOK(SymReg **args), NULLOK(const int *arg_flags))>
 
 set arguments or return values
 get params or results
@@ -499,8 +504,8 @@
 =item C<PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 static Instruction *
-move_regs(PARROT_INTERP, IMC_Unit *unit,
-        NOTNULL(Instruction *ins), int n, SymReg **dest, SymReg **src)>
+move_regs(PARROT_INTERP, NOTNULL(IMC_Unit *unit), NOTNULL(Instruction *ins),
+        int n, NOTNULL(SymReg **dest), NOTNULL(SymReg **src))>
 
 RT#48260: Not yet documented!!!
 

Reply via email to