cvsuser     05/01/13 08:09:58

  Modified:    imcc     instructions.c
  Log:
   Add a few comments, tidy up others
  
  Revision  Changes    Path
  1.67      +26 -12    parrot/imcc/instructions.c
  
  Index: instructions.c
  ===================================================================
  RCS file: /cvs/public/parrot/imcc/instructions.c,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- instructions.c    5 Jan 2005 21:13:14 -0000       1.66
  +++ instructions.c    13 Jan 2005 16:09:58 -0000      1.67
  @@ -76,10 +76,10 @@
   
   
   /*
  - * some instructions don't have a hint in op_info, that they work
  - * on all registers:
  - * - push?, pop?, clear?
  - * - saveall/restoreall
  + * Some instructions don't have a hint in op_info that they work
  + * on all registers (e.g. saveall, restoreall) or on all registers
  + * of a given type  (e.g. pushi, popi, cleari). These instructions
  + * need special handling at various points in the code. 
    */
   
   static int r_special[5];
  @@ -113,7 +113,9 @@
       }
   }
   
  -/* return TRUE, if instruction ins reads from a register of type t */
  +/* 
  + * Returns TRUE if instruction ins reads from a register of type t 
  + */
   int
   ins_reads2(Instruction *ins, int t)
   {
  @@ -134,7 +136,9 @@
       return 0;
   }
   
  -/* return TRUE, if instruction ins writes to a register of type t */
  +/* 
  + * Returns TRUE if instruction ins writes to a register of type t 
  + */
   int
   ins_writes2(Instruction *ins, int t)
   {
  @@ -210,7 +214,9 @@
       return 0;
   }
   
  -/* get the reg no of address, where a branch targets to */
  +/* 
  + * Get the register number of an address which is a branch target
  + */
   int
   get_branch_regno(Instruction * ins)
   {
  @@ -221,7 +227,9 @@
       return -1;
   }
   
  -/* get the reg no of address, where a branch targets to */
  +/* 
  + * Get the register corresponding to an address which is a branch target 
  + */
   SymReg *
   get_branch_reg(Instruction * ins)
   {
  @@ -234,8 +242,8 @@
   /* some useful instruction routines */
   
   /*
  - * delete and free *ins
  - * actual new ins is returned
  + * Delete instruction ins. Also free it if needs_freeing is true.
  + * The instruction following ins is returned.
    */
   Instruction *
   delete_ins(IMC_Unit *unit, Instruction *ins, int needs_freeing)
  @@ -336,7 +344,11 @@
           free_ins(ins);
   }
   
  -/* move instruction ins to to */
  +/* 
  + * Move instruction ins from its current position to the position 
  + * following instruction to. Returns the instruction following the
  + * initial position of ins.
  + *
   Instruction *
   move_ins(IMC_Unit * unit, Instruction *ins, Instruction *to)
   {
  @@ -375,7 +387,9 @@
       free(ins);
   }
   
  -
  +/* 
  + * Print details of instruction ins in file fd.
  + */
   int
   ins_print(Interp *interp, FILE *fd, Instruction * ins)
   {
  
  
  

Reply via email to