develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33702 - trunk/languages/perl6/src/classes

From:
pmichaud
Date:
December 9, 2008 00:22
Subject:
[svn:parrot] r33702 - trunk/languages/perl6/src/classes
Message ID:
20081209082246.8EE7DCB9AF@x12.develooper.com
Author: pmichaud
Date: Tue Dec  9 00:22:45 2008
New Revision: 33702

Modified:
   trunk/languages/perl6/src/classes/Positional.pir

Log:
[rakudo]:  Add the @a[] slice (slice with no arguments).


Modified: trunk/languages/perl6/src/classes/Positional.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Positional.pir	(original)
+++ trunk/languages/perl6/src/classes/Positional.pir	Tue Dec  9 00:22:45 2008
@@ -30,6 +30,10 @@
     .param pmc args            :slurpy
     .param pmc options         :slurpy :named
     .local pmc result
+    if args goto do_index
+    ## return complete invocant as a list
+    .tailcall self.'list'()
+  do_index:
     args.'!flatten'()
     $I0 = args.'elems'()
     if $I0 != 1 goto slice



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