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

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

From:
pmichaud
Date:
December 9, 2008 08:58
Subject:
[svn:parrot] r33714 - in trunk/languages/perl6/src: builtins classes parser
Message ID:
20081209165752.142CDCB9AF@x12.develooper.com
Author: pmichaud
Date: Tue Dec  9 08:57:49 2008
New Revision: 33714

Modified:
   trunk/languages/perl6/src/builtins/any-num.pir
   trunk/languages/perl6/src/builtins/any-str.pir
   trunk/languages/perl6/src/builtins/guts.pir
   trunk/languages/perl6/src/classes/Array.pir
   trunk/languages/perl6/src/classes/Complex.pir
   trunk/languages/perl6/src/classes/List.pir
   trunk/languages/perl6/src/classes/Mapping.pir
   trunk/languages/perl6/src/classes/Positional.pir
   trunk/languages/perl6/src/classes/Str.pir
   trunk/languages/perl6/src/parser/actions.pm

Log:
[rakudo]:  Set postcircumfix:<[ ]> to also be callable as a function
* This should help with other HLLs that don't provide a method form.


Modified: trunk/languages/perl6/src/builtins/any-num.pir
==============================================================================
--- trunk/languages/perl6/src/builtins/any-num.pir	(original)
+++ trunk/languages/perl6/src/builtins/any-num.pir	Tue Dec  9 08:57:49 2008
@@ -21,7 +21,7 @@
 .namespace []
 .sub 'onload' :anon :init :load
     $P0 = get_hll_namespace ['Any']
-    '!EXPORT'('abs cis int log chr polar sqrt truncate unpolar', 'from'=>$P0)
+    '!EXPORT'('abs,cis,int,log,chr,polar,sqrt,truncate,unpolar', 'from'=>$P0)
 
     ##  pre-seed a random number generator
     $P0 = new 'Random'

Modified: trunk/languages/perl6/src/builtins/any-str.pir
==============================================================================
--- trunk/languages/perl6/src/builtins/any-str.pir	(original)
+++ trunk/languages/perl6/src/builtins/any-str.pir	Tue Dec  9 08:57:49 2008
@@ -21,7 +21,7 @@
 .namespace []
 .sub 'onload' :anon :init :load
     $P0 = get_hll_namespace ['Any']
-    '!EXPORT'('capitalize chop chomp chars :e index lc lcfirst rindex ord substr uc ucfirst', 'from'=>$P0)
+    '!EXPORT'('capitalize,chop,chomp,chars,:e,index,lc,lcfirst,rindex,ord,substr,uc,ucfirst', 'from'=>$P0)
 .end
 
 

Modified: trunk/languages/perl6/src/builtins/guts.pir
==============================================================================
--- trunk/languages/perl6/src/builtins/guts.pir	(original)
+++ trunk/languages/perl6/src/builtins/guts.pir	Tue Dec  9 08:57:49 2008
@@ -29,7 +29,7 @@
   have_to:
 
     .local pmc list
-    list = split ' ', symbols
+    list = split ',', symbols
   list_loop:
     unless list goto list_end
     .local string symbol

Modified: trunk/languages/perl6/src/classes/Array.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Array.pir	(original)
+++ trunk/languages/perl6/src/classes/Array.pir	Tue Dec  9 08:57:49 2008
@@ -14,7 +14,7 @@
     arrayproto.'!MUTABLE'()
 
     $P0 = get_hll_namespace ['Perl6Array']
-    '!EXPORT'('delete exists pop push shift unshift', 'from'=>$P0)
+    '!EXPORT'('delete,exists,pop,push,shift,unshift', 'from'=>$P0)
 .end
 
 =head2 Methods

Modified: trunk/languages/perl6/src/classes/Complex.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Complex.pir	(original)
+++ trunk/languages/perl6/src/classes/Complex.pir	Tue Dec  9 08:57:49 2008
@@ -27,7 +27,7 @@
     p6meta.'register'('Complex', 'parent'=>complexproto, 'protoobject'=>complexproto)
 
     $P0 = get_hll_namespace ['Perl6Complex']
-    '!EXPORT'('log polar', 'from'=>$P0)
+    '!EXPORT'('log,polar', 'from'=>$P0)
 .end
 
 

Modified: trunk/languages/perl6/src/classes/List.pir
==============================================================================
--- trunk/languages/perl6/src/classes/List.pir	(original)
+++ trunk/languages/perl6/src/classes/List.pir	Tue Dec  9 08:57:49 2008
@@ -16,7 +16,7 @@
     p6meta.'register'('ResizablePMCArray', 'parent'=>listproto, 'protoobject'=>listproto)
 
     $P0 = get_hll_namespace ['List']
-    '!EXPORT'('first grep keys kv map pairs reduce values', $P0)
+    '!EXPORT'('first,grep,keys,kv,map,pairs,reduce,values', $P0)
 .end
 
 =head2 Methods

Modified: trunk/languages/perl6/src/classes/Mapping.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Mapping.pir	(original)
+++ trunk/languages/perl6/src/classes/Mapping.pir	Tue Dec  9 08:57:49 2008
@@ -18,7 +18,7 @@
     mappingproto = p6meta.'new_class'('Mapping', 'parent'=>'Hash Any')
     p6meta.'register'('Hash', 'parent'=>mappingproto, 'protoobject'=>mappingproto)
     $P0 = get_hll_namespace ['Mapping']
-    '!EXPORT'('keys kv values reverse', $P0)
+    '!EXPORT'('keys,kv,values,reverse', $P0)
 .end
 
 

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 08:57:49 2008
@@ -13,9 +13,12 @@
 .sub '' :anon :load :init
     .local pmc positional
     positional = '!keyword_role'('Positional')
+
+    $P0 = get_hll_namespace ['Positional']
+    '!EXPORT'('postcircumfix:[ ]', $P0)
 .end
 
-=head2 Methods
+=head2 Operators
 
 =over
 
@@ -26,7 +29,7 @@
 =cut
 
 .namespace ['Positional']
-.sub 'postcircumfix:[ ]' :method
+.sub 'postcircumfix:[ ]' :method :multi(_, _)
     .param pmc args            :slurpy
     .param pmc options         :slurpy :named
     .local pmc result

Modified: trunk/languages/perl6/src/classes/Str.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Str.pir	(original)
+++ trunk/languages/perl6/src/classes/Str.pir	Tue Dec  9 08:57:49 2008
@@ -28,7 +28,7 @@
     p6meta.'register'('String', 'parent'=>strproto, 'protoobject'=>strproto)
 
     $P0 = get_hll_namespace ['Str']
-    '!EXPORT'('sprintf reverse', 'from'=>$P0)
+    '!EXPORT'('sprintf,reverse', 'from'=>$P0)
 .end
 
 

Modified: trunk/languages/perl6/src/parser/actions.pm
==============================================================================
--- trunk/languages/perl6/src/parser/actions.pm	(original)
+++ trunk/languages/perl6/src/parser/actions.pm	Tue Dec  9 08:57:49 2008
@@ -1498,7 +1498,7 @@
         $past := build_call( $( $<semilist> ) );
         $past.node($/);
         $past.name('postcircumfix:[ ]');
-        $past.pasttype('callmethod');
+        $past.pasttype('call');
     }
     elsif $key eq '( )' {
         $past := build_call( $( $<semilist> ) );



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