Author: petdance
Date: Thu May 31 21:43:35 2007
New Revision: 18717

Modified:
   trunk/include/parrot/pic.h
   trunk/src/pic.c
   trunk/src/pic_jit.c

Log:
consting args to parrot_pic_check_sig, ops_jittable, args_match_params and 
returns_match_results

Modified: trunk/include/parrot/pic.h
==============================================================================
--- trunk/include/parrot/pic.h  (original)
+++ trunk/include/parrot/pic.h  Thu May 31 21:43:35 2007
@@ -80,7 +80,7 @@
 typedef int (*arg_pass_f)(Interp *, PMC *sig,
         char *src_base, void **src_pc, char *dest_base, void **dest_pc);
 
-int parrot_pic_check_sig(Interp *, PMC *sig1, PMC *sig2, int *type);
+int parrot_pic_check_sig(Interp *, const PMC *sig1, const PMC *sig2, int 
*type);
 int parrot_pic_is_safe_to_jit(Interp *, PMC *sub,
         PMC *sig_args, PMC *sig_results, int *flags);
 

Modified: trunk/src/pic.c
==============================================================================
--- trunk/src/pic.c     (original)
+++ trunk/src/pic.c     Thu May 31 21:43:35 2007
@@ -370,7 +370,7 @@
  * the type PARROT_ARG_CONSTANT stands for mixed types or constants
  */
 int
-parrot_pic_check_sig(Interp *interp, PMC *sig1, PMC *sig2, int *type)
+parrot_pic_check_sig(Interp *interp, const PMC *sig1, const PMC *sig2, int 
*type /*NN*/)
 {
     int i, n, t0, t1, t2;
     t0 = 0; /* silence compiler uninit warning */

Modified: trunk/src/pic_jit.c
==============================================================================
--- trunk/src/pic_jit.c (original)
+++ trunk/src/pic_jit.c Thu May 31 21:43:35 2007
@@ -108,10 +108,10 @@
 
 
 static int
-args_match_params(Interp *interp, PMC *sig_args, PackFile_ByteCode *seg,
+args_match_params(Interp *interp, const PMC *sig_args, PackFile_ByteCode *seg,
     opcode_t *start)
 {
-    PMC *sig_params;
+    const PMC *sig_params;
     int n, type;
 
     if (*start != PARROT_OP_get_params_pc)
@@ -145,7 +145,7 @@
 }
 
 static int
-returns_match_results(Interp *interp, PMC *sig_ret, PMC *sig_result)
+returns_match_results(Interp *interp, const PMC *sig_ret, const PMC 
*sig_result)
 {
     int type;
     const int n = parrot_pic_check_sig(interp, sig_ret, sig_result, &type);
@@ -209,7 +209,7 @@
 }
 
 static int
-ops_jittable(Interp *interp, PMC *sub, PMC *sig_results, PackFile_ByteCode 
*seg,
+ops_jittable(Interp *interp, PMC *sub, const PMC *sig_results, 
PackFile_ByteCode *seg,
         opcode_t *pc, opcode_t *end, int *flags)
 {
     while (pc < end) {
@@ -227,7 +227,7 @@
                 break;
             case PARROT_OP_set_returns_pc:
                 {
-                PMC * const sig_ret = 
seg->const_table->constants[pc[1]]->u.key;
+                const PMC * const sig_ret = 
seg->const_table->constants[pc[1]]->u.key;
                 if (!returns_match_results(interp, sig_ret, sig_results))
                     return 0;
                 }

Reply via email to