[svn:parrot] r42959 - trunk/lib/Parrot/Pmc2c

cotto at svn.parrot.org cotto at svn.parrot.org
Wed Dec 9 16:51:52 UTC 2009


Author: cotto
Date: Wed Dec  9 16:51:50 2009
New Revision: 42959
URL: https://trac.parrot.org/parrot/changeset/42959

Log:
[PCC] remove unused variables and add consting in the PCC method code generator

Modified:
   trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm

Modified: trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm	Wed Dec  9 07:17:08 2009	(r42958)
+++ trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm	Wed Dec  9 16:51:50 2009	(r42959)
@@ -412,14 +412,10 @@
     rewrite_pccinvoke( $self, $pmc );
 
     $e->emit( <<"END", __FILE__, __LINE__ + 1 );
-    PMC *_caller_ctx, *_ctx;
-    PMC *_ccont, *_call_object;
+    PMC * const _ctx         = CURRENT_CONTEXT(interp);
+    PMC * const _ccont       = Parrot_pcc_get_continuation(interp, _ctx);
+    PMC * const _call_object = Parrot_pcc_get_signature(interp, _ctx);
 
-    _ctx = CURRENT_CONTEXT(interp);
-    _ccont = Parrot_pcc_get_continuation(interp, _ctx);
-
-    _caller_ctx = Parrot_pcc_get_caller_ctx(interp, _ctx);
-    _call_object = Parrot_pcc_get_signature(interp, _ctx);
     Parrot_pcc_set_signature(interp, _ctx, NULL);
 
     { /* BEGIN PARMS SCOPE */
@@ -429,7 +425,7 @@
 END
     if ($params_signature) {
         $e->emit( <<"END", __FILE__, __LINE__ + 1 );
-    Parrot_pcc_fill_params_from_c_args(interp, _call_object, "$params_signature",
+        Parrot_pcc_fill_params_from_c_args(interp, _call_object, "$params_signature",
             $params_varargs);
 END
     }
@@ -441,7 +437,7 @@
 
     } /* END PMETHOD BODY */
     } /* END PARAMS SCOPE */
-    no_return:
+  no_return:
     return;
 END
     $self->return_type('void');


More information about the parrot-commits mailing list