develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35762 - trunk/languages/perl6/src/parser

From:
jonathan
Date:
January 19, 2009 08:39
Subject:
[svn:parrot] r35762 - trunk/languages/perl6/src/parser
Message ID:
20090119163853.7549BCB9AE@x12.develooper.com
Author: jonathan
Date: Mon Jan 19 08:38:52 2009
New Revision: 35762

Modified:
   trunk/languages/perl6/src/parser/actions.pm

Log:
[rakudo] When we had a multi foo() rather than a multi sub foo() we didn't call !SIGNATURE_BIND nor did we set the block type to Sub. Fix that.

Modified: trunk/languages/perl6/src/parser/actions.pm
==============================================================================
--- trunk/languages/perl6/src/parser/actions.pm	(original)
+++ trunk/languages/perl6/src/parser/actions.pm	Mon Jan 19 08:38:52 2009
@@ -571,6 +571,15 @@
                 PAST::Op.new(:inline('    setprop block, "proto", %0'), 1)
             );
         }
+
+        # If it's just a routine, need to mark it as a sub and make sure we
+        # bind its signature.
+        if $<routine_def> {
+            set_block_type($past, 'Sub');
+            $past[0].push(
+                PAST::Op.new( :pasttype('call'), :name('!SIGNATURE_BIND') )
+            );
+        }
     }
 
     make $past;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About