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

[svn:parrot] r35242 - branches/rvar2/languages/perl6/src/classes

From:
pmichaud
Date:
January 8, 2009 21:12
Subject:
[svn:parrot] r35242 - branches/rvar2/languages/perl6/src/classes
Message ID:
20090109051208.25707CB9F9@x12.develooper.com
Author: pmichaud
Date: Thu Jan  8 21:12:07 2009
New Revision: 35242

Modified:
   branches/rvar2/languages/perl6/src/classes/Signature.pir

Log:
[rakudo]:  Update 'is copy' trait.


Modified: branches/rvar2/languages/perl6/src/classes/Signature.pir
==============================================================================
--- branches/rvar2/languages/perl6/src/classes/Signature.pir	(original)
+++ branches/rvar2/languages/perl6/src/classes/Signature.pir	Thu Jan  8 21:12:07 2009
@@ -303,12 +303,15 @@
     ## handle readonly/copy traits
     $S0 = param['readtype']
     if $S0 == 'rw' goto param_readtype_done
+    if $S0 == 'copy' goto param_readtype_copy
     ne_addr orig, var, param_readtype_var
     var = new 'ObjectRef', var
   param_readtype_var:
-    if $S0 == 'copy' goto param_readtype_done
     $P0 = get_hll_global ['Bool'], 'True'
     setprop var, 'readonly', $P0
+    goto param_readtype_done
+  param_readtype_copy:
+    var = clone var
   param_readtype_done:
     ## set any type properties
     setprop var, 'type', type



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