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

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

From:
jonathan
Date:
January 20, 2009 04:22
Subject:
[svn:parrot] r35798 - trunk/languages/perl6/src/parser
Message ID:
20090120122217.5DD4DCB9AE@x12.develooper.com
Author: jonathan
Date: Tue Jan 20 04:22:16 2009
New Revision: 35798

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

Log:
[rakudo] newclosure clones, but the signature is lost during the clone since it's attached as a property. This re-instates it, which happily is all that's needed for role parameters to act as type constraints.

Modified: trunk/languages/perl6/src/parser/actions.pm
==============================================================================
--- trunk/languages/perl6/src/parser/actions.pm	(original)
+++ trunk/languages/perl6/src/parser/actions.pm	Tue Jan 20 04:22:16 2009
@@ -1627,7 +1627,9 @@
                 '    unless meth_iter goto it_loop_end',
                 '    $S0 = shift meth_iter',
                 '    $P0 = meths[$S0]',
+                '    $P1 = getprop "$!signature", $P0',
                 '    $P0 = newclosure $P0',
+                '    setprop $P0, "$!signature", $P1',
                 '    %0."add_method"($S0, $P0)',
                 '    goto it_loop',
                 '  it_loop_end:',



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