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

[svn:parrot] r35232 - branches/rvar2/languages/perl6/src/builtins

From:
pmichaud
Date:
January 8, 2009 16:27
Subject:
[svn:parrot] r35232 - branches/rvar2/languages/perl6/src/builtins
Message ID:
20090109002716.41FCECB9F9@x12.develooper.com
Author: pmichaud
Date: Thu Jan  8 16:27:15 2009
New Revision: 35232

Modified:
   branches/rvar2/languages/perl6/src/builtins/assign.pir

Log:
[rakudo]:  If we copy a sub, make sure its $!signature property follows.
It might be better at some point to have a way associate signatures
with Subs by something other than properties.


Modified: branches/rvar2/languages/perl6/src/builtins/assign.pir
==============================================================================
--- branches/rvar2/languages/perl6/src/builtins/assign.pir	(original)
+++ branches/rvar2/languages/perl6/src/builtins/assign.pir	Thu Jan  8 16:27:15 2009
@@ -34,9 +34,14 @@
     if $I0 goto do_assign
     'die'("Type mismatch in assignment.")
   do_assign:
-    eq_addr cont, source, skip_copy
+    eq_addr cont, source, assign_done
     copy cont, source
-  skip_copy:
+    # We need to copy over any $!signature property on sub objects
+    $I0 = isa source, 'Sub'
+    unless $I0 goto assign_done
+    $P0 = getprop '$!signature', source
+    setprop cont, '$!signature', $P0
+  assign_done:
     .return (cont)
 .end
 



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