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

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

From:
pmichaud
Date:
November 13, 2008 11:41
Subject:
[svn:parrot] r32625 - trunk/languages/perl6/src/classes
Message ID:
20081113194122.E6C40CB9AF@x12.develooper.com
Author: pmichaud
Date: Thu Nov 13 11:41:22 2008
New Revision: 32625

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

Log:
[rakudo]:  any, all, none Junctions now act like sets (RT #60444, bacek++)
* Patch courtesy Vasily Chekalkin <bacek@bacek.com>


Modified: trunk/languages/perl6/src/classes/Junction.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Junction.pir	(original)
+++ trunk/languages/perl6/src/classes/Junction.pir	Thu Nov 13 11:41:22 2008
@@ -214,6 +214,12 @@
     $P0 = get_hll_global 'Junction'
     junc = $P0.'new'()
     setattribute junc, '$!type', type
+
+    # Make eigenstates unique if possible
+    if type == JUNCTION_TYPE_ONE goto set_eigenstates
+    $P0 = get_hll_global 'infix:==='
+    eigenstates = eigenstates.'uniq'($P0)
+  set_eigenstates:
     setattribute junc, '@!eigenstates', eigenstates
     .return (junc)
 .end



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