[svn:parrot] r41827 - branches/pcc_reapply/lib/Parrot/Pmc2c

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Oct 11 20:28:14 UTC 2009


Author: bacek
Date: Sun Oct 11 20:28:13 2009
New Revision: 41827
URL: https://trac.parrot.org/parrot/changeset/41827

Log:
[cage] Support bare RETURN() in PCCMETHOD.pm

Modified:
   branches/pcc_reapply/lib/Parrot/Pmc2c/PCCMETHOD.pm

Modified: branches/pcc_reapply/lib/Parrot/Pmc2c/PCCMETHOD.pm
==============================================================================
--- branches/pcc_reapply/lib/Parrot/Pmc2c/PCCMETHOD.pm	Sun Oct 11 20:17:13 2009	(r41826)
+++ branches/pcc_reapply/lib/Parrot/Pmc2c/PCCMETHOD.pm	Sun Oct 11 20:28:13 2009	(r41827)
@@ -252,6 +252,7 @@
         my ( $returns_signature, $returns_varargs ) =
             process_pccmethod_args( parse_p_args_string($returns), 'return' );
 
+        if ($returns_signature) {
         $e->emit( <<"END", __FILE__, __LINE__ + 1 );
     {
     /*BEGIN RETURN $returns */
@@ -263,6 +264,15 @@
     /*END RETURN $returns */
     }
 END
+        }
+        else { # if ($returns_signature)
+            $e->emit( <<"END", __FILE__, __LINE__ + 1 );
+    /*BEGIN RETURN $returns */
+    return;
+    /*END RETURN $returns */
+END
+        }
+
         $matched->replace( $match, $e );
     }
 


More information about the parrot-commits mailing list