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

[svn:parrot] r34400 - in trunk/languages/perl6/src: builtins classes

From:
pmichaud
Date:
December 26, 2008 14:43
Subject:
[svn:parrot] r34400 - in trunk/languages/perl6/src: builtins classes
Message ID:
20081226224311.DC3BACBA12@x12.develooper.com
Author: pmichaud
Date: Fri Dec 26 14:43:08 2008
New Revision: 34400

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

Log:
[rakudo]:  Autothread junctions on lhs of infix:<~~>.


Modified: trunk/languages/perl6/src/builtins/match.pir
==============================================================================
--- trunk/languages/perl6/src/builtins/match.pir	(original)
+++ trunk/languages/perl6/src/builtins/match.pir	Fri Dec 26 14:43:08 2008
@@ -12,7 +12,7 @@
 
 .namespace []
 
-.sub 'infix:~~'
+.sub 'infix:~~' :multi()
     .param pmc topic
     .param pmc x
     .tailcall x.'ACCEPTS'(topic)

Modified: trunk/languages/perl6/src/classes/Junction.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Junction.pir	(original)
+++ trunk/languages/perl6/src/classes/Junction.pir	Fri Dec 26 14:43:08 2008
@@ -349,6 +349,16 @@
     .tailcall '!MAKE_JUNCTION'(JUNCTION_TYPE_NONE, args)
 .end
 
+=item infix:<~~>
+
+=cut
+
+.sub 'infix:~~' :multi('Junction', _)
+    .param pmc topic
+    .param pmc x
+    .tailcall '!DISPATCH_JUNCTION'('infix:~~', topic, x)
+.end
+
 
 =back
 



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