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

[svn:parrot] r33777 - trunk/languages/perl6/t/pmc

From:
jonathan
Date:
December 10, 2008 13:59
Subject:
[svn:parrot] r33777 - trunk/languages/perl6/t/pmc
Message ID:
20081210215858.9900ECBA89@x12.develooper.com
Author: jonathan
Date: Wed Dec 10 13:58:57 2008
New Revision: 33777

Modified:
   trunk/languages/perl6/t/pmc/perl6multisub-arity.t
   trunk/languages/perl6/t/pmc/perl6multisub-tiebreak.t
   trunk/languages/perl6/t/pmc/perl6multisub-type.t

Log:
[rakudo] Perl6MultiSub PMC tests that attach a signature should have multi_invocant set to true, as those generated by Rakudo do.

Modified: trunk/languages/perl6/t/pmc/perl6multisub-arity.t
==============================================================================
--- trunk/languages/perl6/t/pmc/perl6multisub-arity.t	(original)
+++ trunk/languages/perl6/t/pmc/perl6multisub-arity.t	Wed Dec 10 13:58:57 2008
@@ -148,8 +148,10 @@
     .param int num_params
 
     # Get Any type.
-    .local pmc any
+    .local pmc any, true
     any = get_hll_global "Any"
+    true = new 'Integer'
+    true = 1
     
     # Make signature.
     $P0 = new 'Signature'
@@ -160,6 +162,7 @@
     if $I0 == num_params goto param_loop_end
     $P2 = new 'Perl6Hash'
     $P2["type"] = any
+    $P2["multi_invocant"] = true
     push $P1, $P2
     inc $I0
     goto param_loop

Modified: trunk/languages/perl6/t/pmc/perl6multisub-tiebreak.t
==============================================================================
--- trunk/languages/perl6/t/pmc/perl6multisub-tiebreak.t	(original)
+++ trunk/languages/perl6/t/pmc/perl6multisub-tiebreak.t	Wed Dec 10 13:58:57 2008
@@ -66,8 +66,10 @@
     .param pmc constraints :slurpy
     
     # Make signature.
-    .local pmc any
+    .local pmc any, true
     any = get_hll_global 'Any'
+    true = new 'Integer'
+    true = 1
     $P0 = new 'Signature'
     $P1 = new 'Perl6Array'
     setattribute $P0, "@!params", $P1
@@ -79,6 +81,7 @@
     $P2 = new 'Perl6Hash'
     $P2["type"] = any
     $P2["constraints"] = con
+    $P2["multi_invocant"] = true
     push $P1, $P2
     goto param_loop
   param_loop_end:

Modified: trunk/languages/perl6/t/pmc/perl6multisub-type.t
==============================================================================
--- trunk/languages/perl6/t/pmc/perl6multisub-type.t	(original)
+++ trunk/languages/perl6/t/pmc/perl6multisub-type.t	Wed Dec 10 13:58:57 2008
@@ -172,6 +172,9 @@
     .param pmc types :slurpy
     
     # Make signature.
+    .local pmc true
+    true = new 'Integer'
+    true = 1
     $P0 = new 'Signature'
     $P1 = new 'Perl6Array'
     setattribute $P0, "@!params", $P1
@@ -184,6 +187,7 @@
     type = get_hll_global $S0
     $P2 = new 'Perl6Hash'
     $P2["type"] = type
+    $P2["multi_invocant"] = true
     push $P1, $P2
     goto param_loop
   param_loop_end:



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