[svn:parrot] r39545 - branches/pmc_pct/compilers/pmcc/src/parser

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Jun 14 07:28:29 UTC 2009


Author: bacek
Date: Sun Jun 14 07:28:28 2009
New Revision: 39545
URL: https://trac.parrot.org/parrot/changeset/39545

Log:
[pmcc] Build long signature for MULTIs.

Modified:
   branches/pmc_pct/compilers/pmcc/src/parser/actions.pm

Modified: branches/pmc_pct/compilers/pmcc/src/parser/actions.pm
==============================================================================
--- branches/pmc_pct/compilers/pmcc/src/parser/actions.pm	Sun Jun 14 07:02:42 2009	(r39544)
+++ branches/pmc_pct/compilers/pmcc/src/parser/actions.pm	Sun Jun 14 07:28:28 2009	(r39545)
@@ -160,11 +160,15 @@
     
     # Largely stolen from Pmc2c::MULTIs::rewrite_multi_sub
     my $short_sig := "JP";  # prepend the short signature interpreter and invocant
+    my @long_sig;
     for @( $past<parameters> ) {
         # Clean any '*' out of the name or type.
         my $type := cleanup_type($_<returns>);
         my $name := $_<name>;
 
+        say($type);
+        @long_sig.push(~$type);
+
         my $sig_char;
         # Pass standard parameter types unmodified.
         # All other param types are rewritten as PMCs.
@@ -185,6 +189,7 @@
     }
 
     $past<short_signature> := $short_sig;
+    $past<long_signature>  := join(',', @long_sig);
 
     make $past;
 }
@@ -195,7 +200,8 @@
         type = find_lex '$type'
         
         $S0 = type
-        $I0 = find_not_cclass .CCLASS_ALPHABETIC, $S0, 0, 0
+        $I1 = length $S0
+        $I0 = find_not_cclass .CCLASS_ALPHABETIC, $S0, 0, $I1
 
         $S0 = substr $S0, 0, $I0
         say $S0


More information about the parrot-commits mailing list